MCPcopy Index your code
hub / github.com/nodejs/node / ProcessGlobalSuppressions

Function ProcessGlobalSuppressions

tools/cpplint.py:1207–1223  ·  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

1205
1206
1207def ProcessGlobalSuppressions(filename: str, lines: list[str]) -> None:
1208 """Updates the list of global error suppressions.
1209
1210 Parses any lint directives in the file that have global effect.
1211
1212 Args:
1213 lines: An array of strings, each representing a line of the file, with the
1214 last element being empty if the file is terminated with a newline.
1215 filename: str, the name of the input file.
1216 """
1217 for line in lines:
1218 if _SEARCH_C_FILE.search(line) or filename.lower().endswith((".c", ".cu")):
1219 for category in _DEFAULT_C_SUPPRESSED_CATEGORIES:
1220 _error_suppressions.AddGlobalSuppression(category)
1221 if _SEARCH_KERNEL_FILE.search(line):
1222 for category in _DEFAULT_KERNEL_SUPPRESSED_CATEGORIES:
1223 _error_suppressions.AddGlobalSuppression(category)
1224
1225
1226def ResetNolintSuppressions():

Callers 1

ProcessFileDataFunction · 0.85

Calls 2

AddGlobalSuppressionMethod · 0.80
searchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…