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

Method testFilter

cpplint_unittest.py:4989–5001  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4987 cpplint._line_length = old_line_length
4988
4989 def testFilter(self):
4990 old_filters = cpplint._cpplint_state.filters
4991 try:
4992 cpplint._cpplint_state.SetFilters("-,+whitespace,-whitespace/indent")
4993 self.TestLint(
4994 "// Hello there ",
4995 "Line ends in whitespace. Consider deleting these extra spaces."
4996 " [whitespace/end_of_line] [4]",
4997 )
4998 self.TestLint("int a = (int)1.0;", "")
4999 self.TestLint(" weird opening space", "")
5000 finally:
5001 cpplint._cpplint_state.filters = old_filters
5002
5003 def testDefaultFilter(self):
5004 default_filters = cpplint._DEFAULT_FILTERS

Callers

nothing calls this directly

Calls 2

SetFiltersMethod · 0.80
TestLintMethod · 0.80

Tested by

no test coverage detected