MCPcopy Index your code
hub / github.com/cpplint/cpplint / SetFilters

Method SetFilters

cpplint.py:1437–1453  ·  view source on GitHub ↗

Sets the error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "+whitespace/indent"). Each filter should start with + or -; else we die.

(self, filters)

Source from the content-addressed store, hash-verified

1435 self.counting = counting_style
1436
1437 def SetFilters(self, filters):
1438 """Sets the error-message filters.
1439
1440 These filters are applied when deciding whether to emit a given
1441 error message.
1442
1443 Args:
1444 filters: A string of comma-separated filters (eg "+whitespace/indent").
1445 Each filter should start with + or -; else we die.
1446
1447 Raises:
1448 ValueError: The comma-separated filters did not all start with '+' or '-'.
1449 E.g. "-,+whitespace,-whitespace/indent,whitespace/badfilter"
1450 """
1451 # Default filters always have less priority than the flag ones.
1452 self.filters = _DEFAULT_FILTERS[:]
1453 self.AddFilters(filters)
1454
1455 def AddFilters(self, filters):
1456 """Adds more filters to the existing list of error-message filters."""

Callers 6

testFilterMethod · 0.80
testDefaultFilterMethod · 0.80
setUpFunction · 0.80
_SetFiltersFunction · 0.80

Calls 1

AddFiltersMethod · 0.95

Tested by 5

testFilterMethod · 0.64
testDefaultFilterMethod · 0.64
setUpFunction · 0.64