Skip to content

executable_has_shebang

Every file with +x set must begin with #!. Catches plain text files accidentally marked executable.

This rule takes no kind-specific options.

Plus the common paths, level, id, and when fields. This table is generated from the JSON Schema; option types and defaults are authoritative.

The rule fires on this repository:

README.md
scripts/
scripts/run (executable)

With this .alint.yml:

version: 1
rules:
- id: exec-shebang
kind: executable_has_shebang
paths: "scripts/**"
level: error

This repository is compliant:

README.md
scripts/
scripts/hello.sh (executable)

With this .alint.yml:

version: 1
rules:
- id: exec-shebang
kind: executable_has_shebang
paths: "scripts/**"
level: error