MCPcopy Index your code
hub / github.com/cpplint/cpplint / ProcessGlobalSuppressions

Function ProcessGlobalSuppressions

cpplint.py:1167–1183  ·  view source on GitHub ↗

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

(filename: str, lines: list[str])

Source from the content-addressed store, hash-verified

1165
1166
1167def ProcessGlobalSuppressions(filename: str, lines: list[str]) -> None:
1168 """Updates the list of global error suppressions.
1169
1170 Parses any lint directives in the file that have global effect.
1171
1172 Args:
1173 lines: An array of strings, each representing a line of the file, with the
1174 last element being empty if the file is terminated with a newline.
1175 filename: str, the name of the input file.
1176 """
1177 for line in lines:
1178 if _SEARCH_C_FILE.search(line) or filename.lower().endswith((".c", ".cu")):
1179 for category in _DEFAULT_C_SUPPRESSED_CATEGORIES:
1180 _error_suppressions.AddGlobalSuppression(category)
1181 if _SEARCH_KERNEL_FILE.search(line):
1182 for category in _DEFAULT_KERNEL_SUPPRESSED_CATEGORIES:
1183 _error_suppressions.AddGlobalSuppression(category)
1184
1185
1186def ResetNolintSuppressions():

Callers 1

ProcessFileDataFunction · 0.85

Calls 1

AddGlobalSuppressionMethod · 0.80

Tested by

no test coverage detected