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

Function IsErrorSuppressedByNolint

analytical_engine/misc/cpplint.py:1015–1030  ·  view source on GitHub ↗

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 nu

(category, linenum)

Source from the content-addressed store, hash-verified

1013
1014
1015def IsErrorSuppressedByNolint(category, linenum):
1016 """Returns true if the specified error category is suppressed on this line.
1017
1018 Consults the global error_suppressions map populated by
1019 ParseNolintSuppressions/ProcessGlobalSuppresions/ResetNolintSuppressions.
1020
1021 Args:
1022 category: str, the category of the error.
1023 linenum: int, the current line number.
1024 Returns:
1025 bool, True iff the error should be suppressed due to a NOLINT comment or
1026 global suppression.
1027 """
1028 return (_global_error_suppressions.get(category, False) or
1029 linenum in _error_suppressions.get(category, set()) or
1030 linenum in _error_suppressions.get(None, set()))
1031
1032
1033def Match(pattern, s):

Callers 1

_ShouldPrintErrorFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected