From bef56034912732bc2946fe19164fca63caf29e66 Mon Sep 17 00:00:00 2001 From: Derek Lewis Date: Mon, 7 Sep 2026 02:53:19 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=F0=9F=94=A7=EF=BC=9Ac?= =?UTF-8?q?heck=20the=20files=20the=20checks=20were=20skipping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ported from OpenINF/.github, where these are part of 7504c8a and e93b403. Two globs were not describing what they meant. The YAML tasks matched pnpm-lock.yaml, so every `verify.yaml` and `format.yaml` ran prettier over a 178 KB generated file. It is written by pnpm, not by hand, and a lockfile that failed a style check is not a thing anybody would fix by editing it. Excluded, the YAML tasks read ten files rather than eleven. The spelling glob named `json` but neither `json5` nor `jsonc`, so .renovaterc.json5, biome.jsonc, .markdownlint-cli2.jsonc and .markdownlint.jsonc were never spell-checked. Not a hypothetical gap: adding the two extensions took cspell from 123 files to 127 and turned up `syle` for `style` in a comment in .markdownlint.jsonc, which is fixed here. The same comment in OpenINF/.github is spelt correctly, so this was ours alone. One thing to watch when landing this alongside #1884: that branch passes the spelling glob to `matched()` as a second, literal copy of the same string. The two hunks are far enough apart to merge without complaint, and whichever lands second leaves the literal in `matched()` naming the older extension list. It reads only in a failure message, but it should be brought back into agreement. Signed-off-by: Derek Lewis Assisted-by: Claude-Code:claude-opus-5 --- .markdownlint.jsonc | 2 +- build/tasks/format/format-yaml.mts | 2 ++ build/tasks/verify/verify-spelling.mts | 2 +- build/tasks/verify/verify-yaml.mts | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc index 6aa71e823..51839ac9e 100644 --- a/.markdownlint.jsonc +++ b/.markdownlint.jsonc @@ -233,7 +233,7 @@ // MD048/code-fence-style - Code fence style "MD048": { - // Code fence syle + // Code fence style "style": "consistent" } } diff --git a/build/tasks/format/format-yaml.mts b/build/tasks/format/format-yaml.mts index ca20dee19..9ab7cc43c 100644 --- a/build/tasks/format/format-yaml.mts +++ b/build/tasks/format/format-yaml.mts @@ -12,6 +12,8 @@ const yamlFiles = await glob([ '**/*.yaml', '!_site/', '!node_modules/', + // Written by pnpm, not by hand. + '!pnpm-lock.yaml', ]); let exitCode = 0; diff --git a/build/tasks/verify/verify-spelling.mts b/build/tasks/verify/verify-spelling.mts index 1d510d0ef..a894712c6 100644 --- a/build/tasks/verify/verify-spelling.mts +++ b/build/tasks/verify/verify-spelling.mts @@ -11,7 +11,7 @@ import { exec, glob, matched, quote } from '@openinf/portal/build/utils'; // cspell's `en` dictionary is the American one, so this is also what holds the // project to American spelling: a British variant is an unknown word to it. const files = await glob([ - '**/*.{md,html,liquid,scss,mts,mjs,json,yml,yaml,sh}', + '**/*.{md,html,liquid,scss,mts,mjs,json,json5,jsonc,yml,yaml,sh}', '!node_modules/', '!_site/', '!.pnpm-store/', diff --git a/build/tasks/verify/verify-yaml.mts b/build/tasks/verify/verify-yaml.mts index 2f766fa57..1006cc492 100644 --- a/build/tasks/verify/verify-yaml.mts +++ b/build/tasks/verify/verify-yaml.mts @@ -12,6 +12,8 @@ const yamlFiles = await glob([ '**/*.yaml', '!_site/', '!node_modules/', + // Written by pnpm, not by hand. + '!pnpm-lock.yaml', ]); let exitCode = 0; From b64d03f861e8a397732cb2e35f32ab5a90e170c5 Mon Sep 17 00:00:00 2001 From: Derek Lewis Date: Mon, 7 Sep 2026 04:05:20 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=F0=9F=94=A7=EF=BC=9An?= =?UTF-8?q?ame=20the=20spelling=20glob=20once?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The follow-up this branch said it would need. #1884 landed first and brought `matched(files, ...)`, whose second argument was a second literal copy of the glob above it -- and the two were already a version apart, since this branch widened one of them to cover json5 and jsonc and the other still named the older list. It is read only in the message printed when nothing matched, so nothing was broken by it. But a string duplicated once has already shown it will drift, so it is named and referenced twice rather than written twice. Signed-off-by: Derek Lewis Assisted-by: Claude-Code:claude-opus-5 --- build/tasks/verify/verify-spelling.mts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/build/tasks/verify/verify-spelling.mts b/build/tasks/verify/verify-spelling.mts index a894712c6..1af811ee0 100644 --- a/build/tasks/verify/verify-spelling.mts +++ b/build/tasks/verify/verify-spelling.mts @@ -10,8 +10,14 @@ import { exec, glob, matched, quote } from '@openinf/portal/build/utils'; // Comments and template prose are read as often as the documentation is, and // cspell's `en` dictionary is the American one, so this is also what holds the // project to American spelling: a British variant is an unknown word to it. +// Named once rather than written twice. The glob and the complaint about it +// matching nothing were separate copies of this string, and they had already +// drifted apart by an extension. +const SPELLCHECKED = + '**/*.{md,html,liquid,scss,mts,mjs,json,json5,jsonc,yml,yaml,sh}'; + const files = await glob([ - '**/*.{md,html,liquid,scss,mts,mjs,json,json5,jsonc,yml,yaml,sh}', + SPELLCHECKED, '!node_modules/', '!_site/', '!.pnpm-store/', @@ -30,9 +36,6 @@ const files = await glob([ '!collections/_pages/vision.md', ]); -process.exitCode = matched( - files, - '**/*.{md,html,liquid,scss,mts,mjs,json,yml,yaml,sh}' -) +process.exitCode = matched(files, SPELLCHECKED) ? await exec(`cspell lint ${quote(files)}`) : 1;