MCPcopy Create free account
hub / github.com/alibaba/GraphScope / ProcessGlobalSuppresions

Function ProcessGlobalSuppresions

analytical_engine/misc/cpplint.py:991–1006  ·  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.

(lines)

Source from the content-addressed store, hash-verified

989
990
991def ProcessGlobalSuppresions(lines):
992 """Updates the list of global error suppressions.
993
994 Parses any lint directives in the file that have global effect.
995
996 Args:
997 lines: An array of strings, each representing a line of the file, with the
998 last element being empty if the file is terminated with a newline.
999 """
1000 for line in lines:
1001 if _SEARCH_C_FILE.search(line):
1002 for category in _DEFAULT_C_SUPPRESSED_CATEGORIES:
1003 _global_error_suppressions[category] = True
1004 if _SEARCH_KERNEL_FILE.search(line):
1005 for category in _DEFAULT_KERNEL_SUPPRESSED_CATEGORIES:
1006 _global_error_suppressions[category] = True
1007
1008
1009def ResetNolintSuppressions():

Callers 1

ProcessFileDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected