colons: Prevent error when space before is mandatory
In the rare case when the key before `:` is an alias (e.g. `{*x : 4}`), the space before `:` is required (although this requirement is not enforced by PyYAML), the reason being that a colon can be part of an anchor name. Consequently, this commit adapts the `colons` rule to avoid failures when this happens. See this comment from Tina Müller for more details: https://github.com/adrienverge/yamllint/pull/550#discussion_r1155297373pull/564/head
parent
e90e0a0eb5
commit
b92fc9cb31
Loading…
Reference in New Issue