(self, files)
| 351 | return files_requiring_changes == [] |
| 352 | |
| 353 | def DetectFilesToChange(self, files): |
| 354 | command = self.GetProcessorCommand() |
| 355 | worker = self.GetProcessorWorker() |
| 356 | |
| 357 | commands = [command + [file] for file in files] |
| 358 | count = multiprocessing.cpu_count() |
| 359 | pool = multiprocessing.Pool(count) |
| 360 | try: |
| 361 | results = pool.map_async(worker, commands).get(timeout=360) |
| 362 | except KeyboardInterrupt: |
| 363 | print("\nCaught KeyboardInterrupt, terminating workers.") |
| 364 | pool.terminate() |
| 365 | pool.join() |
| 366 | sys.exit(1) |
| 367 | |
| 368 | unformatted_files = [] |
| 369 | for index, errors in enumerate(results): |
| 370 | if errors > 0: |
| 371 | unformatted_files.append(files[index]) |
| 372 | |
| 373 | return unformatted_files |
| 374 | |
| 375 | |
| 376 | class CppLintProcessor(CacheableSourceFileProcessor): |
no test coverage detected