Added
[format] document-start = "remove"removes the first optional---, as does
document-startlint fixing withpresent = false. yamlfmt and yamlfix imports
map their marker-removal settings to the shared safe removal policy.- Import static Prettier, yamlfmt, dprint pretty_yaml and yamlfix configs with
--migrate-configs, including representable defaults. Use--migrate-from
when multiple source formatters apply; the error lists accepted flag values.
Unsupported settings produce warnings; skipped source cleanup names the reason
and leaves the file in place to delete by hand.
Imports apply supported YAML-only Prettier overrides, preserve supported source
exclusions, follow local dprint inheritance, and report lint/format conflicts.
--migrate-stdoutexports TOML beside existing targets without overwriting them;
skipped sources and refused writes exit2, as do warnings under--strict.
(#660) - Opt into source suppression-comment conversion with
--migrate-directives,
independently or alongside config import. Preview diffs before applying with
--migrate-write; uncertain scopes remain unchanged with warnings.
Runs report converted and retained comment totals plus skipped file counts.
Official pretty_yaml0.5.xignore markers are supported alongside0.6.0.
Prettier config imports name the command for converting ignore comments.
(#660) - Formatter-only
# ryl format-ignoreprotects the next YAML node, including
descendants;format-disable/format-enableprotect a region. Lint checks
and lint fixes remain active.
(#917) [format] keep-quotes = trueretains optional scalar quotes whilequote-style
chooses their character. (#916)[format] prose-wrap = "preserve" | "always" | "never"controls prose reflow
while preserving values and paragraph breaks. Existingfold-long-lines
retains split-only behavior; configuring both settings is an error.
(#915)- Under
target-version = "1.2",yaml-directivereports a document that declares
%YAML 1.1or1.0, and its safe fix migrates the document to 1.2 in one edit:
yesbecomestrue,0777becomes0o777,22:22becomes1342,1_000becomes
1000, and the directive becomes%YAML 1.2. A document holding a date, or a value
PyYAML reads as a string and other 1.1 readers do not (08,1e5,y), keeps its
report naming the first blocking value and its location, and is left as is.
(#365) yaml-directivegainspresent = false, which forbids%YAMLdirectives:
its safe fix removes a%YAML 1.2one, and migrates a%YAML 1.1document before
removing its directive. It runs besidedocument-startwithpresent = false.
(#365)- Unsafe fixes, as in ruff:
--unsafe-fixes(orunsafe-fixes = true) applies them
withcheck --fixand--diff, andlint.extend-safe-fixespromotes one rule's.
truthy,octal-valuesandschema-dependent-valuesgain one for a plain scalar
YAML 1.1 and 1.2 read differently in an undeclared document: the new top-level
source-version(default"1.2") picks the reading kept, soyesbecomes"yes"
and0777becomes777, or under"1.1"trueand511.ryl checkcounts the
ones left out ("N unsafe fixes available with--fix --unsafe-fixes"), and
ryl serveroffers them as quick fixes outside "Fix all".
(#365) [format] sequence-expandandmapping-expand("preserve","auto","always",
"never", default"preserve") set the line breaks inside flow collections: one line,
or prettier's one entry per line with a trailing comma, or"auto"to pick one line
where it fitsline-length. (#649)[format] property-order("preserve","anchor-first","tag-first", default
"preserve") writes each node's anchor and tag in one order;"tag-first"matches
prettier. (#913)
Deprecated
- Legacy
yamllintsuppression comments emit one CLI deprecation notice per run,
with a count of affected files. Aliases remain supported throughout 0.29.x;
convert active aliases with--migrate-directives.
(#660)
Changed
- Lint
document-startwithpresent = falsenow safely strips the optional
first---duringryl check --fix. Required document boundaries stay intact. - Behaviour change for
sequence-style = "flow"/mapping-style = "flow": a flow
collection too long forline-lengthon one line, whichryl formatused to leave
alone, now becomes block, and each collection nested in it stays flow only where it
fits. Underbrace-spacing = truethe fit now counts the braces' padding.
(#649) indentationexpects a block body after a value's anchor and tag
(a: &x !!map)indent-widthpast its key, as after a lone anchor or tag, rather
than at the anchor's column as yamllint does;ryl formatre-indents such bodies
once; a parallel yamllint run will disagree on the body indentation.
(#913)ryl checksorts each file's diagnostics by line, column, then rule ID, as yamllint
and ruff do, rather than grouping them by rule. Files stay in input order.
(#905)ryl check --fixparses each file once and skips fixers with nothing to fix. With
nothing to fix it now costs about whatryl checkdoes, where it took four to eight
times as long; files that need fixes take about a third less work.
Fixed
- Yamllint YAML configs now resolve booleans and numbers with upstream's YAML 1.1
semantics, includingyes/no, legacy octal and sexagesimal integers, during
linting and config migration. - Config errors name the rule, offending option and invalid value, including accepted
values for option unions, and retain TOML line and column locations. - Omitted mapping keys (
: value) no longer trigger false indentation errors or
preventryl formatfrom formatting the surrounding document, including when
their values have anchors or tags. - With
fold-long-linesanddash-on-own-line,ryl formatno longer folds a scalar
whose trailing comment keeps its mapping on the-line, which let a second run move
the mapping below the-. (#913) - With
fold-long-lines, adisable-line rule:line-lengthcomment above a flow
collection thatsequence-styleormapping-styleturns into block form no longer
stopsryl formatfolding the first entry, which a second run then folded.
(#906) - A tab after a compact mapping key's colon (
- key:\t|) no longer stopsryl format
trimming the block scalar's whitespace-only lines until a second run, nor hides them
fromtrailing-spaces. (#906) trailing-spacesno longer reports a block scalar's whitespace-only content lines when
a:inside an anchor or tag before it (- &a: |+) looked like a compact key.
(#906)- A root-anchored
excludepattern now skips its file when the input is an absolute
path under a relative-cconfig, is spelled with..or an interior./, or
sits below a-cconfig in a subdirectory; such files were linted and formatted.