Skip to content

executable_bit

Assert every file in scope either has the +x bit set (require: true) or does not (require: false).

No fix op — chmod auto-apply is deferred.

OptionTypeRequiredDefaultDescription
requirebooleanyestrue → +x must be set; false → +x must NOT be set.

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

A docs file that is unexpectedly executable

Section titled “A docs file that is unexpectedly executable”

The rule fires on this repository:

README.md
docs/
docs/generate.sh (executable)
README.md
# demo
docs/generate.sh
echo generated

With this .alint.yml:

version: 1
rules:
- id: docs-not-exec
kind: executable_bit
paths: "docs/**"
level: error
require: false

alint check reports:

Terminal window
--- docs/generate.sh -----------------------------------------------------------
x error docs-not-exec
mode is 0o100755; +x bit must not be set
Summary (1 violation):
x 1 error
0 passing * 1 failing

This repository is compliant:

README.md
docs/
docs/intro.md
README.md
# demo
docs/intro.md
hello

With this .alint.yml:

version: 1
rules:
- id: docs-not-exec
kind: executable_bit
paths: "docs/**"
level: error
require: false

alint check reports:

Terminal window
v All 1 rule(s) passed.