FV3 Bundle
cpplint Namespace Reference

Classes

class  _BlockInfo
 
class  _ClassInfo
 
class  _CppLintState
 
class  _ExternCInfo
 
class  _FunctionState
 
class  _IncludeError
 
class  _IncludeState
 
class  _NamespaceInfo
 
class  _PreprocessorInfo
 
class  CleansedLines
 
class  FileInfo
 
class  NestingState
 

Functions

def GetHeaderExtensions ()
 
def GetAllExtensions ()
 
def GetNonHeaderExtensions ()
 
def unicode_escape_decode (x)
 
def ParseNolintSuppressions (filename, raw_line, linenum, error)
 
def ProcessGlobalSuppresions (lines)
 
def ResetNolintSuppressions ()
 
def IsErrorSuppressedByNolint (category, linenum)
 
def Match (pattern, s)
 
def ReplaceAll (pattern, rep, s)
 
def Search (pattern, s)
 
def _IsSourceExtension (s)
 
def _OutputFormat ()
 
def _SetOutputFormat (output_format)
 
def _VerboseLevel ()
 
def _SetVerboseLevel (level)
 
def _SetCountingStyle (level)
 
def _Filters ()
 
def _SetFilters (filters)
 
def _AddFilters (filters)
 
def _BackupFilters ()
 
def _RestoreFilters ()
 
def _ShouldPrintError (category, confidence, linenum)
 
def Error (filename, linenum, category, confidence, message)
 
def IsCppString (line)
 
def CleanseRawStrings (raw_lines)
 
def FindNextMultiLineCommentStart (lines, lineix)
 
def FindNextMultiLineCommentEnd (lines, lineix)
 
def RemoveMultiLineCommentsFromRange (lines, begin, end)
 
def RemoveMultiLineComments (filename, lines, error)
 
def CleanseComments (line)
 
def FindEndOfExpressionInLine (line, startpos, stack)
 
def CloseExpression (clean_lines, linenum, pos)
 
def FindStartOfExpressionInLine (line, endpos, stack)
 
def ReverseCloseExpression (clean_lines, linenum, pos)
 
def CheckForCopyright (filename, lines, error)
 
def GetIndentLevel (line)
 
def GetHeaderGuardCPPVariable (filename)
 
def CheckForHeaderGuard (filename, clean_lines, error)
 
def CheckHeaderFileIncluded (filename, include_state, error)
 
def CheckForBadCharacters (filename, lines, error)
 
def CheckForNewlineAtEOF (filename, lines, error)
 
def CheckForMultilineCommentsAndStrings (filename, clean_lines, linenum, error)
 
def CheckPosixThreading (filename, clean_lines, linenum, error)
 
def CheckVlogArguments (filename, clean_lines, linenum, error)
 
def CheckInvalidIncrement (filename, clean_lines, linenum, error)
 
def IsMacroDefinition (clean_lines, linenum)
 
def IsForwardClassDeclaration (clean_lines, linenum)
 
def CheckForNonStandardConstructs (filename, clean_lines, linenum, nesting_state, error)
 
def CheckSpacingForFunctionCall (filename, clean_lines, linenum, error)
 
def IsBlankLine (line)
 
def CheckForNamespaceIndentation (filename, nesting_state, clean_lines, line, error)
 
def CheckForFunctionLengths (filename, clean_lines, linenum, function_state, error)
 
def CheckComment (line, filename, linenum, next_line_start, error)
 
def CheckAccess (filename, clean_lines, linenum, nesting_state, error)
 
def CheckSpacing (filename, clean_lines, linenum, nesting_state, error)
 
def CheckOperatorSpacing (filename, clean_lines, linenum, error)
 
def CheckParenthesisSpacing (filename, clean_lines, linenum, error)
 
def CheckCommaSpacing (filename, clean_lines, linenum, error)
 
def _IsType (clean_lines, nesting_state, expr)
 
def CheckBracesSpacing (filename, clean_lines, linenum, nesting_state, error)
 
def IsDecltype (clean_lines, linenum, column)
 
def CheckSectionSpacing (filename, clean_lines, class_info, linenum, error)
 
def GetPreviousNonBlankLine (clean_lines, linenum)
 
def CheckBraces (filename, clean_lines, linenum, error)
 
def CheckTrailingSemicolon (filename, clean_lines, linenum, error)
 
def CheckEmptyBlockBody (filename, clean_lines, linenum, error)
 
def FindCheckMacro (line)
 
def CheckCheck (filename, clean_lines, linenum, error)
 
def CheckAltTokens (filename, clean_lines, linenum, error)
 
def GetLineWidth (line)
 
def CheckStyle (filename, clean_lines, linenum, file_extension, nesting_state, error)
 
def _DropCommonSuffixes (filename)
 
def _ClassifyInclude (fileinfo, include, is_system)
 
def CheckIncludeLine (filename, clean_lines, linenum, include_state, error)
 
def _GetTextInside (text, start_pattern)
 
def CheckLanguage (filename, clean_lines, linenum, file_extension, include_state, nesting_state, error)
 
def CheckGlobalStatic (filename, clean_lines, linenum, error)
 
def CheckPrintf (filename, clean_lines, linenum, error)
 
def IsDerivedFunction (clean_lines, linenum)
 
def IsOutOfLineMethodDefinition (clean_lines, linenum)
 
def IsInitializerList (clean_lines, linenum)
 
def CheckForNonConstReference (filename, clean_lines, linenum, nesting_state, error)
 
def CheckCasts (filename, clean_lines, linenum, error)
 
def CheckCStyleCast (filename, clean_lines, linenum, cast_type, pattern, error)
 
def ExpectingFunctionArgs (clean_lines, linenum)
 
def FilesBelongToSameModule (filename_cc, filename_h)
 
def UpdateIncludeState (filename, include_dict, io=codecs)
 
def CheckForIncludeWhatYouUse (filename, clean_lines, include_state, error, io=codecs)
 
def CheckMakePairUsesDeduction (filename, clean_lines, linenum, error)
 
def CheckRedundantVirtual (filename, clean_lines, linenum, error)
 
def CheckRedundantOverrideOrFinal (filename, clean_lines, linenum, error)
 
def IsBlockInNameSpace (nesting_state, is_forward_declaration)
 
def ShouldCheckNamespaceIndentation (nesting_state, is_namespace_indent_item, raw_lines_no_comments, linenum)
 
def CheckItemIndentationInNamespace (filename, raw_lines_no_comments, linenum, error)
 
def ProcessLine (filename, file_extension, clean_lines, line, include_state, function_state, nesting_state, error, extra_check_functions=None)
 
def FlagCxx11Features (filename, clean_lines, linenum, error)
 
def FlagCxx14Features (filename, clean_lines, linenum, error)
 
def ProcessFileData (filename, file_extension, lines, error, extra_check_functions=None)
 
def ProcessConfigOverrides (filename)
 
def ProcessFile (filename, vlevel, extra_check_functions=None)
 
def PrintUsage (message)
 
def PrintCategories ()
 
def ParseArguments (args)
 
def _ExpandDirectories (filenames)
 
def _FilterExcludedFiles (filenames)
 
def main ()
 

Variables

 _header_extensions = set([])
 
 _valid_extensions = set([])
 
string _USAGE
 
list _ERROR_CATEGORIES
 
list _LEGACY_ERROR_CATEGORIES
 
list _DEFAULT_FILTERS = ['-build/include_alpha']
 
list _DEFAULT_C_SUPPRESSED_CATEGORIES
 
list _DEFAULT_KERNEL_SUPPRESSED_CATEGORIES
 
 _CPP_HEADERS
 
 _TYPES
 
 _THIRD_PARTY_HEADERS_PATTERN
 
