extend to support a comma-delimited list of patterns

This commit is contained in:
Timothy Morey
2021-09-20 12:45:07 -04:00
parent 2bc73c5967
commit bec4b579f8
3 changed files with 17 additions and 5 deletions

View File

@@ -607,10 +607,11 @@ class TodoParser(object):
return projects
def _should_ignore(self, file):
ignore_pattern = os.getenv('INPUT_IGNORE', None)
if ignore_pattern:
if re.match(ignore_pattern, file):
return True
ignore_patterns = os.getenv('INPUT_IGNORE', None)
if ignore_patterns:
for pattern in filter(None, [pattern.strip() for pattern in ignore_patterns.split(',')]):
if re.match(pattern, file):
return True
return False