maint and tests scripts should not have implementation language in filename
IMO putting .sh
or .py
or whatever on the end of the filename for an executable script is an antipattern.
Putting the language a script is written in, into the filename, means that if you later decide that it ought to be rewritten in Python or whatever, you have to edit all call sites, trip up humans' finger macros, etc. Many projects end up this way with scripts called yada.sh
that are written in something else.
The language a script is written in can be discovered from the #!
.
zealot:arti> git-ls-files | grep '\.py$' | xargs ls -l | grep rwx
-rwxrwxr-x 1 ian ian 3120 Jan 21 11:58 maint/add_warning.py
-rwxrwxr-x 1 ian ian 2534 Jan 5 10:12 maint/check_toposort.py
-rwxrwxr-x 1 ian ian 582 Jan 5 10:12 maint/list_crates.py
-rwxrwxr-x 1 ian ian 3298 Jan 5 10:12 maint/postprocess_coverage.py
zealot:arti> git-ls-files | grep '\.sh$' | xargs ls -l | grep rwx
-rwxrwxr-x 1 ian ian 694 Jan 5 10:12 maint/binary_size.sh
-rwxrwxr-x 1 ian ian 3048 Jan 5 10:12 maint/cargo_audit.sh
-rwxrwxr-x 1 ian ian 322 Jan 21 16:17 maint/changed_crates.sh
-rwxrwxr-x 1 ian ian 1696 Jan 5 10:12 maint/check_licenses.sh
-rwxrwxr-x 1 ian ian 2315 Jan 21 16:17 maint/coverage.sh
-rwxrwxr-x 1 ian ian 488 Jan 5 10:12 maint/docker_reproducible_build.sh
-rwxrwxr-x 1 ian ian 638 Jan 5 10:12 maint/fuzz_it_all.sh
-rwxrwxr-x 1 ian ian 165 Jan 5 10:12 maint/readmes.sh
-rwxrwxr-x 1 ian ian 4076 Jan 5 10:12 maint/reproducible_build.sh
-rwxrwxr-x 1 ian ian 1022 Jan 5 10:12 maint/thanks.sh
-rwxrwxr-x 1 ian ian 3943 Jan 28 17:29 maint/with_coverage.sh
-rwxrwxr-x 1 ian ian 1344 Jan 5 10:12 tests/chutney/arti-bench.sh
-rwxrwxr-x 1 ian ian 1321 Jan 28 17:29 tests/chutney/setup.sh
-rwxrwxr-x 1 ian ian 733 Jan 5 10:12 tests/chutney/teardown.sh
zealot:arti>