MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / _ShouldPrintError

Function _ShouldPrintError

engine/3rdparty/tinyobjloader/deps/cpplint.py:1064–1089  ·  view source on GitHub ↗

If confidence >= verbose, category passes filter and is not suppressed.

(category, confidence, linenum)

Source from the content-addressed store, hash-verified

1062
1063
1064def _ShouldPrintError(category, confidence, linenum):
1065 """If confidence >= verbose, category passes filter and is not suppressed."""
1066
1067 # There are three ways we might decide not to print an error message:
1068 # a "NOLINT(category)" comment appears in the source,
1069 # the verbosity level isn't high enough, or the filters filter it out.
1070 if IsErrorSuppressedByNolint(category, linenum):
1071 return False
1072
1073 if confidence < _cpplint_state.verbose_level:
1074 return False
1075
1076 is_filtered = False
1077 for one_filter in _Filters():
1078 if one_filter.startswith('-'):
1079 if category.startswith(one_filter[1:]):
1080 is_filtered = True
1081 elif one_filter.startswith('+'):
1082 if category.startswith(one_filter[1:]):
1083 is_filtered = False
1084 else:
1085 assert False # should have been checked for in SetFilter.
1086 if is_filtered:
1087 return False
1088
1089 return True
1090
1091
1092def Error(filename, linenum, category, confidence, message):

Callers 1

ErrorFunction · 0.85

Calls 2

_FiltersFunction · 0.85

Tested by

no test coverage detected