list _test_suffixes = ['_test', '_regtest', '_unittest']
 
string _TEST_FILE_SUFFIX = '(' + '|'.join(_test_suffixes) + r')$'
 
 _EMPTY_CONDITIONAL_BODY_PATTERN = re.compile(r'^\s*$', re.DOTALL)
 
list _CHECK_MACROS
 
 _CHECK_REPLACEMENT = dict([(macro_var, {}) for macro_var in _CHECK_MACROS])
 
dictionary _ALT_TOKEN_REPLACEMENT
 
 _ALT_TOKEN_REPLACEMENT_PATTERN
 
int _C_SYS_HEADER = 1
 
int _CPP_SYS_HEADER = 2
 
int _LIKELY_MY_HEADER = 3
 
int _POSSIBLE_MY_HEADER = 4
 
int _OTHER_HEADER = 5
 
int _NO_ASM = 0
 
int _INSIDE_ASM = 1
 
int _END_ASM = 2
 
int _BLOCK_ASM = 3
 
 _MATCH_ASM
 
 _SEARCH_C_FILE
 
 _SEARCH_KERNEL_FILE = re.compile(r'\b(?:LINT_KERNEL_FILE)')
 
dictionary _regexp_compile_cache = {}
 
dictionary _error_suppressions = {}
 
 _root = None
 
 _repository = None
 
 _excludes = None
 
bool _quiet = False
 
int _line_length = 80
 
 xrange = range
 
 basestring = str
 
 long = int
 
 itervalues = dict.itervalues
 
 iteritems = dict.iteritems
 
dictionary _global_error_suppressions = {}
 
 _cpplint_state = _CppLintState()
 
 _RE_PATTERN_CLEANSE_LINE_ESCAPES
 
string _RE_PATTERN_C_COMMENTS = r'/\*(?:[^*]|\*(?!/))*\*/'
 
 _RE_PATTERN_CLEANSE_LINE_C_COMMENTS
 
string _UNSAFE_FUNC_PREFIX = r'(?:[-+*/=%^&|(<]\s*|>\s+)'
 
tuple _THREADING_LIST
 
 _RE_PATTERN_INVALID_INCREMENT
 
 _RE_PATTERN_TODO = re.compile(r'^//(\s*)TODO(\(.+?\))?:?(\s|$)?')
 
 _RE_PATTERN_INCLUDE = re.compile(r'^\s*#\s*include\s*([<"])([^>"]*)[>"].*$')
 
 _RE_FIRST_COMPONENT = re.compile(r'^[^-_.]+')
 
string _RE_PATTERN_IDENT = r'[_a-zA-Z]\w*'
 
tuple _RE_PATTERN_TYPE
 
 _RE_PATTERN_REF_PARAM
 
tuple _RE_PATTERN_CONST_REF_PARAM
 
tuple _RE_PATTERN_REF_STREAM_PARAM
 
tuple _HEADERS_CONTAINING_TEMPLATES
 
tuple _HEADERS_MAYBE_TEMPLATES
 
 _RE_PATTERN_STRING = re.compile(r'\bstring\b')
 
list _re_pattern_headers_maybe_templates = []
 
list _re_pattern_templates = []
 
 _RE_PATTERN_EXPLICIT_MAKEPAIR = re.compile(r'\bmake_pair\s*<')
 

Function Documentation

◆ _AddFilters()

def cpplint._AddFilters (   filters)
private
Adds more filter overrides.

Unlike _SetFilters, this function does not reset the current list of filters
available.

Args:
  filters: A string of comma-separated filters (eg "whitespace/indent").
           Each filter should start with + or -; else we die.

Definition at line 1166 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _BackupFilters()

def cpplint._BackupFilters ( )
private
Saves the current filter list to backup storage.

Definition at line 1178 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _ClassifyInclude()

def cpplint._ClassifyInclude (   fileinfo,
  include,
  is_system 
)
private
Figures out what kind of header 'include' is.

Args:
  fileinfo: The current file cpplint is running over. A FileInfo instance.
  include: The path to a #included file.
  is_system: True if the #include used <> rather than "".

Returns:
  One of the _XXX_HEADER constants.

For example:
  >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'stdio.h', True)
  _C_SYS_HEADER
  >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'string', True)
  _CPP_SYS_HEADER
  >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/foo.h', False)
  _LIKELY_MY_HEADER
  >>> _ClassifyInclude(FileInfo('foo/foo_unknown_extension.cc'),
  ...                  'bar/foo_other_ext.h', False)
  _POSSIBLE_MY_HEADER
  >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/bar.h', False)
  _OTHER_HEADER

Definition at line 4608 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _DropCommonSuffixes()

def cpplint._DropCommonSuffixes (   filename)
private
Drops common suffixes like _test.cc or -inl.h from filename.

For example:
  >>> _DropCommonSuffixes('foo/foo-inl.h')
  'foo/foo'
  >>> _DropCommonSuffixes('foo/bar/foo.cc')
  'foo/bar/foo'
  >>> _DropCommonSuffixes('foo/foo_internal.h')
  'foo/foo'
  >>> _DropCommonSuffixes('foo/foo_unusualinternal.h')
  'foo/foo_unusualinternal'

Args:
  filename: The input filename.

Returns:
  The filename with the common suffix removed.

Definition at line 4578 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _ExpandDirectories()

def cpplint._ExpandDirectories (   filenames)
private
Searches a list of filenames and replaces directories in the list with
all files descending from those directories. Files with extensions not in
the valid extensions list are excluded.

Args:
  filenames: A list of files or directories

Returns:
  A list of all files that are members of filenames or descended from a
  directory in filenames

Definition at line 6414 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _FilterExcludedFiles()

def cpplint._FilterExcludedFiles (   filenames)
private
Filters out files listed in the --exclude command line switch. File paths
in the switch are evaluated relative to the current working directory

Definition at line 6446 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _Filters()

def cpplint._Filters ( )
private
Returns the module's list of output filters, as a list.

Definition at line 1149 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _GetTextInside()

def cpplint._GetTextInside (   text,
  start_pattern 
)
private
Retrieves all the text between matching open and close parentheses.

