MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / IsErrorSuppressedByNolint

Function IsErrorSuppressedByNolint

src/tests/coding/cpplint.py:1011–1026  ·  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

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

Callers 1

_ShouldPrintErrorFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected