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

Method SetFilters

steps/cpplint.py:1308–1324  ·  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. Raises: ValueE

(self, filters)

Source from the content-addressed store, hash-verified

1306 self.counting = counting_style
1307
1308 def SetFilters(self, filters):
1309 """Sets the error-message filters.
1310
1311 These filters are applied when deciding whether to emit a given
1312 error message.
1313
1314 Args:
1315 filters: A string of comma-separated filters (eg "+whitespace/indent").
1316 Each filter should start with + or -; else we die.
1317
1318 Raises:
1319 ValueError: The comma-separated filters did not all start with '+' or '-'.
1320 E.g. "-,+whitespace,-whitespace/indent,whitespace/badfilter"
1321 """
1322 # Default filters always have less priority than the flag ones.
1323 self.filters = _DEFAULT_FILTERS[:]
1324 self.AddFilters(filters)
1325
1326 def AddFilters(self, filters):
1327 """ Adds more filters to the existing list of error-message filters. """

Callers 1

_SetFiltersFunction · 0.80

Calls 1

AddFiltersMethod · 0.95

Tested by

no test coverage detected