no_symlinks
Flag tracked paths that are symbolic links. Symlinks are a portability footgun: Windows NTFS needs admin rights to create them, git-for-Windows can silently flatten them, CI runners vary.
Caveat: a symlink whose target escapes the repository root (link -> /etc) is pruned by the walker before indexing, so it is not flagged — the rule reports in-tree symlinks (to files or directories), not escaping ones. The escaping symlink can’t be read out-of-root either (path confinement blocks that), so this is a reporting gap, not a disclosure one; recording escaping symlinks safely is a tracked follow-up.
Fix: file_remove — unlinks the symlink; the target is untouched.
Options
Section titled “Options”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.
Example
Section titled “Example”A repository containing a symlink
Section titled “A repository containing a symlink”The rule fires on this repository:
README.mdlatest.rs -> src/main.rssrc/src/main.rs# demofn main() {}With this .alint.yml:
version: 1rules: - id: no-links kind: no_symlinks paths: "**" level: erroralint check reports:
--- latest.rs ------------------------------------------------------------------ x error no-links path is a symbolic link
Summary (1 violation): x 1 error 0 passing * 1 failingA repository with no symlinks
Section titled “A repository with no symlinks”This repository is compliant:
README.mdsrc/src/lib.rssrc/main.rs# demofn main() {}With this .alint.yml:
version: 1rules: - id: no-links kind: no_symlinks paths: "**" level: erroralint check reports:
v All 1 rule(s) passed.