Skip to content

max_consecutive_blank_lines

Cap runs of blank lines to max. A blank line is empty or whitespace-only.


OptionTypeRequiredDefaultDescription
maxinteger (>= 0)yesMaximum number of blank lines allowed in a row. 0 means no blank lines at all.

Plus the common paths, level, id, and when fields. This table is generated from the JSON Schema; option types and defaults are authoritative.

A document with too many blank lines in a row

Section titled “A document with too many blank lines in a row”

The rule fires on this repository:

docs/
docs/clean.md
docs/gappy.md
docs/clean.md
a
b
docs/gappy.md
a
b

With this .alint.yml:

version: 1
rules:
- id: no-dbl-blank
kind: max_consecutive_blank_lines
paths: "docs/**/*.md"
max: 1
level: warning

alint check reports:

Terminal window
--- docs/gappy.md --------------------------------------------------------------
! warning no-dbl-blank
3:1 more than 1 consecutive blank line(s)
Summary (1 violation):
! 1 warning
0 passing * 1 failing

This repository is compliant:

docs/
docs/a.md
docs/b.md
docs/a.md
# title
first paragraph
second paragraph
docs/b.md
x
y

With this .alint.yml:

version: 1
rules:
- id: no-dbl-blank
kind: max_consecutive_blank_lines
paths: "docs/**/*.md"
max: 1
level: warning

alint check reports:

Terminal window
v All 1 rule(s) passed.