Skip to content

file_min_size

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).

OptionTypeRequiredDefaultDescription
min_bytesinteger (>= 0)yesMinimum 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.

The rule fires on this repository:

healthy.md
tiny.txt
healthy.md
# Healthy doc
This document has more than fifty bytes of content, well
above the minimum. A short README reads like a stub.
tiny.txt
too short

With this .alint.yml:

version: 1
rules:
- id: min-50
kind: file_min_size
paths: ["**/*.txt", "**/*.md"]
min_bytes: 50
level: warning

alint check reports:

Terminal window
--- tiny.txt -------------------------------------------------------------------
! warning min-50
file below 50 byte(s) (actual: 10)
Summary (1 violation):
! 1 warning
0 passing * 1 failing

This repository is compliant:

README.md
README.md
# demo
A short but non-stub README.

With this .alint.yml:

version: 1
rules:
- id: min-10
kind: file_min_size
paths: "**/*.md"
min_bytes: 10
level: warning

alint check reports:

Terminal window
v All 1 rule(s) passed.