MCPcopy Index your code
hub / github.com/cpplint/cpplint / _FilterExcludedFiles

Function _FilterExcludedFiles

cpplint.py:7827–7837  ·  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

7825
7826
7827def _FilterExcludedFiles(fnames):
7828 """Filters out files listed in the --exclude command line switch. File paths
7829 in the switch are evaluated relative to the current working directory
7830 """
7831 exclude_paths = [os.path.abspath(f) for f in _excludes]
7832 # because globbing does not work recursively, exclude all subpath of all excluded entries
7833 return [
7834 f
7835 for f in fnames
7836 if not any(e for e in exclude_paths if _IsParentOrSame(e, os.path.abspath(f)))
7837 ]
7838
7839
7840def _IsParentOrSame(parent, child):

Callers 1

ParseArgumentsFunction · 0.85

Calls 1

_IsParentOrSameFunction · 0.85

Tested by

no test coverage detected