From e388b1441fd6c128faf8d3a8b525fc65fdf5c84d Mon Sep 17 00:00:00 2001 From: MichiRecRoom <1008889+LikeLakers2@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:21:00 -0400 Subject: [PATCH] We've replaced this code, so there's no need to keep it around - it'll just make understanding where we are a bit harder. --- .../ticked_file_enforcement.py | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/tools/ticked_file_enforcement/ticked_file_enforcement.py b/tools/ticked_file_enforcement/ticked_file_enforcement.py index 457e4ea7e6c6..31ecc64eba53 100644 --- a/tools/ticked_file_enforcement/ticked_file_enforcement.py +++ b/tools/ticked_file_enforcement/ticked_file_enforcement.py @@ -289,49 +289,6 @@ def get_base_scanning_directory_file_list(): if on_github: print(f"::endgroup::") -fail_no_include = False - -if len(scannable_files) == 0: - post_error(f"No files were found in {scannable_directory}. Ticked File Enforcement has failed!") - sys.exit(1) - -for code_file in scannable_files: - dm_path = "" - - if subdirectories is True: - dm_path = code_file.replace('/', '\\') - else: - dm_path = os.path.basename(code_file) - - included = f"#include \"{dm_path}\"" in lines - - forbid_include = False - for forbidable in FORBIDDEN_INCLUDES: - if not fnmatch.fnmatch(code_file, forbidable): - continue - - forbid_include = True - - if included: - post_error(f"{dm_path} should NOT be included.") - fail_no_include = True - - if forbid_include: - continue - - if not included: - if(dm_path == file_reference_basename): - continue - - if(dm_path in excluded_files): - continue - - post_error(f"Missing include for {dm_path}.") - fail_no_include = True - -if fail_no_include: - sys.exit(1) - def compare_lines(a, b): # Remove initial include as well as the final quotation mark a = a[len("#include \""):-1].lower()