From 235f0a9eebb9b24b9aa78ef479f07f6482f7afea Mon Sep 17 00:00:00 2001 From: David Leal Date: Sun, 31 Oct 2021 10:56:01 -0600 Subject: [PATCH] Revert "fix: #898 another fix for Awesome workflow nodir_files problem (#901)" (#907) This reverts commit b8e3c3833bf4e3dd8a5cd468612f89f42ce8ad07. --- .github/workflows/awesome_workflow.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/awesome_workflow.yml b/.github/workflows/awesome_workflow.yml index 279c8eef..276b1875 100644 --- a/.github/workflows/awesome_workflow.yml +++ b/.github/workflows/awesome_workflow.yml @@ -136,12 +136,13 @@ jobs: print(f"{len(space_files)} files contain space or dash characters:") print("\n".join(space_files) + "\n") - nodir_files = [file for file in cpp_files if file.count(os.sep) != 1 and "project_euler" not in file and "leetcode" not in file and "data_structure" not in file] - if nodir_files: + nodir_files = [file for file in cpp_files if file.count(os.sep) != 1 and "project_euler" not in file and "data_structure" not in file] + nodir_file_bad_files = len(nodir_files) - 1 + if nodir_file_bad_files: print(f"{len(nodir_files)} files are not in one and only one directory:") print("\n".join(nodir_files) + "\n") - - bad_files = len(upper_files + space_files + nodir_files) + + bad_files = nodir_file_bad_files + len(upper_files + space_files) if bad_files: sys.exit(bad_files)