Skip to content

Content

Rule kinds in the Content family. Each rule below links to its own page with options, an example, and any auto-fix support.

RuleDescription
file_content_matchesFile contents must contain at least one match for a regex.
file_content_forbiddenFile contents must NOT match a regex.
file_headerThe first N lines must match a regex (line-oriented).
file_starts_withByte-level prefix / suffix check.
file_ends_withByte-level prefix / suffix check.
file_hashContent SHA-256 must equal the expected digest.
file_max_sizeFile must be at most max_bytes in size.
file_min_sizeFile must be at least min_bytes in size.
file_min_linesFile must have at least min_lines lines (\n-terminated, with an unterminated trailing segment counting as one more, wc -l semantics).
file_max_linesFile must have at most max_lines lines, using the same accounting as file_min_lines.
file_footerThe configured number of final lines in each file in scope must match a regex.
file_shebangFirst line of each file in scope must match the shebang regex.
file_is_textContent is detected as text (magic bytes + UTF-8 validity check), fails on binary files matched by paths.
file_is_asciiEvery byte in the file must be < 0x80 (pure ASCII), except codepoints listed in allow:.
editorconfig_conformsEnforce selected formatting properties from the repository's own .editorconfig files without repeating those values in .alint.yml.
pinned_referencesRequire executable references in supported CI and container files to identify immutable artifacts rather than mutable tags or branches.
markdown_images_have_altRequire every live CommonMark image to have non-empty rendered alt text.
markdown_required_headingsRequire the complete rendered heading sequence to match an ordered headings template.
markdown_no_duplicate_headingsReject a later Markdown heading whose generated base anchor collides with an earlier heading.
spdx_identifier_validValidate every SPDX-License-Identifier: value as a strict SPDX license expression.
executable_has_shebangEvery file with +x set must begin with #!.
shebang_has_executableEvery file starting with #! must have +x set.
commented_out_codeHeuristic detector for blocks of commented-out source code (as opposed to prose comments, license headers, doc comments, or ASCII banners).
markdown_links_resolveValidate live Markdown link, image, and reference-definition destinations against the repository tree.
markdown_fragments_resolveRequire every live local Markdown link fragment to name a heading anchor in its resolved target document.