EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
|
Classes | |
class | CleansedLines |
Variables | |
string | _USAGE |
list | _ERROR_CATEGORIES |
list | _DEFAULT_FILTERS ['-build/include_alpha'] |
tuple | _STL_HEADERS |
tuple | _CPP_HEADERS |
list | _CHECK_MACROS |
tuple | _CHECK_REPLACEMENT dict([(m, {}) for m in _CHECK_MACROS]) |
dictionary | _ALT_TOKEN_REPLACEMENT |
tuple | _ALT_TOKEN_REPLACEMENT_PATTERN |
def eicpy.cpplint.CheckForCopyright | ( | filename, | |
lines, | |||
error | |||
) |
Logs an error if no Copyright message appears at the top of the file.
Definition at line 1100 of file cpplint.py.
View newest version in sPHENIX GitHub at line 1100 of file cpplint.py
References min, and charm_jet_strange_helicity.xrange.
def eicpy.cpplint.CheckForHeaderGuard | ( | filename, | |
lines, | |||
error | |||
) |
Checks that the file contains a header guard. Logs an error if no #ifndef header guard is present. For other headers, checks that the full pathname is used. Args: filename: The name of the C++ header file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found.
Definition at line 1137 of file cpplint.py.
View newest version in sPHENIX GitHub at line 1137 of file cpplint.py
References eicpy.cpplint.GetHeaderGuardCPPVariable().
def eicpy.cpplint.CheckForMultilineCommentsAndStrings | ( | filename, | |
clean_lines, | |||
linenum, | |||
error | |||
) |
Logs an error if we see /* ... */ or "..." that extend past one line. /* ... */ comments are legit inside macros, for one line. Otherwise, we prefer // comments, so it's ok to warn about the other. Likewise, it's ok for strings to extend across multiple lines, as long as a line continuation character (backslash) terminates each line. Although not currently prohibited by the C++ style guide, it's ugly and unnecessary. We don't do well with either in this lint program, so we warn about both. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found.
Definition at line 1249 of file cpplint.py.
View newest version in sPHENIX GitHub at line 1249 of file cpplint.py
def eicpy.cpplint.CheckForNewlineAtEOF | ( | filename, | |
lines, | |||
error | |||
) |
Logs an error if there is no newline char at the end of the file. Args: filename: The name of the current file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found.
Definition at line 1231 of file cpplint.py.
View newest version in sPHENIX GitHub at line 1231 of file cpplint.py
def eicpy.cpplint.CheckForUnicodeReplacementCharacters | ( | filename, | |
lines, | |||
error | |||
) |
Logs an error for each line containing Unicode replacement characters. These indicate that either the file contained invalid UTF-8 (likely) or Unicode replacement characters (which it shouldn't). Note that it's possible for this to throw off line numbering if the invalid UTF-8 occurred adjacent to a newline. Args: filename: The name of the current file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found.
Definition at line 1212 of file cpplint.py.
View newest version in sPHENIX GitHub at line 1212 of file cpplint.py
def eicpy.cpplint.CleanseComments | ( | line | ) |
Removes //-comments and single-line C-style /* */ comments. Args: line: A line of C++ source. Returns: The line with single-line comments removed.
Definition at line 972 of file cpplint.py.
View newest version in sPHENIX GitHub at line 972 of file cpplint.py
def eicpy.cpplint.CloseExpression | ( | clean_lines, | |
linenum, | |||
pos | |||
) |
If input points to ( or { or [, finds the position that closes it. If lines[linenum][pos] points to a '(' or '{' or '[', finds the linenum/pos that correspond to the closing of the expression. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. pos: A position on the line. Returns: A tuple (line, linenum, pos) pointer *past* the closing brace, or (line, len(lines), -1) if we never find a close. Note we ignore strings and comments when matching; and the line we return is the 'cleansed' line at linenum.
Definition at line 1056 of file cpplint.py.
View newest version in sPHENIX GitHub at line 1056 of file cpplint.py
References eicpy.cpplint.FindEndOfExpressionInLine().
def eicpy.cpplint.FindEndOfExpressionInLine | ( | line, | |
startpos, | |||
depth, | |||
startchar, | |||
endchar | |||
) |
Find the position just after the matching endchar. Args: line: a CleansedLines line. startpos: start searching at this position. depth: nesting level at startpos. startchar: expression opening character. endchar: expression closing character. Returns: Index just after endchar.
Definition at line 1033 of file cpplint.py.
View newest version in sPHENIX GitHub at line 1033 of file cpplint.py
References charm_jet_strange_helicity.xrange.
Referenced by eicpy.cpplint.CloseExpression().
def eicpy.cpplint.FindNextMultiLineCommentEnd | ( | lines, | |
lineix | |||
) |
We are inside a comment, find the end marker.
Definition at line 939 of file cpplint.py.
View newest version in sPHENIX GitHub at line 939 of file cpplint.py
Referenced by eicpy.cpplint.RemoveMultiLineComments().
def eicpy.cpplint.FindNextMultiLineCommentStart | ( | lines, | |
lineix | |||
) |
Find the beginning marker for a multiline comment.
Definition at line 928 of file cpplint.py.
View newest version in sPHENIX GitHub at line 928 of file cpplint.py
Referenced by eicpy.cpplint.RemoveMultiLineComments().
def eicpy.cpplint.GetHeaderGuardCPPVariable | ( | filename | ) |
Returns the CPP variable that should be used as a header guard. Args: filename: The name of a C++ header file. Returns: The CPP variable that should be used as a header guard in the named file.
Definition at line 1113 of file cpplint.py.
View newest version in sPHENIX GitHub at line 1113 of file cpplint.py
Referenced by eicpy.cpplint.CheckForHeaderGuard().
def eicpy.cpplint.RemoveMultiLineComments | ( | filename, | |
lines, | |||
error | |||
) |
Removes multiline (c-style) comments from lines.
Definition at line 956 of file cpplint.py.
View newest version in sPHENIX GitHub at line 956 of file cpplint.py
References eicpy.cpplint.FindNextMultiLineCommentEnd(), eicpy.cpplint.FindNextMultiLineCommentStart(), and eicpy.cpplint.RemoveMultiLineCommentsFromRange().
def eicpy.cpplint.RemoveMultiLineCommentsFromRange | ( | lines, | |
begin, | |||
end | |||
) |
Clears a range of lines for multi-line comments.
Definition at line 948 of file cpplint.py.
View newest version in sPHENIX GitHub at line 948 of file cpplint.py
Referenced by eicpy.cpplint.RemoveMultiLineComments().
dictionary eicpy.cpplint._ALT_TOKEN_REPLACEMENT |
Definition at line 305 of file cpplint.py.
View newest version in sPHENIX GitHub at line 305 of file cpplint.py
tuple eicpy.cpplint._ALT_TOKEN_REPLACEMENT_PATTERN |
Definition at line 325 of file cpplint.py.
View newest version in sPHENIX GitHub at line 325 of file cpplint.py
list eicpy.cpplint._CHECK_MACROS |
Definition at line 271 of file cpplint.py.
View newest version in sPHENIX GitHub at line 271 of file cpplint.py
tuple eicpy.cpplint._CHECK_REPLACEMENT dict([(m, {}) for m in _CHECK_MACROS]) |
Definition at line 280 of file cpplint.py.
View newest version in sPHENIX GitHub at line 280 of file cpplint.py
tuple eicpy.cpplint._CPP_HEADERS |
Definition at line 250 of file cpplint.py.
View newest version in sPHENIX GitHub at line 250 of file cpplint.py
list eicpy.cpplint._DEFAULT_FILTERS ['-build/include_alpha'] |
Definition at line 232 of file cpplint.py.
View newest version in sPHENIX GitHub at line 232 of file cpplint.py
list eicpy.cpplint._ERROR_CATEGORIES |
Definition at line 164 of file cpplint.py.
View newest version in sPHENIX GitHub at line 164 of file cpplint.py
tuple eicpy.cpplint._STL_HEADERS |
Definition at line 239 of file cpplint.py.
View newest version in sPHENIX GitHub at line 239 of file cpplint.py
string eicpy.cpplint._USAGE |
Definition at line 92 of file cpplint.py.
View newest version in sPHENIX GitHub at line 92 of file cpplint.py