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

Function _CollectImpactedFiles

deps/v8/PRESUBMIT.py:205–218  ·  view source on GitHub ↗
(deps_file)

Source from the content-addressed store, hash-verified

203 return set(sum(list_of_lists, []))
204
205 def _CollectImpactedFiles(deps_file):
206 # TODO(liviurau): Do not walk paths twice. Then we have no duplicates.
207 # Higher level DEPS changes may dominate lower level DEPS changes.
208 # TODO(liviurau): Check if DEPS changed in the right way.
209 # 'include_rules' impact c++ files but 'vars' or 'deps' do not.
210 # Maybe we just eval both old and new DEPS content and check
211 # if the list are the same.
212 result = []
213 parent_dir = os.path.dirname(deps_file)
214 for relative_f in input_api.change.AllFiles(parent_dir):
215 abs_f = os.path.join(parent_dir, relative_f)
216 if CppChecker.IsCppFile(abs_f):
217 result.append(abs_f)
218 return result
219
220 class ImpactedFile(object):
221 """Duck type version of AffectedFile needed to check files under directories

Callers 1

Calls 2

joinMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…