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

Method PerformMultiLineLint

cpplint_unittest.py:168–178  ·  view source on GitHub ↗
(self, code)

Source from the content-addressed store, hash-verified

166
167 # Perform lint over multiple lines and return the error message.
168 def PerformMultiLineLint(self, code):
169 error_collector = ErrorCollector(self.assertTrue)
170 lines = code.split("\n")
171 cpplint.RemoveMultiLineComments("foo.h", lines, error_collector)
172 lines = cpplint.CleansedLines(lines)
173 nesting_state = cpplint.NestingState()
174 for i in range(lines.NumLines()):
175 nesting_state.Update("foo.h", lines, i, error_collector)
176 cpplint.CheckStyle("foo.h", lines, i, "h", nesting_state, error_collector)
177 cpplint.CheckForNonStandardConstructs("foo.h", lines, i, nesting_state, error_collector)
178 return error_collector.Results()
179
180 # Similar to PerformMultiLineLint, but calls CheckLanguage instead of
181 # CheckForNonStandardConstructs

Callers 2

TestMultiLineLintMethod · 0.95
TestMultiLineLintREMethod · 0.95

Calls 4

NumLinesMethod · 0.95
UpdateMethod · 0.95
ResultsMethod · 0.95
ErrorCollectorClass · 0.85

Tested by

no test coverage detected