Content is detected as text (magic bytes + UTF-8 validity check) — fails on binary files matched by paths.
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 source file with a stray null byte
Section titled “A source file with a stray null byte”The rule fires on this repository:
src/src/accidental_blob.rssrc/clean.rs(binary content, 11 bytes)pub fn ok() {}With this .alint.yml:
version: 1rules: - id: src-is-text kind: file_is_text paths: "src/**" level: erroralint check reports:
--- src/accidental_blob.rs ----------------------------------------------------- x error src-is-text file is detected as binary; text is required here
Summary (1 violation): x 1 error 0 passing * 1 failingEvery source file is UTF-8 text
Section titled “Every source file is UTF-8 text”This repository is compliant:
src/src/lib.rssrc/main.rspub fn ok() {}fn main() {}With this .alint.yml:
version: 1rules: - id: src-is-text kind: file_is_text paths: "src/**" level: erroralint check reports:
v All 1 rule(s) passed.