(self, file_name, code)
| 180 | # Similar to PerformMultiLineLint, but calls CheckLanguage instead of |
| 181 | # CheckForNonStandardConstructs |
| 182 | def PerformLanguageRulesCheck(self, file_name, code): |
| 183 | error_collector = ErrorCollector(self.assertTrue) |
| 184 | include_state = cpplint._IncludeState() |
| 185 | nesting_state = cpplint.NestingState() |
| 186 | lines = code.split("\n") |
| 187 | cpplint.RemoveMultiLineComments(file_name, lines, error_collector) |
| 188 | lines = cpplint.CleansedLines(lines) |
| 189 | ext = file_name[file_name.rfind(".") + 1 :] |
| 190 | for i in range(lines.NumLines()): |
| 191 | cpplint.CheckLanguage( |
| 192 | file_name, lines, i, ext, include_state, nesting_state, error_collector |
| 193 | ) |
| 194 | return error_collector.Results() |
| 195 | |
| 196 | def PerformFunctionLengthsCheck(self, code): |
| 197 | """Perform Lint function length check on block of code and return warnings. |
no test coverage detected