(self, file_path)
| 5184 | ) |
| 5185 | |
| 5186 | def GetBuildHeaderGuardPreprocessorSymbol(self, file_path): |
| 5187 | # Figure out the expected header guard by processing an empty file. |
| 5188 | error_collector = ErrorCollector(self.assertTrue) |
| 5189 | cpplint.ProcessFileData(file_path, "h", [], error_collector) |
| 5190 | for error in error_collector.ResultList(): |
| 5191 | matched = re.search( |
| 5192 | "No #ifndef header guard found, suggested CPP variable is: ([A-Z0-9_]+)", error |
| 5193 | ) |
| 5194 | if matched is not None: |
| 5195 | return matched.group(1) |
| 5196 | return None |
| 5197 | |
| 5198 | def testBuildHeaderGuard(self): |
| 5199 | file_path = "mydir/foo.h" |
no test coverage detected