MCPcopy Index your code
hub / github.com/nodejs/node / DetectFilesToChange

Method DetectFilesToChange

deps/v8/tools/v8_presubmit.py:353–373  ·  view source on GitHub ↗
(self, files)

Source from the content-addressed store, hash-verified

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
376class CppLintProcessor(CacheableSourceFileProcessor):

Callers 1

ProcessFilesMethod · 0.95

Calls 9

GetProcessorCommandMethod · 0.95
GetProcessorWorkerMethod · 0.95
printFunction · 0.70
getMethod · 0.65
enumerateFunction · 0.50
terminateMethod · 0.45
joinMethod · 0.45
exitMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected