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

Method RunOnFiles

deps/v8/tools/v8_presubmit.py:259–278  ·  view source on GitHub ↗

Runs processor only on affected files.

(self, files)

Source from the content-addressed store, hash-verified

257 return self.ProcessFiles(all_files)
258
259 def RunOnFiles(self, files):
260 """Runs processor only on affected files."""
261
262 # Helper for getting directory pieces.
263 dirs = lambda f: dirname(f).split(os.sep)
264
265 # Path offsets where to look (to be in sync with RunOnPath).
266 # Normalize '.' to check for it with str.startswith.
267 search_paths = [('' if p == '.' else p) for p in self.GetPathsToSearch()]
268
269 all_files = [
270 f.AbsoluteLocalPath()
271 for f in files
272 if (not self.IgnoreFile(f.LocalPath()) and
273 self.IsRelevant(f.LocalPath()) and
274 all(not self.IgnoreDir(d) for d in dirs(f.LocalPath())) and
275 any(map(f.LocalPath().startswith, search_paths)))
276 ]
277
278 return self.ProcessFiles(all_files)
279
280 def IgnoreDir(self, name):
281 return (name.startswith('.') or

Callers 1

_V8PresubmitChecksFunction · 0.80

Calls 9

IgnoreFileMethod · 0.95
IgnoreDirMethod · 0.95
dirnameFunction · 0.90
LocalPathMethod · 0.80
mapFunction · 0.50
splitMethod · 0.45
GetPathsToSearchMethod · 0.45
IsRelevantMethod · 0.45
ProcessFilesMethod · 0.45

Tested by

no test coverage detected