mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Flatten the math directory (#657)
This commit is contained in:
parent
81b25e578d
commit
86f0bc936d
8
.github/workflows/cpplint_modified_files.yml
vendored
8
.github/workflows/cpplint_modified_files.yml
vendored
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user