File must be at least min_bytes in size. Catches placeholder / stub files that pass existence checks but add no information (a 0-byte LICENSE, a README.md with only a title).
Options
Section titled “Options”| Option | Type | Required | Default | Description |
|---|---|---|---|---|
min_bytes | integer (>= 0) | yes | Minimum allowed file size in bytes. |
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 stub file below the byte floor
Section titled “A stub file below the byte floor”The rule fires on this repository:
healthy.mdtiny.txt# Healthy doc
This document has more than fifty bytes of content, wellabove the minimum. A short README reads like a stub.too shortWith this .alint.yml:
version: 1rules: - id: min-50 kind: file_min_size paths: ["**/*.txt", "**/*.md"] min_bytes: 50 level: warningalint check reports:
--- tiny.txt ------------------------------------------------------------------- ! warning min-50 file below 50 byte(s) (actual: 10)
Summary (1 violation): ! 1 warning 0 passing * 1 failingA file that clears the byte floor
Section titled “A file that clears the byte floor”This repository is compliant:
README.md# demo
A short but non-stub README.With this .alint.yml:
version: 1rules: - id: min-10 kind: file_min_size paths: "**/*.md" min_bytes: 10 level: warningalint check reports:
v All 1 rule(s) passed.