max_consecutive_blank_lines
Cap runs of blank lines to max. A blank line is empty or whitespace-only.
Options
Section titled “Options”| Option | Type | Required | Default | Description |
|---|---|---|---|---|
max | integer (>= 0) | yes | Maximum 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.
Example
Section titled “Example”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.mddocs/gappy.mda
ba
bWith this .alint.yml:
version: 1rules: - id: no-dbl-blank kind: max_consecutive_blank_lines paths: "docs/**/*.md" max: 1 level: warningalint check reports:
--- docs/gappy.md -------------------------------------------------------------- ! warning no-dbl-blank 3:1 more than 1 consecutive blank line(s)
Summary (1 violation): ! 1 warning 0 passing * 1 failingBlank-line runs stay within the limit
Section titled “Blank-line runs stay within the limit”This repository is compliant:
docs/docs/a.mddocs/b.md# title
first paragraph
second paragraphx
yWith this .alint.yml:
version: 1rules: - id: no-dbl-blank kind: max_consecutive_blank_lines paths: "docs/**/*.md" max: 1 level: warningalint check reports:
v All 1 rule(s) passed.