From 86f0bc936da5fad7d1c4173159da5db17855285c Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Thu, 28 Nov 2019 14:34:13 +0100 Subject: [PATCH] Flatten the math directory (#657) --- .github/workflows/cpplint_modified_files.yml | 8 ++++---- math/{Prime_Factorization => }/README.md | 0 .../Power_Huge.cpp => power_for_huge_numbers.cpp} | 0 .../primefactorization.cpp => prime_factorization.cpp} | 0 ...ieve_of_Eratosthenes.cpp => sieve_of_eratosthenes.cpp} | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename math/{Prime_Factorization => }/README.md (100%) rename math/{Power_For_Huge_Num/Power_Huge.cpp => power_for_huge_numbers.cpp} (100%) rename math/{Prime_Factorization/primefactorization.cpp => prime_factorization.cpp} (100%) rename math/{sieve_of_Eratosthenes.cpp => sieve_of_eratosthenes.cpp} (100%) diff --git a/.github/workflows/cpplint_modified_files.yml b/.github/workflows/cpplint_modified_files.yml index d1d850c1d..dcf2499e6 100644 --- a/.github/workflows/cpplint_modified_files.yml +++ b/.github/workflows/cpplint_modified_files.yml @@ -30,19 +30,19 @@ jobs: print("cpplint:") print(subprocess.check_output(["cpplint"] + cpp_files).decode("utf-8")) - upper_files = [file for file in cpp_files if os.path.basename(file) != os.path.basename(file).lower()] + upper_files = [file for file in cpp_files if file != file.lower()] if upper_files: print("{} files contain uppercase characters:".format(len(upper_files))) print("\n".join(upper_files) + "\n") - space_files = [file for file in cpp_files if " " in os.path.basename(file) or "-" in file] + space_files = [file for file in cpp_files if " " in file or "-" in file] if space_files: print("{} files contain space or dash characters:".format(len(space_files))) print("\n".join(space_files) + "\n") - nodir_files = [file for file in cpp_files if os.sep not in file] + nodir_files = [file for file in cpp_files if file.count(os.sep) != 1] if nodir_files: - print("{} files are not in a directory:".format(len(nodir_files))) + print("{} files are not in one and only one directory:".format(len(nodir_files))) print("\n".join(nodir_files) + "\n") bad_files = len(upper_files + space_files + nodir_files) diff --git a/math/Prime_Factorization/README.md b/math/README.md similarity index 100% rename from math/Prime_Factorization/README.md rename to math/README.md diff --git a/math/Power_For_Huge_Num/Power_Huge.cpp b/math/power_for_huge_numbers.cpp similarity index 100% rename from math/Power_For_Huge_Num/Power_Huge.cpp rename to math/power_for_huge_numbers.cpp diff --git a/math/Prime_Factorization/primefactorization.cpp b/math/prime_factorization.cpp similarity index 100% rename from math/Prime_Factorization/primefactorization.cpp rename to math/prime_factorization.cpp diff --git a/math/sieve_of_Eratosthenes.cpp b/math/sieve_of_eratosthenes.cpp similarity index 100% rename from math/sieve_of_Eratosthenes.cpp rename to math/sieve_of_eratosthenes.cpp