Skip to content

fix: relax yamllint empty-lines max from 0 to 1 - #97

Merged
ineedjet merged 1 commit into
mainfrom
fix/yamllint-empty-lines
Jul 8, 2026
Merged

fix: relax yamllint empty-lines max from 0 to 1#97
ineedjet merged 1 commit into
mainfrom
fix/yamllint-empty-lines

Conversation

@ineedjet

@ineedjet ineedjet commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #96

Problem

Home Assistant auto-generates YAML with blank lines inside single-quoted scalars to encode \n:

text: '{{ now().strftime(''%H:%M'') }} some text

  '

yamllint's empty-lines: max: 0 flags this as an error. The format is not configurable in HA and reverts on every UI edit.

Change

empty-lines.max: 0max: 1

Still stricter than the yamllint default (max: 2) and still prevents multi-blank-line inline heredocs in YAML run: blocks. A single blank line inside a scalar is a legitimate \n encoding.

🤖 Generated with Claude Code

Allows blank lines inside single-quoted YAML scalars, which is how
Home Assistant encodes \n in auto-generated YAML (not configurable).
Still prevents multi-blank-line heredocs in YAML run blocks.

Closes #96

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ineedjet
ineedjet merged commit b67d8c9 into main Jul 8, 2026
1 check passed
@ineedjet
ineedjet deleted the fix/yamllint-empty-lines branch July 8, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

yamllint: empty-lines: max: 0 breaks auto-generated YAML from Home Assistant

1 participant