(self, code)
| 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 |
no test coverage detected