Skip to content

Commit

Permalink
I forgot to make this error also cause TFE to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
LikeLakers2 committed Jul 4, 2024
1 parent b947b95 commit 2d22b49
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tools/ticked_file_enforcement/ticked_file_enforcement.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ def perform_exit():
print(f"::group::Ticked File Enforcement [{includes_file}]")
print(f"Processing `{includes_file}`...")

# A marker to denote if Ticked File Enforcement has failed. We'll continue processing and print out
# as much as we can (to help avoid requiring multiple runs), but at the end we will denote that
# Ticked File Enforcement has found errors.
tfe_has_failed = False

# Before anything else, ensure our schema is even valid.
## The includes file must point to an existing file.
if not includes_file.is_file():
Expand Down Expand Up @@ -228,6 +233,7 @@ def get_base_scanning_directory_file_list():
# path relative to our repo root.
file_path = includes_file.parent.joinpath(file_path)
if file_path in includes_found:
tfe_has_failed = True
post_error(f"The file `{file_path}` is included multiple times.")
continue
includes_found.append(file_path)
Expand Down Expand Up @@ -256,11 +262,6 @@ def get_base_scanning_directory_file_list():
includes_found_set = set(includes_found)

### RESULTS PROCESSING START ###
# A marker to denote if Ticked File Enforcement has failed. We'll continue processing and print out
# as much as we can (to help avoid requiring multiple runs), but at the end we will denote that
# Ticked File Enforcement has found errors.
tfe_has_failed = False

for file_path in includes_found_set:
# Does the includes file have any includes that match the exempt include globs? This is not
# necessarily an error, but we give out a warning for it all the same.
Expand Down

0 comments on commit 2d22b49

Please sign in to comment.