Skip to main content

Module shebang_has_executable

Module shebang_has_executable 

Source
Expand description

shebang_has_executable — every file that starts with #! must have the Unix +x bit set.

The inverse of executable_has_shebang: catches scripts that were committed with a shebang but where the executable bit was never set (or got clobbered by git add --chmod=-x, cp, a tarball round-trip, etc.). Running them requires bash script.sh instead of ./script.sh, which is usually not the author’s intent.

Non-Unix platforms: rule is a no-op. No fix op — chmod auto-apply is deferred to a later release (see ROADMAP).

Structs§

ShebangHasExecutableRule

Functions§

build