MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / skip_ignored

Function skip_ignored

src/commoncode/resource.py:93–111  ·  view source on GitHub ↗

Return True if ``location`` should be skipped. Always ignore VCS and some special filetypes.

(location)

Source from the content-addressed store, hash-verified

91
92
93def skip_ignored(location):
94 """
95 Return True if ``location`` should be skipped.
96 Always ignore VCS and some special filetypes.
97 """
98 ignored = partial(ignore.is_ignored, ignores=ignore.ignores_VCS)
99
100 if TRACE_DEEP:
101 logger_debug()
102 logger_debug(
103 "Codebase.populate: walk: skip_ignored:",
104 location,
105 "ignored:",
106 ignored(location),
107 "is_special:",
108 is_special(location),
109 )
110
111 return is_special(location) or ignored(location)
112
113
114def is_ignored(location, includes=tuple(), excludes=tuple()):

Callers 3

is_ignoredFunction · 0.85
depth_walkFunction · 0.85
_create_resourcesMethod · 0.85

Calls 3

is_specialFunction · 0.90
partialFunction · 0.85
logger_debugFunction · 0.70

Tested by

no test coverage detected