def _ShouldPrintError()

in cpplint.py [0:0]


def _ShouldPrintError(category, confidence, linenum):
    """If confidence >= verbose, category passes filter and is not suppressed."""

    # There are three ways we might decide not to print an error message:
    # a "NOLINT(category)" comment appears in the source,
    # the verbosity level isn't high enough, or the filters filter it out.
    if IsErrorSuppressedByNolint(category, linenum):
        return False

    if confidence < _cpplint_state.verbose_level:
        return False

    is_filtered = False
    for one_filter in _Filters():
        if one_filter.startswith('-'):
            if category.startswith(one_filter[1:]):
                is_filtered = True
        elif one_filter.startswith('+'):
            if category.startswith(one_filter[1:]):
                is_filtered = False
        else:
            assert False  # should have been checked for in SetFilter.
    if is_filtered:
        return False

    return True