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

Function _FilterExcludedFiles

tools/cpplint.py:7978–7988  ·  view source on GitHub ↗

Filters out files listed in the --exclude command line switch. File paths in the switch are evaluated relative to the current working directory

(fnames)

Source from the content-addressed store, hash-verified

7976
7977
7978def _FilterExcludedFiles(fnames):
7979 """Filters out files listed in the --exclude command line switch. File paths
7980 in the switch are evaluated relative to the current working directory
7981 """
7982 exclude_paths = [os.path.abspath(f) for f in _excludes]
7983 # because globbing does not work recursively, exclude all subpath of all excluded entries
7984 return [
7985 f
7986 for f in fnames
7987 if not any(e for e in exclude_paths if _IsParentOrSame(e, os.path.abspath(f)))
7988 ]
7989
7990
7991def _IsParentOrSame(parent, child):

Callers 1

ParseArgumentsFunction · 0.85

Calls 1

_IsParentOrSameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…