-
Notifications
You must be signed in to change notification settings - Fork 200
Add a fast path for the check-shebang-scripts-are-executable hook #1834
Copy link
Copy link
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
This makes sure that a file that starts with #! has the executable bit set. What's important to note here is that this has to work correctly on filesystems that don't have an executable bit, too. This means that you need to check the executable bit in the Git index on e.g. Windows.
FYI, prek does support a similarly named check-executables-have-shebangs hook (https://prek.j178.dev/builtin/#check-executables-have-shebangs) - that hook basically does the opposite of what the check-shebang-scripts-are-executable hook proposed here does - it checks that a non-binary file with an executable bit actually starts with #!.
Link to description:
https://github.com/pre-commit/pre-commit-hooks#check-shebang-scripts-are-executable
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers