Closed dan-cohn closed 4 years ago
Thanks, Dan, for reporting this!
I've created https://github.com/jumanjihouse/pre-commit-hooks/pull/54 to fix this. It works for me, including fixtures that match the path names you provided, so I'm going to merge the PR.
If you run into any other corner cases, please reopen this (or a new issue if it won't let you reopen).
Thanks again, -paul
ps. the fix is in tag 2.0.2 https://github.com/jumanjihouse/pre-commit-hooks/releases/tag/2.0.2
@jumanjiman Thank you for fixing this so quickly!
Both script-must-have-extension and script-must-not-have-extension fail on files that don't have an extension but do have a dot in the path leading up to them. Here are some pathological examples:
my_dir/.foo/executable_script
# script-must-not-have-extension complainsmy_dir/.foo/non_executable_script
# script-must-have-extension does not complainScripts that begin with a dot are also problematic. For example:
my_dir/.script