Skip to content

Comments

fix: use find instead of first when locating YAML keys with line numbers#14

Open
btrautmann wants to merge 3 commits intoBetterment:mainfrom
btrautmann:bt/fix/fix-yaml-violation-line
Open

fix: use find instead of first when locating YAML keys with line numbers#14
btrautmann wants to merge 3 commits intoBetterment:mainfrom
btrautmann:bt/fix/fix-yaml-violation-line

Conversation

@btrautmann
Copy link
Contributor

Summary

Fix incorrect line number reporting for lint violations when YAML keys with hyphens (e.g., runs-on) are normalized to underscores (runs_on)

The bug caused violations to be reported on the first key in a hash instead of the actual offending key

Test plan
Added spec to verify line numbers are preserved when normalizing hyphenated keys that are not first in the hash
All 59 tests pass

@btrautmann btrautmann force-pushed the bt/fix/fix-yaml-violation-line branch from 066c1a0 to 55ea63b Compare February 6, 2026 22:07
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.

1 participant