Added
- The top-level TOML setting
target-version = "1.1" | "1.2"names the oldest YAML
version whose readers must loadryl formatand--fixoutput to the same values.
The default"1.1"keeps today's behaviour;"1.2"drops the quotes only a YAML 1.1
reader needs ('no','1_000') and makestruthyflag only the 1.2 booleans.
(#576) - The ryl-only
yaml-directiverule requires a%YAMLdirective on every document.
Its safe fix stamps%YAML 1.2undertarget-version = "1.2"; go-yaml and
Kubernetes reject such files, so the rule page warns against enabling it for them.
Naming it besidedocument-startwithpresent = falseis a config error; when only
ALLenables it, the explicitpresent = falsewins, and ryl warns and skips it.
(#576) - The ryl-only
schema-dependent-valuesrule flags plain scalars that YAML 1.1 and 1.2
read differently: timestamps, sexagesimal numbers, underscored,0band signed0x
numbers,08-style leading zeros, andy/n. It reports only in documents with no
%YAMLdirective undertarget-version = "1.1".
(#600) - The README and installation docs list Homebrew (
brew install ryl) and the
community-maintained Scoop bucket.
(#895)
Changed
octal-valuesflags a signed implicit octal such as-0777, which YAML 1.1 reads
as -511 and YAML 1.2 as -777; yamllint skips it.- A document that declares
%YAML 1.2now drops the quotes only a YAML 1.1 reader
needs, underquoted-stringsandryl format, whatevertarget-versionsays.
(#576) ryl checkandryl format --check/--diffwrite each file's results in input
order as the run goes, so peak memory no longer grows with the file count. At
20,000 files,check --enable ALLpeaks at 44 MiB (was 202 MiB), GitLab output at
42 MiB (was 966 MiB) andformat --checkat 33 MiB (was 94 MiB). JUnit output still
holds its body until the end, now at 286 MiB (was 448 MiB). A run that aborts on an
error now leaves the output of the files before it, and withYAMLLINT_FILE_ENCODING
set, each file's warning now precedes its diagnostics.
(#830)- On Windows and macOS, ryl uses mimalloc as its allocator, making
checkand
format3-27% faster beyond a single small file, for up to twice the peak memory.
Linux keeps the system allocator. (#886) - A directory walk skips
.git,.hg,.svnand.jjdirectories; ruff skips.git,
.hgand.svn, and yamllint lints YAML inside all four. A VCS directory or file
named as an input is still linted. Walking reads each entry's type without astat,
socheckon a 31,000-file Kubernetes clone takes 1.10 s (was 1.30 s), or 1.17 s
(was 1.21 s) without.git.
(#888) - Release binaries and wheels ship with symbols stripped, as ruff's do, cutting the
x86_64 Linux binary from 9.9 MB to 8.7 MB.
(#887) - The result cache hashes with BLAKE3 and stores entries in a binary format, making a
warmcheck3-15% faster. Caches written by older versions are ignored.
(#889) empty-valuesno longer slows quadratically on large files with many violations:
check --enable ALLon a 9.4 MiB file takes 0.87 s (was 5.7 s).
(#890)checkno longer slows quadratically on a long line holding many flow-collection
entries:check --enable ALLon a 0.5 MiB one-line flow sequence takes 0.23 s (was
50 s).format --markdownno longer re-parses the whole document for every rewritten
YAML fence: 4 MiB of fences formats in 0.74 s (was 33 s).
(#897)checkreads flow punctuation and indentation from the parser's tokens instead of
rescanning the text or copying the tokens, making it 18-23% faster with 23-30% lower
peak memory on 2-10 MiB files;formatis 7-8% faster.
(#872)- The token tape stores 16 bytes per token instead of 36, cutting peak memory by 6-15%
on 2-10 MiB files at the same speed.
(#899)
Fixed
quoted-stringsandryl formatkeep the quotes on spellings go-yaml reads as
floats:'08','1e5'and'-.5'under%YAML 1.1, and'0_8'and'1_0e5'
under any version but 1.2.
(#576)braces,bracketsandformatno longer read a#inside a verbatim tag such as
!<tag:foo#bar>as a comment, so spaces before the closing]or}are now
flagged and removed. (#898)