MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / ProcessLine

Function ProcessLine

engine/3rdparty/tinyobjloader/deps/cpplint.py:5906–5949  ·  view source on GitHub ↗

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: N

(filename, file_extension, clean_lines, line,
                include_state, function_state, nesting_state, error,
                extra_check_functions=[])

Source from the content-addressed store, hash-verified

5904
5905
5906def ProcessLine(filename, file_extension, clean_lines, line,
5907 include_state, function_state, nesting_state, error,
5908 extra_check_functions=[]):
5909 """Processes a single line in the file.
5910
5911 Args:
5912 filename: Filename of the file that is being processed.
5913 file_extension: The extension (dot not included) of the file.
5914 clean_lines: An array of strings, each representing a line of the file,
5915 with comments stripped.
5916 line: Number of line being processed.
5917 include_state: An _IncludeState instance in which the headers are inserted.
5918 function_state: A _FunctionState instance which counts function lines, etc.
5919 nesting_state: A NestingState instance which maintains information about
5920 the current stack of nested blocks being parsed.
5921 error: A callable to which errors are reported, which takes 4 arguments:
5922 filename, line number, error level, and message
5923 extra_check_functions: An array of additional check functions that will be
5924 run on each source line. Each function takes 4
5925 arguments: filename, clean_lines, line, error
5926 """
5927 raw_lines = clean_lines.raw_lines
5928 ParseNolintSuppressions(filename, raw_lines[line], line, error)
5929 nesting_state.Update(filename, clean_lines, line, error)
5930 CheckForNamespaceIndentation(filename, nesting_state, clean_lines, line,
5931 error)
5932 if nesting_state.InAsmBlock(): return
5933 CheckForFunctionLengths(filename, clean_lines, line, function_state, error)
5934 CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error)
5935 CheckStyle(filename, clean_lines, line, file_extension, nesting_state, error)
5936 CheckLanguage(filename, clean_lines, line, file_extension, include_state,
5937 nesting_state, error)
5938 CheckForNonConstReference(filename, clean_lines, line, nesting_state, error)
5939 CheckForNonStandardConstructs(filename, clean_lines, line,
5940 nesting_state, error)
5941 CheckVlogArguments(filename, clean_lines, line, error)
5942 CheckPosixThreading(filename, clean_lines, line, error)
5943 CheckInvalidIncrement(filename, clean_lines, line, error)
5944 CheckMakePairUsesDeduction(filename, clean_lines, line, error)
5945 CheckDefaultLambdaCaptures(filename, clean_lines, line, error)
5946 CheckRedundantVirtual(filename, clean_lines, line, error)
5947 CheckRedundantOverrideOrFinal(filename, clean_lines, line, error)
5948 for check_fn in extra_check_functions:
5949 check_fn(filename, clean_lines, line, error)
5950
5951def FlagCxx11Features(filename, clean_lines, linenum, error):
5952 """Flag those c++11 features that we only allow in certain places.

Callers 1

ProcessFileDataFunction · 0.85

Calls 15

ParseNolintSuppressionsFunction · 0.85
CheckForFunctionLengthsFunction · 0.85
CheckStyleFunction · 0.85
CheckLanguageFunction · 0.85
CheckVlogArgumentsFunction · 0.85
CheckPosixThreadingFunction · 0.85
CheckInvalidIncrementFunction · 0.85

Tested by

no test coverage detected