Given a string of lines and a regular expression string, retrieve all the text
following the expression and between opening punctuation symbols like
(, [, or {, and the matching close-punctuation symbol. This properly nested
occurrences of the punctuations, so for the text like
  printf(a(), b(c()));
a call to _GetTextInside(text, r'printf\(') will return 'a(), b(c())'.
start_pattern must match string having an open punctuation symbol at the end.

Args:
  text: The lines to extract text. Its comments and strings must be elided.
         It can be single line and can span multiple lines.
  start_pattern: The regexp string indicating where to start extracting
                 the text.
Returns:
  The extracted text.
  None if either the opening string or ending punctuation could not be found.

Definition at line 4753 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _IsSourceExtension()

def cpplint._IsSourceExtension (   s)
private
File extension (excluding dot) matches a source file extension.

Definition at line 792 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _IsType()

def cpplint._IsType (   clean_lines,
  nesting_state,
  expr 
)
private
Check if expression looks like a type name, returns true if so.

Args:
  clean_lines: A CleansedLines instance containing the file.
  nesting_state: A NestingState instance which maintains information about
                 the current stack of nested blocks being parsed.
  expr: The expression to check.
Returns:
  True, if token looks like a type.

Definition at line 3630 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _OutputFormat()

def cpplint._OutputFormat ( )
private
Gets the module's output format.

Definition at line 1124 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _RestoreFilters()

def cpplint._RestoreFilters ( )
private
Restores filters previously backed up.

Definition at line 1182 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _SetCountingStyle()

def cpplint._SetCountingStyle (   level)
private
Sets the module's counting options.

Definition at line 1144 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _SetFilters()

def cpplint._SetFilters (   filters)
private
Sets the module's error-message filters.

These filters are applied when deciding whether to emit a given
error message.

Args:
  filters: A string of comma-separated filters (eg "whitespace/indent").
           Each filter should start with + or -; else we die.

Definition at line 1154 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _SetOutputFormat()

def cpplint._SetOutputFormat (   output_format)
private
Sets the module's output format.

Definition at line 1129 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _SetVerboseLevel()

def cpplint._SetVerboseLevel (   level)
private
Sets the module's verbosity, and returns the previous setting.

Definition at line 1139 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ _ShouldPrintError()

def cpplint._ShouldPrintError (   category,
  confidence,
  linenum 
)
private
If confidence >= verbose, category passes filter and is not suppressed.

Definition at line 1356 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _VerboseLevel()

def cpplint._VerboseLevel ( )
private
Returns the module's verbosity setting.

Definition at line 1134 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ CheckAccess()

def cpplint.CheckAccess (   filename,
  clean_lines,
  linenum,
  nesting_state,
  error 
)
Checks for improper use of DISALLOW* macros.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
  nesting_state: A NestingState instance which maintains information about
                 the current stack of nested blocks being parsed.
  error: The function to call with any errors found.

Definition at line 3283 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckAltTokens()

def cpplint.CheckAltTokens (   filename,
  clean_lines,
  linenum,
  error 
)
Check alternative keywords being used in boolean expressions.

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 4388 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckBraces()

def cpplint.CheckBraces (   filename,
  clean_lines,
  linenum,
  error 
)
Looks for misplaced braces (e.g. at the end of line).

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 3877 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckBracesSpacing()

def cpplint.CheckBracesSpacing (   filename,
  clean_lines,
  linenum,
  nesting_state,
  error 
)
Checks for horizontal spacing near commas.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
  nesting_state: A NestingState instance which maintains information about
                 the current stack of nested blocks being parsed.
  error: The function to call with any errors found.

Definition at line 3693 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckCasts()

def cpplint.CheckCasts (   filename,
  clean_lines,
  linenum,
  error 
)
Various cast related checks.

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 5308 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckCheck()

def cpplint.CheckCheck (   filename,
  clean_lines,
  linenum,
  error 
)
Checks the use of CHECK and EXPECT macros.

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 4270 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckCommaSpacing()

def cpplint.CheckCommaSpacing (   filename,
  clean_lines,
  linenum,
  error 
)
Checks for horizontal spacing near commas and semicolons.

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 3594 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckComment()

def cpplint.CheckComment (   line,
  filename,
  linenum,
  next_line_start,
  error 
)
Checks for common mistakes in comments.

Args:
  line: The line in question.
  filename: The name of the current file.
  linenum: The number of the line to check.
  next_line_start: The first non-whitespace column of the next line.
  error: The function to call with any errors found.

Definition at line 3229 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckCStyleCast()

def cpplint.CheckCStyleCast (   filename,
  clean_lines,
  linenum,
  cast_type,
  pattern,
  error 
)
Checks for a C-style cast by looking for the pattern.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
  cast_type: The string for the C++ cast to recommend.  This is either
    reinterpret_cast, static_cast, or const_cast, depending.
  pattern: The regular expression used to find C-style casts.
  error: The function to call with any errors found.

Returns:
  True if an error was emitted.
  False otherwise.

Definition at line 5427 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckEmptyBlockBody()

def cpplint.CheckEmptyBlockBody (   filename,
  clean_lines,
  linenum,
  error 
)
Look for empty loop/conditional body with only a single semicolon.

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 4143 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckForBadCharacters()

def cpplint.CheckForBadCharacters (   filename,
  lines,
  error 
)
Logs an error for each line containing bad characters.

Two kinds of bad characters:

1. 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.

2. NUL bytes.  These are problematic for some tools.

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 2117 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckForCopyright()

def cpplint.CheckForCopyright (   filename,
  lines,
  error 
)
Logs an error if no Copyright message appears at the top of the file.

Definition at line 1927 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ CheckForFunctionLengths()

def cpplint.CheckForFunctionLengths (   filename,
  clean_lines,
  linenum,
  function_state,
  error 
)
Reports for long function bodies.

For an overview why this is done, see:
https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Write_Short_Functions

Uses a simplistic algorithm assuming other style guidelines
(especially spacing) are followed.
Only checks unindented functions, so class members are unchecked.
Trivial bodies are unchecked, so constructors with huge initializer lists
may be missed.
Blank/comment lines are not counted so as to avoid encouraging the removal
of vertical space and comments just to get through a lint check.
NOLINT *on the last line of a function* disables this check.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
  function_state: Current function name and lines in body so far.
  error: The function to call with any errors found.

Definition at line 3159 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckForHeaderGuard()

def cpplint.CheckForHeaderGuard (   filename,
  clean_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.
  clean_lines: A CleansedLines instance containing the file.
  error: The function to call with any errors found.

Definition at line 1987 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckForIncludeWhatYouUse()

def cpplint.CheckForIncludeWhatYouUse (   filename,
  clean_lines,
  include_state,
  error,
  io = codecs 
)
Reports for missing stl includes.

This function will output warnings to make sure you are including the headers
necessary for the stl containers and functions that you use. We only give one
reason to include a header. For example, if you use both equal_to<> and
less<> in a .h file, only one (the latter in the file) of these will be
reported as a reason to include the <functional>.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  include_state: An _IncludeState instance.
  error: The function to call with any errors found.
  io: The IO factory to use to read the header file. Provided for unittest
      injection.

Definition at line 5658 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckForMultilineCommentsAndStrings()

def 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 2160 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ CheckForNamespaceIndentation()

def cpplint.CheckForNamespaceIndentation (   filename,
  nesting_state,
  clean_lines,
  line,
  error 
)

Definition at line 3145 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckForNewlineAtEOF()

def 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 2142 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ CheckForNonConstReference()

def cpplint.CheckForNonConstReference (   filename,
  clean_lines,
  linenum,
  nesting_state,
  error 
)
Check for non-const references.

Separate from CheckLanguage since it scans backwards from current
line, instead of scanning forward.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
  nesting_state: A NestingState instance which maintains information about
                 the current stack of nested blocks being parsed.
  error: The function to call with any errors found.

Definition at line 5170 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckForNonStandardConstructs()

def cpplint.CheckForNonStandardConstructs (   filename,
  clean_lines,
  linenum,
  nesting_state,
  error 
)
Logs an error if we see certain non-ANSI constructs ignored by gcc-2.

Complain about several constructs which gcc-2 accepts, but which are
not standard C++.  Warning about these in lint is one way to ease the
transition to new compilers.
- put storage class first (e.g. "static const" instead of "const static").
- "%lld" instead of %qd" in printf-type functions.
- "%1$d" is non-standard in printf-type functions.
- "\%" is an undefined character escape sequence.
- text after #endif is not allowed.
- invalid inner-style forward declaration.
- >? and <? operators, and their >?= and <?= cousins.

Additionally, check for constructor/destructor style violations and reference
members, as it is very convenient to do so while checking for
gcc-2 compliance.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
  nesting_state: A NestingState instance which maintains information about
                 the current stack of nested blocks being parsed.
  error: A callable to which errors are reported, which takes 4 arguments:
         filename, line number, error level, and message

Definition at line 2890 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckGlobalStatic()

def cpplint.CheckGlobalStatic (   filename,
  clean_lines,
  linenum,
  error 
)
Check for unsafe global or static objects.

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 4999 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckHeaderFileIncluded()

def cpplint.CheckHeaderFileIncluded (   filename,
  include_state,
  error 
)
Logs an error if a source file does not include its header.

Definition at line 2090 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckIncludeLine()

def cpplint.CheckIncludeLine (   filename,
  clean_lines,
  linenum,
  include_state,
  error 
)
Check rules that are applicable to #include lines.

Strings on #include lines are NOT removed from elided line, to make
certain tasks easier. However, to prevent false positives, checks
applicable to #include lines in CheckLanguage must be put here.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
  include_state: An _IncludeState instance in which the headers are inserted.
  error: The function to call with any errors found.

Definition at line 4674 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckInvalidIncrement()

def cpplint.CheckInvalidIncrement (   filename,
  clean_lines,
  linenum,
  error 
)
Checks for invalid increment *count++.

For example following function:
void increment_counter(int* count) {
  *count++;
}
is invalid, because it effectively does count++, moving pointer, and should
be replaced with ++*count, (*count)++ or *count += 1.

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 2278 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ CheckItemIndentationInNamespace()

def cpplint.CheckItemIndentationInNamespace (   filename,
  raw_lines_no_comments,
  linenum,
  error 
)

Definition at line 5932 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckLanguage()

def cpplint.CheckLanguage (   filename,
  clean_lines,
  linenum,
  file_extension,
  include_state,
  nesting_state,
  error 
)
Checks rules from the 'C++ language rules' section of cppguide.html.

Some of these rules are hard to test (function overloading, using
uint32 inappropriately), but we do the best we can.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
  file_extension: The extension (without the dot) of the filename.
  include_state: An _IncludeState instance in which the headers are inserted.
  nesting_state: A NestingState instance which maintains information about
                 the current stack of nested blocks being parsed.
  error: The function to call with any errors found.

Definition at line 4839 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckMakePairUsesDeduction()

def cpplint.CheckMakePairUsesDeduction (   filename,
  clean_lines,
  linenum,
  error 
)
Check that make_pair's template arguments are deduced.

G++ 4.6 in C++11 mode fails badly if make_pair's template arguments are
specified explicitly, and such use isn't intended in any case.

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 5761 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ CheckOperatorSpacing()

def cpplint.CheckOperatorSpacing (   filename,
  clean_lines,
  linenum,
  error 
)
Checks for horizontal spacing around operators.

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 3441 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckParenthesisSpacing()

def cpplint.CheckParenthesisSpacing (   filename,
  clean_lines,
  linenum,
  error 
)
Checks for horizontal spacing around parentheses.

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 3556 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckPosixThreading()

def cpplint.CheckPosixThreading (   filename,
  clean_lines,
  linenum,
  error 
)
Checks for calls to thread-unsafe functions.

Much code has been originally written without consideration of
multi-threading. Also, engineers are relying on their old experience;
they have learned posix before threading extensions were added. These
tests guide the engineers to use thread-safe functions (when using
posix directly).

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 2228 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckPrintf()

def cpplint.CheckPrintf (   filename,
  clean_lines,
  linenum,
  error 
)
Check for printf related issues.

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 5060 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckRedundantOverrideOrFinal()

def cpplint.CheckRedundantOverrideOrFinal (   filename,
  clean_lines,
  linenum,
  error 
)
Check if line contains a redundant "override" or "final" virt-specifier.

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 5846 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckRedundantVirtual()

def cpplint.CheckRedundantVirtual (   filename,
  clean_lines,
  linenum,
  error 
)
Check if line contains a redundant "virtual" function-specifier.

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 5782 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckSectionSpacing()

def cpplint.CheckSectionSpacing (   filename,
  clean_lines,
  class_info,
  linenum,
  error 
)
Checks for additional blank line issues related to sections.

Currently the only thing checked here is blank line before protected/private.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  class_info: A _ClassInfo objects.
  linenum: The number of the line to check.
  error: The function to call with any errors found.

Definition at line 3799 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckSpacing()

def cpplint.CheckSpacing (   filename,
  clean_lines,
  linenum,
  nesting_state,
  error 
)
Checks for the correctness of various spacing issues in the code.

Things we check for: spaces around operators, spaces after
if/for/while/switch, no spaces around parens in function calls, two
spaces between code and comment, don't start a block with a blank
line, don't end a function with a blank line, don't add a blank line
after public/protected/private, don't have too many blank lines in a row.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
  nesting_state: A NestingState instance which maintains information about
                 the current stack of nested blocks being parsed.
  error: The function to call with any errors found.

Definition at line 3313 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckSpacingForFunctionCall()

def cpplint.CheckSpacingForFunctionCall (   filename,
  clean_lines,
  linenum,
  error 
)
Checks for the correctness of various spacing around function calls.

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 3052 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckStyle()

def cpplint.CheckStyle (   filename,
  clean_lines,
  linenum,
  file_extension,
  nesting_state,
  error 
)
Checks rules from the 'C++ style rules' section of cppguide.html.

Most of these rules are hard to test (naming, comment style), but we
do what we can.  In particular we check for 2-space indents, line lengths,
tab usage, spaces inside code, etc.

Args:
  filename: The name of the current file.
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
  file_extension: The extension (without the dot) of the filename.
  nesting_state: A NestingState instance which maintains information about
                 the current stack of nested blocks being parsed.
  error: The function to call with any errors found.

Definition at line 4443 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckTrailingSemicolon()

def cpplint.CheckTrailingSemicolon (   filename,
  clean_lines,
  linenum,
  error 
)
Looks for redundant trailing semicolon.

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 3996 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckVlogArguments()

def cpplint.CheckVlogArguments (   filename,
  clean_lines,
  linenum,
  error 
)
Checks that VLOG() is only used for defining a logging level.

For example, VLOG(2) is correct. VLOG(INFO), VLOG(WARNING), VLOG(ERROR), and
VLOG(FATAL) are not.

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 2254 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CleanseComments()

def 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 1579 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CleanseRawStrings()

def cpplint.CleanseRawStrings (   raw_lines)
Removes C++11 raw strings from lines.

  Before:
    static const char kData[] = R"(
        multi-line string
        )";

  After:
    static const char kData[] = ""
        (replaced by blank line)
        "";

Args:
  raw_lines: list of raw lines.

Returns:
  list of lines with C++11 raw strings replaced by empty strings.

Definition at line 1459 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CloseExpression()

def cpplint.CloseExpression (   clean_lines,
  linenum,
  pos 
)
If input points to ( or { or [ or <, finds the position that closes it.

If lines[linenum][pos] points to a '(' or '{' or '[' or '<', finds the
linenum/pos that correspond to the closing of the expression.

TODO(unknown): cpplint spends a fair bit of time matching parentheses.
Ideally we would want to index all opening and closing parentheses once
and have CloseExpression be just a simple lookup, but due to preprocessor
tricks, this is not so easy.

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 1768 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Error()

def cpplint.Error (   filename,
  linenum,
  category,
  confidence,
  message 
)
Logs the fact we've found a lint error.

We log where the error was found, and also our confidence in the error,
that is, how certain we are this is a legitimate style regression, and
not a misidentification or a use that's sometimes justified.

False positives can be suppressed by the use of
"cpplint(category)"  comments on the offending line.  These are
parsed into _error_suppressions.

Args:
  filename: The name of the file containing the error.
  linenum: The number of the line containing the error.
  category: A string used to describe the "category" this bug
    falls under: "whitespace", say, or "runtime".  Categories
    may have a hierarchy separated by slashes: "whitespace/indent".
  confidence: A number from 1-5 representing a confidence score for
    the error, with 5 meaning that we are certain of the problem,
    and 1 meaning that it could be a legitimate construct.
  message: The error message.

Definition at line 1384 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExpectingFunctionArgs()

def cpplint.ExpectingFunctionArgs (   clean_lines,
  linenum 
)
Checks whether where function type arguments are expected.

Args:
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.

Returns:
  True if the line at 'linenum' is inside something that expects arguments
  of function types.

Definition at line 5480 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FilesBelongToSameModule()

def cpplint.FilesBelongToSameModule (   filename_cc,
  filename_h 
)
Check if these two filenames belong to the same module.

The concept of a 'module' here is a as follows:
foo.h, foo-inl.h, foo.cc, foo_test.cc and foo_unittest.cc belong to the
same 'module' if they are in the same directory.
some/path/public/xyzzy and some/path/internal/xyzzy are also considered
to belong to the same module here.

If the filename_cc contains a longer path than the filename_h, for example,
'/absolute/path/to/base/sysinfo.cc', and this file would include
'base/sysinfo.h', this function also produces the prefix needed to open the
header. This is used by the caller of this function to more robustly open the
header file. We don't have access to the real include paths in this context,
so we need this guesswork here.

Known bugs: tools/base/bar.cc and base/bar.h belong to the same module
according to this implementation. Because of this, this function gives
some false positives. This should be sufficiently rare in practice.

Args:
  filename_cc: is the path for the source (e.g. .cc) file
  filename_h: is the path for the header path

Returns:
  Tuple with a bool and a string:
  bool: True if filename_cc and filename_h belong to the same module.
  string: the additional prefix needed to open the header file.

Definition at line 5572 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindCheckMacro()

def cpplint.FindCheckMacro (   line)
Find a replaceable CHECK-like macro.

Args:
  line: line to search on.
Returns:
  (macro name, start position), or (None, -1) if no replaceable
  macro is found.

Definition at line 4247 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindEndOfExpressionInLine()

def cpplint.FindEndOfExpressionInLine (   line,
  startpos,
  stack 
)
Find the position just after the end of current parenthesized expression.

Args:
  line: a CleansedLines line.
  startpos: start searching at this position.
  stack: nesting stack at startpos.

Returns:
  On finding matching end: (index just after matching end, None)
  On finding an unclosed expression: (-1, None)
  Otherwise: (-1, new stack at end of this line)

Definition at line 1690 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindNextMultiLineCommentEnd()

def cpplint.FindNextMultiLineCommentEnd (   lines,
  lineix 
)
We are inside a comment, find the end marker.

Definition at line 1546 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ FindNextMultiLineCommentStart()

def cpplint.FindNextMultiLineCommentStart (   lines,
  lineix 
)
Find the beginning marker for a multiline comment.

Definition at line 1535 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ FindStartOfExpressionInLine()

def cpplint.FindStartOfExpressionInLine (   line,
  endpos,
  stack 
)
Find position at the matching start of current expression.

This is almost the reverse of FindEndOfExpressionInLine, but note
that the input position and returned position differs by 1.

Args:
  line: a CleansedLines line.
  endpos: start searching at this position.
  stack: nesting stack at endpos.

Returns:
  On finding matching start: (index at matching start, None)
  On finding an unclosed expression: (-1, None)
  Otherwise: (-1, new stack at beginning of this line)

Definition at line 1812 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FlagCxx11Features()

def cpplint.FlagCxx11Features (   filename,
  clean_lines,
  linenum,
  error 
)
Flag those c++11 features that we only allow in certain places.

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 5984 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FlagCxx14Features()

def cpplint.FlagCxx14Features (   filename,
  clean_lines,
  linenum,
  error 
)
Flag those C++14 features that we restrict.

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 6036 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAllExtensions()

def cpplint.GetAllExtensions ( )

Definition at line 76 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetHeaderExtensions()

def cpplint.GetHeaderExtensions ( )

Definition at line 69 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ GetHeaderGuardCPPVariable()

def 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 1956 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetIndentLevel()

def cpplint.GetIndentLevel (   line)
Return the number of leading spaces in line.

Args:
  line: A string to check.

Returns:
  An integer count of leading spaces, possibly zero.

Definition at line 1940 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetLineWidth()

def cpplint.GetLineWidth (   line)
Determines the width of the line in column positions.

Args:
  line: A string, which may be a Unicode string.

Returns:
  The width of the line in column positions, accounting for Unicode
  combining characters and wide characters.

Definition at line 4420 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNonHeaderExtensions()

def cpplint.GetNonHeaderExtensions ( )

Definition at line 81 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPreviousNonBlankLine()

def cpplint.GetPreviousNonBlankLine (   clean_lines,
  linenum 
)
Return the most recent non-blank line and its line number.

Args:
  clean_lines: A CleansedLines instance containing the file contents.
  linenum: The number of the line to check.

Returns:
  A tuple with two elements.  The first element is the contents of the last
  non-blank line before the current line, or the empty string if this is the
  first non-blank line.  The second is the line number of that line, or -1
  if this is the first non-blank line.

Definition at line 3854 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsBlankLine()

def cpplint.IsBlankLine (   line)
Returns true if the given line is blank.

We consider a line to be blank if the line is empty or consists of
only white spaces.

Args:
  line: A line of a string.

Returns:
  True, if the given line is blank.

Definition at line 3129 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsBlockInNameSpace()

def cpplint.IsBlockInNameSpace (   nesting_state,
  is_forward_declaration 
)
Checks that the new block is directly in a namespace.

Args:
  nesting_state: The _NestingState object that contains info about our state.
  is_forward_declaration: If the class is a forward declared class.
Returns:
  Whether or not the new block is directly in a namespace.

Definition at line 5879 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsCppString()

def cpplint.IsCppString (   line)
Does line terminate so, that the next symbol is in string constant.

This function does not consider single-line nor multi-line comments.

Args:
  line: is a partial line of code starting from the 0..n.

Returns:
  True, if next character appended to 'line' is inside a
  string constant.

Definition at line 1442 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ IsDecltype()

def cpplint.IsDecltype (   clean_lines,
  linenum,
  column 
)
Check if the token ending on (linenum, column) is decltype().

Args:
  clean_lines: A CleansedLines instance containing the file.
  linenum: the number of the line to check.
  column: end column of the token to check.
Returns:
  True if this token is decltype() expression, False otherwise.

Definition at line 3782 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsDerivedFunction()

def cpplint.IsDerivedFunction (   clean_lines,
  linenum 
)
Check if current line contains an inherited function.

Args:
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
Returns:
  True if current line contains a function with "override"
  virt-specifier.

Definition at line 5089 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsErrorSuppressedByNolint()

def cpplint.IsErrorSuppressedByNolint (   category,
  linenum 
)
Returns true if the specified error category is suppressed on this line.

Consults the global error_suppressions map populated by
ParseNolintSuppressions/ProcessGlobalSuppresions/ResetNolintSuppressions.

Args:
  category: str, the category of the error.
  linenum: int, the current line number.
Returns:
  bool, True iff the error should be suppressed due to a NOLINT comment or
  global suppression.

Definition at line 739 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ IsForwardClassDeclaration()

def cpplint.IsForwardClassDeclaration (   clean_lines,
  linenum 
)

Definition at line 2310 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsInitializerList()

def cpplint.IsInitializerList (   clean_lines,
  linenum 
)
Check if current line is inside constructor initializer list.

Args:
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
Returns:
  True if current line appears to be inside constructor initializer
  list, False otherwise.

Definition at line 5127 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsMacroDefinition()

def cpplint.IsMacroDefinition (   clean_lines,
  linenum 
)

Definition at line 2300 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsOutOfLineMethodDefinition()

def cpplint.IsOutOfLineMethodDefinition (   clean_lines,
  linenum 
)
Check if current line contains an out-of-line method definition.

Args:
  clean_lines: A CleansedLines instance containing the file.
  linenum: The number of the line to check.
Returns:
  True if current line contains an out-of-line method definition.

Definition at line 5111 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

def cpplint.main ( )

Definition at line 6453 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Match()

def cpplint.Match (   pattern,
  s 
)
Matches the string with the pattern, caching the compiled regexp.

Definition at line 757 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ ParseArguments()

def cpplint.ParseArguments (   args)
Parses the command line arguments.

This may set the output format and verbosity level as side-effects.

Args:
  args: The command line arguments:

Returns:
  The list of filenames to lint.

Definition at line 6313 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseNolintSuppressions()

def cpplint.ParseNolintSuppressions (   filename,
  raw_line,
  linenum,
  error 
)
Updates the global list of line error-suppressions.

Parses any NOLINT comments on the current line, updating the global
error_suppressions store.  Reports an error if the NOLINT comment
was malformed.

Args:
  filename: str, the name of the input file.
  raw_line: str, the line of input text, with comments.
  linenum: int, the number of the current line.
  error: function, an error handler.

Definition at line 683 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintCategories()

def cpplint.PrintCategories ( )
Prints a list of all the error-categories used by error messages.

These are the categories used to filter messages via --filter.

Definition at line 6304 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ PrintUsage()

def cpplint.PrintUsage (   message)
Prints a brief usage string and exits, optionally with an error message.

Args:
  message: The optional error message.

Definition at line 6290 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ ProcessConfigOverrides()

def cpplint.ProcessConfigOverrides (   filename)
Loads the configuration files and processes the config overrides.

Args:
  filename: The name of the file being processed by the linter.

Returns:
  False if the current |filename| should not be processed further.

Definition at line 6106 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessFile()

def cpplint.ProcessFile (   filename,
  vlevel,
  extra_check_functions = None 
)
Does google-lint on a single file.

Args:
  filename: The name of the file to parse.

  vlevel: The level of errors to report.  Every error of confidence
  >= verbose_level will be reported.  0 is a good default.

  extra_check_functions: An array of additional check functions that will be
                         run on each source line. Each function takes 4
                         arguments: filename, clean_lines, line, error

Definition at line 6202 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessFileData()

def cpplint.ProcessFileData (   filename,
  file_extension,
  lines,
  error,
  extra_check_functions = None 
)
Performs lint checks and reports any errors to the given error function.

Args:
  filename: Filename of the file that is being processed.
  file_extension: The extension (dot not included) of the file.
  lines: An array of strings, each representing a line of the file, with the
         last element being empty if the file is terminated with a newline.
  error: A callable to which errors are reported, which takes 4 arguments:
         filename, line number, error level, and message
  extra_check_functions: An array of additional check functions that will be
                         run on each source line. Each function takes 4
                         arguments: filename, clean_lines, line, error

Definition at line 6056 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessGlobalSuppresions()

def cpplint.ProcessGlobalSuppresions (   lines)
Updates the list of global error suppressions.

Parses any lint directives in the file that have global effect.

Args:
  lines: An array of strings, each representing a line of the file, with the
         last element being empty if the file is terminated with a newline.

Definition at line 715 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ ProcessLine()

def cpplint.ProcessLine (   filename,
  file_extension,
  clean_lines,
  line,
  include_state,
  function_state,
  nesting_state,
  error,
  extra_check_functions = None 
)
Processes a single line in the file.

Args:
  filename: Filename of the file that is being processed.
  file_extension: The extension (dot not included) of the file.
  clean_lines: An array of strings, each representing a line of the file,
               with comments stripped.
  line: Number of line being processed.
  include_state: An _IncludeState instance in which the headers are inserted.
  function_state: A _FunctionState instance which counts function lines, etc.
  nesting_state: A NestingState instance which maintains information about
                 the current stack of nested blocks being parsed.
  error: A callable to which errors are reported, which takes 4 arguments:
         filename, line number, error level, and message
  extra_check_functions: An array of additional check functions that will be
                         run on each source line. Each function takes 4
                         arguments: filename, clean_lines, line, error

Definition at line 5941 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveMultiLineComments()

def cpplint.RemoveMultiLineComments (   filename,
  lines,
  error 
)
Removes multiline (c-style) comments from lines.

Definition at line 1563 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveMultiLineCommentsFromRange()

def cpplint.RemoveMultiLineCommentsFromRange (   lines,
  begin,
  end 
)
Clears a range of lines for multi-line comments.

Definition at line 1555 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ ReplaceAll()

def cpplint.ReplaceAll (   pattern,
  rep,
  s 
)
Replaces instances of pattern in a string with a replacement.

The compiled regex is kept in a cache shared by Match and Search.

Args:
  pattern: regex pattern
  rep: replacement text
  s: search string

Returns:
  string with replacements made (or original string if no replacements)

Definition at line 767 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ ResetNolintSuppressions()

def cpplint.ResetNolintSuppressions ( )
Resets the set of NOLINT suppressions to empty.

Definition at line 733 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ ReverseCloseExpression()

def cpplint.ReverseCloseExpression (   clean_lines,
  linenum,
  pos 
)
If input points to ) or } or ] or >, finds the position that opens it.

If lines[linenum][pos] points to a ')' or '}' or ']' or '>', finds the
linenum/pos that correspond to the opening 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 *at* the opening brace, or
  (line, 0, -1) if we never find the matching opening brace.  Note
  we ignore strings and comments when matching; and the line we
  return is the 'cleansed' line at linenum.

Definition at line 1889 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Search()

def cpplint.Search (   pattern,
  s 
)
Searches the string for the pattern, caching the compiled regexp.

Definition at line 785 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShouldCheckNamespaceIndentation()

def cpplint.ShouldCheckNamespaceIndentation (   nesting_state,
  is_namespace_indent_item,
  raw_lines_no_comments,
  linenum 
)
This method determines if we should apply our namespace indentation check.

Args:
  nesting_state: The current nesting state.
  is_namespace_indent_item: If we just put a new class on the stack, True.
    If the top of the stack is not a class, or we did not recently
    add the class, False.
  raw_lines_no_comments: The lines without the comments.
  linenum: The current line number we are processing.

Returns:
  True if we should apply our namespace indentation check. Currently, it
  only works for classes and namespaces inside of a namespace.

Definition at line 5899 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unicode_escape_decode()

def cpplint.unicode_escape_decode (   x)

Definition at line 670 of file ioda/tools/cpplint.py.

Here is the caller graph for this function:

◆ UpdateIncludeState()

def cpplint.UpdateIncludeState (   filename,
  include_dict,
  io = codecs 
)
Fill up the include_dict with new includes found from the file.

Args:
  filename: the name of the header to read.
  include_dict: a dictionary in which the headers are inserted.
  io: The io factory to use to read the file. Provided for testability.

Returns:
  True if a header was successfully added. False otherwise.

Definition at line 5630 of file ioda/tools/cpplint.py.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ _ALT_TOKEN_REPLACEMENT

dictionary cpplint._ALT_TOKEN_REPLACEMENT
private
Initial value:
1 = {
2  'and': '&&',
3  'bitor': '|',
4  'or': '||',
5  'xor': '^',
6  'compl': '~',
7  'bitand': '&',
8  'and_eq': '&=',
9  'or_eq': '|=',
10  'xor_eq': '^=',
11  'not': '!',
12  'not_eq': '!='
13  }

Definition at line 568 of file ioda/tools/cpplint.py.

◆ _ALT_TOKEN_REPLACEMENT_PATTERN

cpplint._ALT_TOKEN_REPLACEMENT_PATTERN
private
Initial value:
1 = re.compile(
2  r'[ =()](' + ('|'.join(_ALT_TOKEN_REPLACEMENT.keys())) + r')(?=[ (]|$)')

Definition at line 587 of file ioda/tools/cpplint.py.

◆ _BLOCK_ASM

int cpplint._BLOCK_ASM = 3
private

Definition at line 603 of file ioda/tools/cpplint.py.

◆ _C_SYS_HEADER

int cpplint._C_SYS_HEADER = 1
private

Definition at line 593 of file ioda/tools/cpplint.py.

◆ _CHECK_MACROS

list cpplint._CHECK_MACROS
private
Initial value:
1 = [
2  'DCHECK', 'CHECK',
3  'EXPECT_TRUE', 'ASSERT_TRUE',
4  'EXPECT_FALSE', 'ASSERT_FALSE',
5  ]

Definition at line 540 of file ioda/tools/cpplint.py.

◆ _CHECK_REPLACEMENT

cpplint._CHECK_REPLACEMENT = dict([(macro_var, {}) for macro_var in _CHECK_MACROS])
private

Definition at line 547 of file ioda/tools/cpplint.py.

◆ _CPP_HEADERS

cpplint._CPP_HEADERS
private

Definition at line 373 of file ioda/tools/cpplint.py.

◆ _CPP_SYS_HEADER

int cpplint._CPP_SYS_HEADER = 2
private

Definition at line 594 of file ioda/tools/cpplint.py.

◆ _cpplint_state

cpplint._cpplint_state = _CppLintState()
private

Definition at line 1121 of file ioda/tools/cpplint.py.

◆ _DEFAULT_C_SUPPRESSED_CATEGORIES

list cpplint._DEFAULT_C_SUPPRESSED_CATEGORIES
private
Initial value:
1 = [
2  'readability/casting',
3  ]

Definition at line 359 of file ioda/tools/cpplint.py.

◆ _DEFAULT_FILTERS

list cpplint._DEFAULT_FILTERS = ['-build/include_alpha']
private

Definition at line 356 of file ioda/tools/cpplint.py.

◆ _DEFAULT_KERNEL_SUPPRESSED_CATEGORIES

list cpplint._DEFAULT_KERNEL_SUPPRESSED_CATEGORIES
private
Initial value:
1 = [
2  'whitespace/tab',
3  ]

Definition at line 364 of file ioda/tools/cpplint.py.

◆ _EMPTY_CONDITIONAL_BODY_PATTERN

cpplint._EMPTY_CONDITIONAL_BODY_PATTERN = re.compile(r'^\s*$', re.DOTALL)
private

Definition at line 536 of file ioda/tools/cpplint.py.

◆ _END_ASM

int cpplint._END_ASM = 2
private

Definition at line 602 of file ioda/tools/cpplint.py.

◆ _ERROR_CATEGORIES

list cpplint._ERROR_CATEGORIES
private

Definition at line 274 of file ioda/tools/cpplint.py.

◆ _error_suppressions

dictionary cpplint._error_suppressions = {}
private

Definition at line 621 of file ioda/tools/cpplint.py.

◆ _excludes

cpplint._excludes = None
private

Definition at line 633 of file ioda/tools/cpplint.py.

◆ _global_error_suppressions

dictionary cpplint._global_error_suppressions = {}
private

Definition at line 678 of file ioda/tools/cpplint.py.

◆ _header_extensions

cpplint._header_extensions = set([])
private

Definition at line 59 of file ioda/tools/cpplint.py.

◆ _HEADERS_CONTAINING_TEMPLATES

tuple cpplint._HEADERS_CONTAINING_TEMPLATES
private

Definition at line 5502 of file ioda/tools/cpplint.py.

◆ _HEADERS_MAYBE_TEMPLATES

tuple cpplint._HEADERS_MAYBE_TEMPLATES
private
Initial value:
1 = (
2  ('<algorithm>', ('copy', 'max', 'min', 'min_element', 'sort',
3  'transform',
4  )),
5  ('<utility>', ('forward', 'make_pair', 'move', 'swap')),
6  )

Definition at line 5543 of file ioda/tools/cpplint.py.

◆ _INSIDE_ASM

int cpplint._INSIDE_ASM = 1
private

Definition at line 601 of file ioda/tools/cpplint.py.

◆ _LEGACY_ERROR_CATEGORIES

list cpplint._LEGACY_ERROR_CATEGORIES
private
Initial value:
1 = [
2  'readability/streams',
3  'readability/function',
4  ]

Definition at line 347 of file ioda/tools/cpplint.py.

◆ _LIKELY_MY_HEADER

int cpplint._LIKELY_MY_HEADER = 3
private

Definition at line 595 of file ioda/tools/cpplint.py.

◆ _line_length

int cpplint._line_length = 80
private

Definition at line 640 of file ioda/tools/cpplint.py.

◆ _MATCH_ASM

cpplint._MATCH_ASM
private
Initial value:
1 = re.compile(r'^\s*(?:asm|_asm|__asm|__asm__)'
2  r'(?:\s+(volatile|__volatile__))?'
3  r'\s*[{(]')

Definition at line 606 of file ioda/tools/cpplint.py.

◆ _NO_ASM

int cpplint._NO_ASM = 0
private

Definition at line 600 of file ioda/tools/cpplint.py.

◆ _OTHER_HEADER

int cpplint._OTHER_HEADER = 5
private

Definition at line 597 of file ioda/tools/cpplint.py.

◆ _POSSIBLE_MY_HEADER

int cpplint._POSSIBLE_MY_HEADER = 4
private

Definition at line 596 of file ioda/tools/cpplint.py.

◆ _quiet

bool cpplint._quiet = False
private

Definition at line 636 of file ioda/tools/cpplint.py.

◆ _RE_FIRST_COMPONENT

cpplint._RE_FIRST_COMPONENT = re.compile(r'^[^-_.]+')
private

Definition at line 4575 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_C_COMMENTS

string cpplint._RE_PATTERN_C_COMMENTS = r'/\*(?:[^*]|\*(?!/))*\*/'
private

Definition at line 1426 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_CLEANSE_LINE_C_COMMENTS

cpplint._RE_PATTERN_CLEANSE_LINE_C_COMMENTS
private
Initial value:
1 = re.compile(
2  r'(\s*' + _RE_PATTERN_C_COMMENTS + r'\s*$|' +
3  _RE_PATTERN_C_COMMENTS + r'\s+|' +
4  r'\s+' + _RE_PATTERN_C_COMMENTS + r'(?=\W)|' +
5  _RE_PATTERN_C_COMMENTS + r')')

Definition at line 1435 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_CLEANSE_LINE_ESCAPES

cpplint._RE_PATTERN_CLEANSE_LINE_ESCAPES
private
Initial value:
1 = re.compile(
2  r'\\([abfnrtv?"\\\']|\d+|x[0-9a-fA-F]+)')

Definition at line 1423 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_CONST_REF_PARAM

tuple cpplint._RE_PATTERN_CONST_REF_PARAM
private
Initial value:
1 = (
2  r'(?:.*\s*\bconst\s*&\s*' + _RE_PATTERN_IDENT +
3  r'|const\s+' + _RE_PATTERN_TYPE + r'\s*&\s*' + _RE_PATTERN_IDENT + r')')

Definition at line 4830 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_EXPLICIT_MAKEPAIR

cpplint._RE_PATTERN_EXPLICIT_MAKEPAIR = re.compile(r'\bmake_pair\s*<')
private

Definition at line 5758 of file ioda/tools/cpplint.py.

◆ _re_pattern_headers_maybe_templates

list cpplint._re_pattern_headers_maybe_templates = []
private

Definition at line 5552 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_IDENT

string cpplint._RE_PATTERN_IDENT = r'[_a-zA-Z]\w*'
private

Definition at line 4818 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_INCLUDE

cpplint._RE_PATTERN_INCLUDE = re.compile(r'^\s*#\s*include\s*([<"])([^>"]*)[>"].*$')
private

Definition at line 4569 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_INVALID_INCREMENT

cpplint._RE_PATTERN_INVALID_INCREMENT
private
Initial value:
1 = re.compile(
2  r'^\s*\*\w+(\+\+|--);')

Definition at line 2274 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_REF_PARAM

cpplint._RE_PATTERN_REF_PARAM
private
Initial value:
1 = re.compile(
2  r'(' + _RE_PATTERN_TYPE + r'(?:\s*(?:\bconst\b|[*]))*\s*'
3  r'&\s*' + _RE_PATTERN_IDENT + r')\s*(?:=[^,()]+)?[,)]')

Definition at line 4825 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_REF_STREAM_PARAM

tuple cpplint._RE_PATTERN_REF_STREAM_PARAM
private
Initial value:
1 = (
2  r'(?:.*stream\s*&\s*' + _RE_PATTERN_IDENT + r')')

Definition at line 4834 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_STRING

cpplint._RE_PATTERN_STRING = re.compile(r'\bstring\b')
private

Definition at line 5550 of file ioda/tools/cpplint.py.

◆ _re_pattern_templates

list cpplint._re_pattern_templates = []
private

Definition at line 5563 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_TODO

cpplint._RE_PATTERN_TODO = re.compile(r'^//(\s*)TODO(\(.+?\))?:?(\s|$)?')
private

Definition at line 3226 of file ioda/tools/cpplint.py.

◆ _RE_PATTERN_TYPE

tuple cpplint._RE_PATTERN_TYPE
private
Initial value:
1 = (
2  r'(?:const\s+)?(?:typename\s+|class\s+|struct\s+|union\s+|enum\s+)?'
3  r'(?:\w|'
4  r'\s*<(?:<(?:<[^<>]*>|[^<>])*>|[^<>])*>|'
5  r'::)+')

Definition at line 4819 of file ioda/tools/cpplint.py.

◆ _regexp_compile_cache

dictionary cpplint._regexp_compile_cache = {}
private

Definition at line 617 of file ioda/tools/cpplint.py.

◆ _repository

cpplint._repository = None
private

Definition at line 630 of file ioda/tools/cpplint.py.

◆ _root

cpplint._root = None
private

Definition at line 625 of file ioda/tools/cpplint.py.

◆ _SEARCH_C_FILE

cpplint._SEARCH_C_FILE
private
Initial value:
1 = re.compile(r'\b(?:LINT_C_FILE|'
2  r'vim?:\s*.*(\s*|:)filetype=c(\s*|:|$))')

Definition at line 611 of file ioda/tools/cpplint.py.

◆ _SEARCH_KERNEL_FILE

cpplint._SEARCH_KERNEL_FILE = re.compile(r'\b(?:LINT_KERNEL_FILE)')
private

Definition at line 615 of file ioda/tools/cpplint.py.

◆ _TEST_FILE_SUFFIX

string cpplint._TEST_FILE_SUFFIX = '(' + '|'.join(_test_suffixes) + r')$'
private

Definition at line 533 of file ioda/tools/cpplint.py.

◆ _test_suffixes

list cpplint._test_suffixes = ['_test', '_regtest', '_unittest']
private

Definition at line 532 of file ioda/tools/cpplint.py.

◆ _THIRD_PARTY_HEADERS_PATTERN

cpplint._THIRD_PARTY_HEADERS_PATTERN
private
Initial value:
1 = re.compile(
2  r'^(?:[^/]*[A-Z][^/]*\.h|lua\.h|lauxlib\.h|lualib\.h)$')

Definition at line 528 of file ioda/tools/cpplint.py.

◆ _THREADING_LIST

tuple cpplint._THREADING_LIST
private
Initial value:
1 = (
2  ('asctime(', 'asctime_r(', _UNSAFE_FUNC_PREFIX + r'asctime\([^)]+\)'),
3  ('ctime(', 'ctime_r(', _UNSAFE_FUNC_PREFIX + r'ctime\([^)]+\)'),
4  ('getgrgid(', 'getgrgid_r(', _UNSAFE_FUNC_PREFIX + r'getgrgid\([^)]+\)'),
5  ('getgrnam(', 'getgrnam_r(', _UNSAFE_FUNC_PREFIX + r'getgrnam\([^)]+\)'),
6  ('getlogin(', 'getlogin_r(', _UNSAFE_FUNC_PREFIX + r'getlogin\(\)'),
7  ('getpwnam(', 'getpwnam_r(', _UNSAFE_FUNC_PREFIX + r'getpwnam\([^)]+\)'),
8  ('getpwuid(', 'getpwuid_r(', _UNSAFE_FUNC_PREFIX + r'getpwuid\([^)]+\)'),
9  ('gmtime(', 'gmtime_r(', _UNSAFE_FUNC_PREFIX + r'gmtime\([^)]+\)'),
10  ('localtime(', 'localtime_r(', _UNSAFE_FUNC_PREFIX + r'localtime\([^)]+\)'),
11  ('rand(', 'rand_r(', _UNSAFE_FUNC_PREFIX + r'rand\(\)'),
12  ('strtok(', 'strtok_r(',
13  _UNSAFE_FUNC_PREFIX + r'strtok\([^)]+\)'),
14  ('ttyname(', 'ttyname_r(', _UNSAFE_FUNC_PREFIX + r'ttyname\([^)]+\)'),
15  )

Definition at line 2211 of file ioda/tools/cpplint.py.

◆ _TYPES

cpplint._TYPES
private
Initial value:
1 = re.compile(
2  r'^(?:'
3  # [dcl.type.simple]
4  r'(char(16_t|32_t)?)|wchar_t|'
5  r'bool|short|int|long|signed|unsigned|float|double|'
6  # [support.types]
7  r'(ptrdiff_t|size_t|max_align_t|nullptr_t)|'
8  # [cstdint.syn]
9  r'(u?int(_fast|_least)?(8|16|32|64)_t)|'
10  r'(u?int(max|ptr)_t)|'
11  r')$')

Definition at line 510 of file ioda/tools/cpplint.py.

◆ _UNSAFE_FUNC_PREFIX

string cpplint._UNSAFE_FUNC_PREFIX = r'(?:[-+*/=%^&|(<]\s*|>\s+)'
private

Definition at line 2210 of file ioda/tools/cpplint.py.

◆ _USAGE

string cpplint._USAGE
private

Definition at line 85 of file ioda/tools/cpplint.py.

◆ _valid_extensions

cpplint._valid_extensions = set([])
private

Definition at line 62 of file ioda/tools/cpplint.py.

◆ basestring

cpplint.basestring = str

Definition at line 652 of file ioda/tools/cpplint.py.

◆ iteritems

cpplint.iteritems = dict.iteritems

Definition at line 664 of file ioda/tools/cpplint.py.

◆ itervalues

cpplint.itervalues = dict.itervalues

Definition at line 663 of file ioda/tools/cpplint.py.

◆ long

cpplint.long = int

Definition at line 658 of file ioda/tools/cpplint.py.

◆ xrange

cpplint.xrange = range

Definition at line 646 of file ioda/tools/cpplint.py.