Skip to content

indent_style

Every non-blank line indents with the configured style (tabs or spaces). When style: spaces, optional width enforces a multiple.

- id: yaml-2sp
kind: indent_style
paths: "**/*.yml"
style: spaces
width: 2
level: warning

Check-only: tab-width-aware reindentation is language-specific. Pair with your editor’s “reindent on save” for remediation.

OptionTypeRequiredDefaultDescription
styleone of tabs | spacesyesRequired indentation style: tabs rejects any leading space; spaces rejects any leading tab.
widthinteger (>= 1)nullWhen style: spaces, the leading-space count on every non-blank line must be a multiple of this. Ignored for style: tabs.

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