Added
ryl formatformats YAML in place, checks or previews changes, and formats YAML
embedded in Markdown with--markdown.
(#519,
#520,
#538,
#605)[format]controls indentation, line endings, quotes, collections, comments,
blank lines, folding and document markers. Unset indentation detects the file's
existing width;line-ending = "auto"keeps its prevailing line ending.
(#550,
#606)--output-formatselects output forcheckandformat --check; onlycheck
also accepts-f/--format. (#605)- Editor Format Document uses
ryl format, including for embedded YAML in Markdown.
(#583) - Top-level TOML
line-lengthandindent-widthprovide shared defaults for lint
and format. (#521) check --fixcan repaircolonsandhyphensspacing.
(#524)fold-long-linescan wrap plain, quoted and folded block scalars.
(#523,
#541,
#536)sequence-styleandmapping-stylecan convert collections between flow and
block forms;indent-widthreindents block collections.
(#544,
#551,
#545)- Formatting can choose quotes that avoid escapes and configure brace spacing,
comment spacing and blank-line limits.
(#539,
#540,
#546)
Changed
- Ambiguous block scalars leave the whole YAML file, or the Markdown region holding
them, unchanged by formatting and safe fixes apart from key ordering; both commands
name the file, line and reason on stderr. - When formatting would change a Markdown region with mixed line endings,
format
names the refusal and--check/--difffail; a fence-boundary refusal is also named.
(#713) - Indentation conflict warnings identify
indent-widthas a TOML key and point
YAML-configured users to config migration.
(#713) formatandcheck --fixcontinue after a file write fails, report the file,
and exit2after processing the remaining inputs.
(#714)check --fixandryl formatfinish unterminated block scalars with a newline
and, when configured, a document end marker, following the YAML 1.2 reference parser.
Adding a marker removes value-neutral indentation spaces on a final blank
block-scalar line, but leaves a root explicit-indent marker unfixed when its
final spaces carry value and no preserving marker append is available.
(#712,
#715)- ryl TOML now separates
[lint]and[format]. Runryl --migrate-configs
to preview existing configs, then add--migrate-writeto update them.
(#508) - Top-level TOML
ignoreandignore-from-fileare deprecated. Replace them with
excludeandexclude-from-file, or use--migrate-configs --migrate-write.
(#608) - yamllint YAML configuration is deprecated. Convert project configs with
ryl --migrate-configs --migrate-writeand user-global config with
ryl --migrate-user-config --migrate-write; a later release will remove YAML
config loading. (#562) -daccepts inline TOML; legacy YAML preset names still work with a warning.
(#562)formatpreserves document-start markers by default, including files migrated
from yamllint'sdefaultpreset.
(#584)- Editor formatting and Fix All warn when lint settings conflict with formatting.
(#615) quoted-stringsandformatkeep quotes needed by YAML 1.1 readers, while a
declared%YAML 1.1follows the lint policy for redundant quotes.
(#535,
#560,
#604)- Formatter previews reuse formatting and indentation detection, reducing work
on repeated--checkand--diffpasses.
(#561,
#616)
Fixed
comments-indentationnow reports, and--fixmoves, a comment indented to the
continuation of a multi-line quoted scalar, matching yamllint.- A leading shebang or
#cloud-configstays before an inserted document marker.
(#531) check --fixandformatadd requested start and end markers to each document
in a stream. (#566,
#587)- Editor diagnostics and fix actions stay positioned after a leading BOM.
(#588) quoted-strings --fixkeeps quotes on flow keys whose colon follows whitespace
or a comment, preserving the key's meaning.
(#555)- Fixes preserve blank block-scalar content and scalar values when headers have
comments; editor disable-line actions work inside blank-only scalars.
(#542,
#543,
#563,
#573) - Formatting leaves lines after empty folded scalars intact and retains comments
on dash lines. (#559,
#569) - Block-scalar diagnostics no longer misread an apostrophe in a plain key as a
quote. (#571) - Formatting aligns block-scalar bodies and detects indentation around document
BOMs and explicit keys. (#591,
#626,
#664) - Multiline double-quoted scalars can use single quotes when no required escapes
prevent conversion. (#662) - Formatting preserves encoded stdin and BOMs; encoded
check --diffinput counts
pending fixes. (#617,
#620) format --checkwrites empty reports when no files or changes are selected.
(#614)- Formatter previews reject conflicting output targets before reading inputs.
(#631) - Config migration leaves YAML sources shadowed by active TOML in place.
(#632) - Config migration preserves disabled formatting choices and handles custom YAML
paths without guessing an ambiguous user-global ignore file.
(#556,
#557) - Path matching respects Windows and macOS ASCII casing, and Windows diff paths apply
withgit apply -p0. (#653,
#655) - Formatting preserves Markdown fence boundaries and block scalar values while
normalizing safe whitespace. (#633,
#654,
#661,
#669)
Migrating from yamllint
The new formatter has no yamllint counterpart. For check, the existing deliberate
differences are listed below so a migration can account for each one; see the
examples and rationale.
| Difference | Migration step |
|---|---|
| No implicit default rules | Enable --enable ALL or a TOML preset.
|
| Inline directives | Use # ryl; keep # yamllint standalone.
|
| Colon in anchor names | Review : in names; ryl follows YAML grammar.
|
| Duplicate input paths | Expect one check per file, even when inputs overlap. |
Bare \r line breaks
| Normalize to LF or CRLF if relying on yamllint's line count. |
| Document-prefix BOMs | Remove embedded BOMs if another parser rejects them. |
| CRLF scalar blanks | Review block-scalar indentation. |
%YAML directives
| Set the version or quote sensitive values. |
| Block scalar header comments | Review comments diagnostics.
|
per-line-ignores
| Configure the ryl-only option in TOML, not yamllint YAML. |
| Open-block comments | Keep default or set allow-any-open-indent in TOML.
|
| Own-line dash | Keep default or set dash-on-own-line in TOML.
|
| Inline-comment gap | Keep default or set max-spaces-from-content in TOML.
|
| JUnit and GitLab reports | Select ryl's output format for CI. |
| ryl-native user-global config | Run ryl --migrate-user-config --migrate-write.
|
YAMLLINT_CONFIG_FILE rejects TOML
| Use YAML, or pass TOML with -c.
|