MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / IsErrorSuppressedByNolint

Function IsErrorSuppressedByNolint

steps/cpplint.py:1026–1041  ·  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

1024
1025
1026def IsErrorSuppressedByNolint(category, linenum):
1027 """Returns true if the specified error category is suppressed on this line.
1028
1029 Consults the global error_suppressions map populated by
1030 ParseNolintSuppressions/ProcessGlobalSuppresions/ResetNolintSuppressions.
1031
1032 Args:
1033 category: str, the category of the error.
1034 linenum: int, the current line number.
1035 Returns:
1036 bool, True iff the error should be suppressed due to a NOLINT comment or
1037 global suppression.
1038 """
1039 return (_global_error_suppressions.get(category, False) or
1040 linenum in _error_suppressions.get(category, set()) or
1041 linenum in _error_suppressions.get(None, set()))
1042
1043
1044def Match(pattern, s):

Callers 1

_ShouldPrintErrorFunction · 0.85

Calls 2

setClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected