Skip to main content

Module no_personal_path

Module no_personal_path 

Source
Expand description

Gate: a document carries no path into a person’s home directory.

An absolute home path is the author’s machine leaking into a file every reader receives: it resolves for one person and misleads everyone else. The remedy is always available — write ~/, $HOME/, or a bracketed placeholder — so this reports the shape rather than guessing at intent.

Two exemptions, both by purpose rather than by path. A file whose whole job is one person’s environment — .env, .envrc.local, and the .example copies that show where those values go — is where a home path belongs, so it is skipped by name. And a file git ignores never reaches this gate at all, because pre-commit passes only what the repository tracks.

Code is not stripped before matching. A fenced example command carrying a real home directory is exactly the leak this reports, so the rule’s own documents spell the forbidden shape with a placeholder segment instead.

Constants§

CITES
The rules this gate can cite.

Functions§

run
Judge every file pre-commit passed.