@avi2dg/checks 0.69.0 → 0.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/docs/bins.md +6 -6
- package/docs/configs/native-settings.md +1 -1
- package/docs/design.md +2 -2
- package/docs/gates/checks-browser.md +2 -2
- package/docs/gates/checks-ci-wiring.md +3 -22
- package/docs/gates/checks-docs.md +23 -3
- package/docs/gates/checks-frontend-syntax.md +2 -2
- package/docs/gates/checks-lint-coverage.md +1 -1
- package/docs/gates/checks-lint.md +5 -5
- package/docs/gates/checks-mutation-compare.md +2 -2
- package/docs/gates/checks-quarantine-clock.md +2 -2
- package/docs/gates/checks-repetition.md +3 -3
- package/docs/gates/checks-setup.md +1 -4
- package/docs/gates/checks-suppressions-ratchet.md +3 -3
- package/docs/gates/checks-test.md +3 -3
- package/docs/gates/checks-whole-tree-run.md +281 -0
- package/docs/how-to/set-up-a-repository.md +17 -3
- package/docs/how-to/upgrade-the-kit.md +5 -2
- package/package.json +4 -5
- package/src/core/gates.ts +7 -7
- package/src/core/lint.ts +12 -13
- package/src/delivery/ci-wiring.ts +2 -7
- package/src/delivery/setup-workflow.ts +0 -25
- package/src/delivery/setup.ts +1 -2
- package/src/delivery/shell-command.ts +0 -4
- package/src/docs/doc-agents.ts +26 -3
- package/src/docs/docs.ts +62 -14
- package/src/testing/{night-run-findings.ts → whole-tree-run-findings.ts} +10 -10
- package/src/testing/{night-run.ts → whole-tree-run.ts} +44 -44
- package/docs/gates/checks-night-run.md +0 -257
- package/src/delivery/night-step.ts +0 -79
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
Every release of `@avi2dg/checks`, newest first, written by the release from its conventional commits.
|
|
4
4
|
|
|
5
|
+
## 0.71.0
|
|
6
|
+
|
|
7
|
+
Released 2026-11-07.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- rename night run to whole-tree run [#59](https://github.com/avi2d/checks/pull/59)
|
|
12
|
+
|
|
13
|
+
## 0.70.0
|
|
14
|
+
|
|
15
|
+
Released 2026-11-07.
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
- **docs:** require root AGENTS.md and CLAUDE.md with package.json [#58](https://github.com/avi2d/checks/pull/58)
|
|
20
|
+
|
|
5
21
|
## 0.69.0
|
|
6
22
|
|
|
7
23
|
Released 2026-11-06.
|
package/docs/bins.md
CHANGED
|
@@ -9,7 +9,7 @@ The kit ships one bin per check, each named `checks-` and called from a package
|
|
|
9
9
|
## What runs
|
|
10
10
|
|
|
11
11
|
`checks-lint` runs each of these gates that applies to the repository, and names every one that fails.
|
|
12
|
-
A gate reads either the working tree or the range `checks-lint` resolves, or the whole tree at the head under `checks-lint --
|
|
12
|
+
A gate reads either the working tree or the range `checks-lint` resolves, or the whole tree at the head under `checks-lint --whole-tree`.
|
|
13
13
|
It scopes tree gates to the change unless `--full` forces the full run, and `--desk` runs the fast tree gates.
|
|
14
14
|
The table groups the gates by vector, the part of a repository each one judges.
|
|
15
15
|
|
|
@@ -37,9 +37,9 @@ The table groups the gates by vector, the part of a repository each one judges.
|
|
|
37
37
|
|
|
38
38
|
<!-- end generated gates -->
|
|
39
39
|
|
|
40
|
-
Four of these gates run only
|
|
40
|
+
Four of these gates run only on the whole-tree run.
|
|
41
41
|
They are `checks-lint-coverage`, `checks-quarantine-clock`, `checks-repetition` and `checks-suppressions-ratchet`.
|
|
42
|
-
|
|
42
|
+
A whole-tree-run workflow the repository writes runs them with `checks-lint --whole-tree`, which hands each range gate `--whole-tree HEAD`, so the four judge the whole tree with no base.
|
|
43
43
|
|
|
44
44
|
These bins run on their own:
|
|
45
45
|
|
|
@@ -50,8 +50,8 @@ These bins run on their own:
|
|
|
50
50
|
- [`checks-mutation-baseline`](gates/checks-mutation-baseline.md) restores the newest mutation baseline from `main`, saves it on a self-hosted runner's disk in place of an artifact, and deletes superseded baselines after a `main` run.
|
|
51
51
|
- [`checks-mutation-scope`](gates/checks-mutation-scope.md) turns a branch's diff into the files its mutation runs mutate.
|
|
52
52
|
- [`checks-subsumed-tests`](gates/checks-subsumed-tests.md) lists each test another test subsumes in a mutation run.
|
|
53
|
-
- [`checks-
|
|
54
|
-
It closes the issue of a test, a gate or a missing mutation report that a later
|
|
53
|
+
- [`checks-whole-tree-run`](gates/checks-whole-tree-run.md) opens or comments on one GitHub issue per finding of a whole-tree run on `main`, each file whose mutation score fell, each failing test, each failed whole-tree gate, and each missing mutation report.
|
|
54
|
+
It closes the issue of a test, a gate or a missing mutation report that a later run no longer reports, and it comments on a mutation issue it no longer reports without closing it, but only when a previous run exists and every requested mutation report is present.
|
|
55
55
|
- [`checks-changelog`](gates/checks-changelog.md) writes the pending release into `CHANGELOG.md` from the conventional commits since the last release.
|
|
56
56
|
- [`checks-release-notes`](gates/checks-release-notes.md) writes one `CHANGELOG.md` section to a file for a GitHub release.
|
|
57
57
|
- [`checks-release-report`](gates/checks-release-report.md) tells whether the history holds unreleased features or fixes since the last tag.
|
|
@@ -65,7 +65,7 @@ These bins run on their own:
|
|
|
65
65
|
- [`checks-commit-title`](gates/checks-commit-title.md) lints the pull request title in one step of the `ci` job.
|
|
66
66
|
- [`checks-pr-text`](gates/checks-pr-text.md) scans the title, body and comments of a pull request in a public repository for a secret or a term of the private pack.
|
|
67
67
|
- [`checks-docs-only`](gates/checks-docs-only.md) tells whether a change touches only top-level Markdown and Markdown under `docs/`, so a docs-only change skips the full run.
|
|
68
|
-
- [`checks-setup`](gates/checks-setup.md) writes the kit config, the CI workflow
|
|
68
|
+
- [`checks-setup`](gates/checks-setup.md) writes the kit config, the CI workflow and the doc templates into a new repository.
|
|
69
69
|
|
|
70
70
|
`checks-lint` has [its own page](gates/checks-lint.md), which says which range it resolves.
|
|
71
71
|
oxlint runs through its own tool, as [Native settings](configs/native-settings.md) says.
|
|
@@ -93,7 +93,7 @@ export default defineConfig({ baseline: "widely", tokens: false });
|
|
|
93
93
|
|
|
94
94
|
The size rules are oxlint's own rules at `error`, which every `oxlint.config.ts` built with `defineConfig` sets over the whole tree, so `bun run lint` fails on any file over them.
|
|
95
95
|
A repository records its existing violations with `oxlint --suppress-all`, which writes them to `oxlint-suppressions.json`.
|
|
96
|
-
`checks-suppressions-ratchet` refuses every count that file still holds when the
|
|
96
|
+
`checks-suppressions-ratchet` refuses every count that file still holds when the whole-tree run scans the whole tree.
|
|
97
97
|
`SOURCE_LIMITS` holds the limits for sources and `TEST_LIMITS` the limits for tests:
|
|
98
98
|
|
|
99
99
|
<!-- generated size-limits: bun run build writes it from SOURCE_LIMITS, TEST_LIMITS, SOURCES and TESTS in src/quality/presets/oxlint.ts and scripts/doc-blocks.ts -->
|
package/docs/design.md
CHANGED
|
@@ -130,7 +130,7 @@ The gates run one at a time and pass their output straight through, so each repo
|
|
|
130
130
|
`checks-lint` picks the gates that apply from the tracked files for the full run, and a repository cannot select gates.
|
|
131
131
|
A scoped run selects a subset by changed paths, and the desk run selects the fast tree gates.
|
|
132
132
|
A TypeScript gate applies as soon as the repository tracks TypeScript source, and `checks-lint-coverage` and `checks-graphwalk` also apply on tracked Astro source.
|
|
133
|
-
`checks-lint-coverage` and `checks-repetition` run only
|
|
133
|
+
`checks-lint-coverage` and `checks-repetition` run only on the whole-tree run.
|
|
134
134
|
|
|
135
135
|
dependency-cruiser runs inside the `checks-graphwalk` gate rather than as a script each repository adds to `lint`, so the full run keeps it.
|
|
136
136
|
A repository with no config of its own is cruised against the kit's defaults, since every rule has one.
|
|
@@ -167,7 +167,7 @@ A stylesheet already over 400 lines fails until it is split, whatever the suppre
|
|
|
167
167
|
`checks-repetition` runs jscpd at both ends of the range with the head's `.jscpd.json`, so the same `path` and `ignore` globs pick the files at both ends.
|
|
168
168
|
It compares each file's count of repeated lines, and does not use jscpd's `--baseline-from-ref`.
|
|
169
169
|
That flag reports a repeated block as new once its text changes, so a change that shortens an existing repeated block would fail.
|
|
170
|
-
|
|
170
|
+
On the whole-tree run `checks-lint --whole-tree` runs both ratchets over the whole tree with no base, so every suppression count and every repeated line still present fails until it is removed.
|
|
171
171
|
|
|
172
172
|
## checks-test runs the suite itself
|
|
173
173
|
|
|
@@ -157,7 +157,7 @@ So are a `motion` check with no state whose `reducedMotion` is `reduce`, a `keyb
|
|
|
157
157
|
|
|
158
158
|
A viewport `{ "preset": "anchor" }` stands for the anchor set of screen sizes, and `{ "preset": "full" }` for the full set.
|
|
159
159
|
The full set holds the anchors and eleven more sizes.
|
|
160
|
-
A product runs the anchor set on every pull request and the full set
|
|
160
|
+
A product runs the anchor set on every pull request and the full set on a run started by hand.
|
|
161
161
|
Each size in a set is a viewport named for its device and its size, with `device` set, and each phone also sets `touch`.
|
|
162
162
|
A preset sits beside a product's own viewports.
|
|
163
163
|
A name both declare is refused as declared twice, and so is a size that two listed presets both hold.
|
|
@@ -231,7 +231,7 @@ A host resolves it as `@avi2dg/checks/browser-checks.json`.
|
|
|
231
231
|
|
|
232
232
|
<!-- end generated starter -->
|
|
233
233
|
|
|
234
|
-
For
|
|
234
|
+
For a run started by hand, a product keeps a second declaration in a directory of its own.
|
|
235
235
|
Its `site` is a path from that directory, such as `../dist`, and its viewports are `{ "preset": "full" }`.
|
|
236
236
|
It runs `checks-browser <directory>` on that directory.
|
|
237
237
|
|
|
@@ -32,16 +32,6 @@ A workflow without a `name` answers to its path from the repository root.
|
|
|
32
32
|
A local reusable `uses` must name a file under `.github/workflows/` that the repository holds.
|
|
33
33
|
Each `needs` entry names a job in the same workflow, so every one must match a job id in that file.
|
|
34
34
|
Each refusal names the file, the line and the missing workflow or job.
|
|
35
|
-
It requires a run step that invokes `checks-lint --night` in a repository that tracks TypeScript, so the four nightly gates run on the night run.
|
|
36
|
-
A call counts directly, through `bunx`, or through `bun` or `bun run` with the bin's path or its source file.
|
|
37
|
-
The call carries only `--night`, since any other argument stops the night run before it runs a gate.
|
|
38
|
-
A call through a `package.json` script counts, as `bun run <script>` where the named script runs the night step with the arguments the step passes.
|
|
39
|
-
A call through a local reusable workflow counts only through a job that uses the file that runs the night step.
|
|
40
|
-
A call through a repository shell script counts, as a path inside the repository whose file runs the night step.
|
|
41
|
-
A shell wrapper forwards its arguments through a standalone `"$@"`, so `exec checks-lint --night "$@"` counts with no arguments passed.
|
|
42
|
-
Shell control flow inside scripts is not evaluated: a night call after `false &&`, in an `if` branch, in a loop body or after `exit 0` counts all the same.
|
|
43
|
-
A call inside a function body counts whether or not the workflow calls the function.
|
|
44
|
-
A step or job with `if: false` or `continue-on-error: true` never counts, nor does a job that waits on one that never runs.
|
|
45
35
|
|
|
46
36
|
### Runners
|
|
47
37
|
|
|
@@ -120,7 +110,7 @@ Each refusal names the workflow file, the line of its `schedule` trigger and wha
|
|
|
120
110
|
|
|
121
111
|
### Schedules
|
|
122
112
|
|
|
123
|
-
It refuses every other workflow that triggers on `schedule`, since a test, mutation, flake, browser or
|
|
113
|
+
It refuses every other workflow that triggers on `schedule`, since a test, mutation, flake, browser or whole-tree run starts only by hand, with `gh workflow run`.
|
|
124
114
|
The one schedule it keeps is a weekly advisory scan in a public repository.
|
|
125
115
|
A workflow scans advisories when a run step calls `checks-advisories`, the same ways a release call counts, and every other run step is a `bun install`.
|
|
126
116
|
A weekly scan has one `cron` entry with one minute, one hour and one weekday, and `*` for the day of the month and the month.
|
|
@@ -141,7 +131,6 @@ Each refusal names the workflow file, the job and the limit.
|
|
|
141
131
|
|
|
142
132
|
The bin reads `.github/workflows/*.yml`, `*.yaml`, the `scripts`, `private` and `checks` runners in `package.json` and the shell scripts those steps and scripts run from the working tree.
|
|
143
133
|
It reads each shell script that a shell script it reads runs, until none is left.
|
|
144
|
-
It lists the `*.ts` and `*.tsx` files `git ls-files` tracks to decide whether the night run applies.
|
|
145
134
|
It reads each file a setup-bun step names for its version.
|
|
146
135
|
It reads `.bun-version` for each step that uses the shared setup action.
|
|
147
136
|
It reads the fleet pin from the kit's own `.bun-version`.
|
|
@@ -158,7 +147,7 @@ It takes no arguments.
|
|
|
158
147
|
| Code | Result |
|
|
159
148
|
| --- | --- |
|
|
160
149
|
| 0 | Every required command has a reachable step. |
|
|
161
|
-
| 1 | A required command is missing or blocked, a job runs on the wrong runner, a workflow names a missing workflow or job, a bun setup step drifts from the fleet bun version, a workflow that releases runs on a schedule outside a public npm package or more than once a day, a workflow other than a weekly public advisory scan runs on a schedule, a job can run for more than 60 minutes
|
|
150
|
+
| 1 | A required command is missing or blocked, a job runs on the wrong runner, a workflow names a missing workflow or job, a bun setup step drifts from the fleet bun version, a workflow that releases runs on a schedule outside a public npm package or more than once a day, a workflow other than a weekly public advisory scan runs on a schedule, or a job can run for more than 60 minutes. |
|
|
162
151
|
| 2 | A workflow or `package.json` cannot be decoded, or the kit's own `.bun-version` is missing, unreadable or blank. |
|
|
163
152
|
|
|
164
153
|
## Sample output
|
|
@@ -171,14 +160,6 @@ ci-wiring: 1 of 6 gate(s) do not run on pull requests to main:
|
|
|
171
160
|
no run step invokes it
|
|
172
161
|
```
|
|
173
162
|
|
|
174
|
-
A missing night step produces a report like this:
|
|
175
|
-
|
|
176
|
-
```
|
|
177
|
-
ci-wiring: 1 gate(s) never run on the night run:
|
|
178
|
-
checks-lint --night
|
|
179
|
-
no run step invokes it
|
|
180
|
-
```
|
|
181
|
-
|
|
182
163
|
A mutation job that names `CI_RUNS_ON` in `runs-on` produces a report like this:
|
|
183
164
|
|
|
184
165
|
```
|
|
@@ -205,7 +186,7 @@ A scheduled test run and a daily advisory scan produce a report like this:
|
|
|
205
186
|
```
|
|
206
187
|
ci-wiring: 2 workflow(s) run on a schedule:
|
|
207
188
|
.github/workflows/advisories.yml line 3: the advisory scan runs more than once a week; keep one cron at a minute, an hour and a weekday, such as "15 5 * * 1"
|
|
208
|
-
.github/workflows/
|
|
189
|
+
.github/workflows/whole-tree-run.yml line 4: drop the schedule, so it runs only when someone starts it with gh workflow run
|
|
209
190
|
```
|
|
210
191
|
|
|
211
192
|
A job that sets no timeout produces a report like this:
|
|
@@ -17,6 +17,7 @@ It fails when a living doc or an agent file names a path, link or command that d
|
|
|
17
17
|
It fails when an agent file holds more than 3,000 characters or a `## Maintaining this file` section, whatever the range touches, as [Agent files](#agent-files) says.
|
|
18
18
|
It fails when an entry in an agent file names no tracked path, link or `bun run` command, whatever the range touches.
|
|
19
19
|
It fails when a range edits a README that is over 6,000 characters or holds a table cell over 300, as [README ceilings](#readme-ceilings) says.
|
|
20
|
+
It fails when a range edits a doc file and a repository with a `package.json` is missing `AGENTS.md` or `CLAUDE.md` at its root, as [Root agent files](#root-agent-files) says.
|
|
20
21
|
It fails when a living doc or an agent file names a code span the range removed from every file outside the docs, on any line.
|
|
21
22
|
[Paths, links and commands](#paths-links-and-commands) says how each reference resolves.
|
|
22
23
|
The package ships one template per kind under `dist/templates/`, and a repository starts a new doc file by copying one:
|
|
@@ -206,6 +207,21 @@ No line in a complete same-named generated block counts toward either ceiling, f
|
|
|
206
207
|
A README fails only in a range that edits it.
|
|
207
208
|
A README the range leaves alone is listed as advisory, so the first change that edits an oversize README shrinks it.
|
|
208
209
|
|
|
210
|
+
## Root agent files
|
|
211
|
+
|
|
212
|
+
A repository with a `package.json` keeps `AGENTS.md` and `CLAUDE.md` at its root, since Claude Code reads `CLAUDE.md` and every other agent reads `AGENTS.md`.
|
|
213
|
+
The failure names the missing file and the template to copy:
|
|
214
|
+
|
|
215
|
+
- `AGENTS.md` starts from `dist/templates/agents.md`, and [Agent files](#agent-files) holds its shape.
|
|
216
|
+
- `CLAUDE.md` is `dist/templates/claude.md` word for word, the import that points Claude Code at `AGENTS.md`.
|
|
217
|
+
A symlink to `AGENTS.md` or any other text fails that template once a range touches the file.
|
|
218
|
+
|
|
219
|
+
A `package.json` anywhere in the repository asks for both files.
|
|
220
|
+
A repository with no `package.json` needs neither.
|
|
221
|
+
A missing file fails only in a range that adds, changes, renames or deletes a doc file, an ADR or the changelog included.
|
|
222
|
+
Markdown the gate does not judge, such as a changeset entry or a pull request template, does not end the advisory period.
|
|
223
|
+
Any other range lists the missing file as advisory, so the first change that edits a doc file adds both files.
|
|
224
|
+
|
|
209
225
|
## What it reads
|
|
210
226
|
|
|
211
227
|
It reads each Markdown file at the head commit, and uses its path or front matter to choose its kind.
|
|
@@ -217,6 +233,8 @@ It reads the repository's own name and its direct dependencies from the root `pa
|
|
|
217
233
|
It reads the versions the root `package.json` and `.bun-version` pin at the head commit.
|
|
218
234
|
It reads each agent file at the head commit for the ceiling, its sections and its entries, whatever the range touches.
|
|
219
235
|
It reads the root `README.md` and each `README.md` beside a tracked `package.json` at the head commit for the README ceilings.
|
|
236
|
+
It reads whether any `package.json` and the root `AGENTS.md` and `CLAUDE.md` are tracked at the head commit for the root agent files.
|
|
237
|
+
When a root agent file is missing, it reads a deleted or renamed Markdown file at the base commit to find its front matter kind.
|
|
220
238
|
A name that an installed direct dependency still holds counts as present.
|
|
221
239
|
From the working tree it reads the ignore files git reads, `node_modules/.bin`, and the directory of each direct dependency under `node_modules`.
|
|
222
240
|
|
|
@@ -234,14 +252,15 @@ With one it is that commit against its parent, or against the empty tree for a r
|
|
|
234
252
|
|
|
235
253
|
| Code | When |
|
|
236
254
|
| --- | --- |
|
|
237
|
-
| 0 | every doc file the range touches holds to its template, every line it adds to a living doc or an agent file holds to the prose rules and copies no pinned version, it adds or breaks no reference that does not resolve, every agent file holds to the ceiling and holds no `## Maintaining this file`, every entry in an agent file names a tracked path, a link or a command, every README the range edits holds to the README ceilings, and no code span a living doc or an agent file names vanished from every file outside the docs |
|
|
238
|
-
| 1 | a doc file the range touches does not hold to its template, a line the range adds to a living doc or an agent file breaks a prose rule or copies a pinned version, the range adds or breaks a reference that does not resolve, an agent file is over the ceiling or holds `## Maintaining this file`, an entry in an agent file names no tracked path, link or command, a README the range edits is over a README ceiling, or the range removes a name a living doc or an agent file still carries |
|
|
255
|
+
| 0 | every doc file the range touches holds to its template, every line it adds to a living doc or an agent file holds to the prose rules and copies no pinned version, it adds or breaks no reference that does not resolve, every agent file holds to the ceiling and holds no `## Maintaining this file`, every entry in an agent file names a tracked path, a link or a command, every README the range edits holds to the README ceilings, a range that edits a doc file leaves `AGENTS.md` and `CLAUDE.md` at the root of a repository with a `package.json`, and no code span a living doc or an agent file names vanished from every file outside the docs |
|
|
256
|
+
| 1 | a doc file the range touches does not hold to its template, a line the range adds to a living doc or an agent file breaks a prose rule or copies a pinned version, the range adds or breaks a reference that does not resolve, an agent file is over the ceiling or holds `## Maintaining this file`, an entry in an agent file names no tracked path, link or command, a README the range edits is over a README ceiling, a range that edits a doc file leaves either `AGENTS.md` or `CLAUDE.md` missing from the root in a repository with a `package.json`, or the range removes a name a living doc or an agent file still carries |
|
|
239
257
|
| 2 | a `package.json` does not decode, a ref does not resolve, or `grep` cannot read an installed direct dependency |
|
|
240
258
|
|
|
241
259
|
## Sample output
|
|
242
260
|
|
|
243
261
|
```
|
|
244
|
-
docs:
|
|
262
|
+
docs: 8 violation(s):
|
|
263
|
+
CLAUDE.md: is missing from the repository root, which a repository with a `package.json` keeps. Copy `node_modules/@avi2dg/checks/dist/templates/claude.md` to `CLAUDE.md` word for word, so Claude Code reads `AGENTS.md`
|
|
245
264
|
README.md:1: lacks `## Before you begin`
|
|
246
265
|
README.md:12: carries `;`, a semicolon. Use two sentences
|
|
247
266
|
README.md:13: carries `1.3.5`, a version .bun-version pins. Name .bun-version instead, or let a build write the line between generated markers
|
|
@@ -265,6 +284,7 @@ docs: advisory, 1 path(s), link(s) or command(s) the living docs or agent files
|
|
|
265
284
|
A repository adopts the templates as its files change, and the prose rules as its lines change, because an untouched file or line never fails those checks.
|
|
266
285
|
It reshapes its agent files when it adopts the gate, because [Agent files](#agent-files) judges each one whatever the range touches.
|
|
267
286
|
It shrinks an oversize README in the first change that edits it, because [README ceilings](#readme-ceilings) judges only a README the range edits.
|
|
287
|
+
It adds `AGENTS.md` and `CLAUDE.md` at its root in the first change that edits a doc file, because [Root agent files](#root-agent-files) judges only such a range.
|
|
268
288
|
A name the range removes fails wherever a doc still carries it, because the removal is what turned the line stale.
|
|
269
289
|
|
|
270
290
|
## Related topics
|
|
@@ -54,14 +54,14 @@ The builder changes four of the shared config's rules:
|
|
|
54
54
|
- In an `.html` or `.astro` file, `declaration-block-single-line-max-declarations` is off, since a `style` attribute is one line.
|
|
55
55
|
|
|
56
56
|
The comment rule refuses every comment but a sourcemap `/*# */` one, which stylelint passes to keep the map.
|
|
57
|
-
CSS repetition is not a family of this gate: a repository adds `"css"` to `format` in `.jscpd.json`, and [checks-repetition](checks-repetition.md) then fails
|
|
57
|
+
CSS repetition is not a family of this gate: a repository adds `"css"` to `format` in `.jscpd.json`, and [checks-repetition](checks-repetition.md) then fails on the whole-tree run on every repeated line a stylesheet still holds.
|
|
58
58
|
A stylesheet's length is not a family of this gate either, and [checks-css-size](checks-css-size.md) fails one that holds more than 400 lines.
|
|
59
59
|
|
|
60
60
|
### What no comment turns off
|
|
61
61
|
|
|
62
62
|
It sets stylelint's `ignoreDisables`, so a `stylelint-disable` comment silences nothing in either run, and [checks-comment-gate](checks-comment-gate.md) refuses one on the line that adds it.
|
|
63
63
|
A repository adopts a family over existing problems by counting them in `stylelint-suppressions.json` with `--suppress`.
|
|
64
|
-
stylelint lets a file and rule through while its problems stay within the count, and
|
|
64
|
+
stylelint lets a file and rule through while its problems stay within the count, and [checks-suppressions-ratchet](checks-suppressions-ratchet.md) fails on every count still present on the whole-tree run until it is removed.
|
|
65
65
|
`--suppress` counts only what the repository run reports, and a file that does not parse still fails in the kit run.
|
|
66
66
|
|
|
67
67
|
### Files
|
|
@@ -53,7 +53,7 @@ lint-coverage: the program tsconfig.json builds holds the ts-reset rules is-arra
|
|
|
53
53
|
|
|
54
54
|
## When it runs
|
|
55
55
|
|
|
56
|
-
`checks-lint --
|
|
56
|
+
`checks-lint --whole-tree` runs it on every whole-tree run when the repository tracks a `.ts`, `.tsx` or `.astro` file.
|
|
57
57
|
No pull request run selects it.
|
|
58
58
|
|
|
59
59
|
## Related topics
|
|
@@ -9,7 +9,7 @@ audience: consumers
|
|
|
9
9
|
## What it checks
|
|
10
10
|
|
|
11
11
|
It runs the gates under [What runs](../bins.md#what-runs), each in its own process.
|
|
12
|
-
With `--
|
|
12
|
+
With `--whole-tree` it runs the four whole-tree gates instead.
|
|
13
13
|
It scopes the run to the gates the change reaches, and the full run stays the fallback.
|
|
14
14
|
Applicability below selects the full run, and a scoped or desk run selects a subset.
|
|
15
15
|
A Markdown change runs the range gates plus `checks-copy`.
|
|
@@ -32,7 +32,7 @@ A local run with `GITHUB_BASE_REF` set starts at that branch on `origin` instead
|
|
|
32
32
|
A clone with no remote tracking refs checks `HEAD` alone.
|
|
33
33
|
On a pull request the range ends at the event's head commit and starts at its merge base with the event's base branch.
|
|
34
34
|
Tree gates read the working tree rather than the range.
|
|
35
|
-
With `--
|
|
35
|
+
With `--whole-tree` the range gates read the whole tree at `HEAD` instead of a range.
|
|
36
36
|
|
|
37
37
|
## Arguments
|
|
38
38
|
|
|
@@ -40,13 +40,13 @@ With `--night` the range gates read the whole tree at `HEAD` instead of a range.
|
|
|
40
40
|
checks-lint
|
|
41
41
|
checks-lint [--full | --desk]
|
|
42
42
|
checks-lint [--full | --desk] <base-ref> <head-ref>
|
|
43
|
-
checks-lint --
|
|
43
|
+
checks-lint --whole-tree
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
With two arguments, the base and head override range discovery.
|
|
47
47
|
`--full` forces the unscoped run.
|
|
48
48
|
`--desk` runs the fast tree gates.
|
|
49
|
-
With `--
|
|
49
|
+
With `--whole-tree`, it takes no other arguments and runs the four whole-tree gates over the whole tree.
|
|
50
50
|
|
|
51
51
|
## Exit codes
|
|
52
52
|
|
|
@@ -73,7 +73,7 @@ A repository runs it from `bun run lint` in a pull request workflow that fetches
|
|
|
73
73
|
It leaves out the TypeScript gates while the repository tracks no TypeScript file, except that `checks-lint-coverage` and `checks-graphwalk` run when it tracks an `.astro` file.
|
|
74
74
|
It never runs `checks-browser`, which a product runs after it builds its site.
|
|
75
75
|
A pull request run scopes the gates to the change.
|
|
76
|
-
A repository runs the four
|
|
76
|
+
A repository that adds a whole-tree-run workflow runs the four whole-tree gates from it with `checks-lint --whole-tree` over the whole tree.
|
|
77
77
|
|
|
78
78
|
## Related topics
|
|
79
79
|
|
|
@@ -69,7 +69,7 @@ mutation-compare: REGRESSION (1 mutant(s))
|
|
|
69
69
|
|
|
70
70
|
Only a CI step the repository writes runs it.
|
|
71
71
|
A person starts that step by hand on a branch, and no pull request triggers it or waits for it.
|
|
72
|
-
[checks-
|
|
72
|
+
[checks-whole-tree-run](checks-whole-tree-run.md) judges the mutation score of `main` on each whole-tree run and opens an issue for each file whose score fell.
|
|
73
73
|
A repository runs it with `--advisory`, so the comparison stays advisory.
|
|
74
74
|
Its lines land only in the CI log.
|
|
75
75
|
A full sweep runs in CI and never on a laptop.
|
|
@@ -145,5 +145,5 @@ The job never reads `CI_RUNS_ON`, so an override that moves a repository's other
|
|
|
145
145
|
|
|
146
146
|
- [checks-mutation](checks-mutation.md)
|
|
147
147
|
- [checks-mutation-scope](checks-mutation-scope.md)
|
|
148
|
-
- [checks-
|
|
148
|
+
- [checks-whole-tree-run](checks-whole-tree-run.md)
|
|
149
149
|
- [checks-test-layout](checks-test-layout.md)
|
|
@@ -30,7 +30,7 @@ checks-quarantine-clock --whole-tree <head-ref>
|
|
|
30
30
|
|
|
31
31
|
With two arguments it judges the head, and the base must resolve but changes nothing.
|
|
32
32
|
With one it judges that commit, including a repository's first commit.
|
|
33
|
-
With `--whole-tree` it judges the named head, which is the form `checks-lint --
|
|
33
|
+
With `--whole-tree` it judges the named head, which is the form `checks-lint --whole-tree` runs.
|
|
34
34
|
|
|
35
35
|
## Exit codes
|
|
36
36
|
|
|
@@ -49,7 +49,7 @@ quarantine-clock: 1 test(s) in tests/quarantine/ is past 30 days; fix each and m
|
|
|
49
49
|
|
|
50
50
|
## When it runs
|
|
51
51
|
|
|
52
|
-
`checks-lint --
|
|
52
|
+
`checks-lint --whole-tree` runs it on every whole-tree run in every repository, as [checks-lint](checks-lint.md) says.
|
|
53
53
|
A repository with no test file under `tests/quarantine/` passes with nothing checked.
|
|
54
54
|
|
|
55
55
|
## Related topics
|
|
@@ -12,7 +12,7 @@ The gate runs jscpd at 50 tokens and 5 lines against the base and head revisions
|
|
|
12
12
|
It compares repeated lines for each file, so a decrease in another file never offsets a rise.
|
|
13
13
|
It follows an edited rename back to the original file.
|
|
14
14
|
A file that repeats lines without a rise is advisory.
|
|
15
|
-
|
|
15
|
+
On the whole-tree run `checks-lint --whole-tree` scans the head alone with no base, so every file that repeats lines at the head fails until the repetition is removed, and no file is advisory.
|
|
16
16
|
A block two bins need goes into a module both import, as `rangeFromArgs` and `checkoutFiles` in `src/core/git.ts` show.
|
|
17
17
|
|
|
18
18
|
## What it reads
|
|
@@ -38,7 +38,7 @@ checks-repetition <ref>
|
|
|
38
38
|
checks-repetition --whole-tree <head-ref>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
With `--whole-tree` it scans the named head alone, which is the form `checks-lint --
|
|
41
|
+
With `--whole-tree` it scans the named head alone, which is the form `checks-lint --whole-tree` runs.
|
|
42
42
|
|
|
43
43
|
## Exit codes
|
|
44
44
|
|
|
@@ -58,7 +58,7 @@ repetition: 1 file(s) .jscpd.json holds repeat lines at the head, at 50 tokens a
|
|
|
58
58
|
|
|
59
59
|
## When it runs
|
|
60
60
|
|
|
61
|
-
`checks-lint --
|
|
61
|
+
`checks-lint --whole-tree` runs it on every whole-tree run when the repository tracks a `.ts` or `.tsx` file.
|
|
62
62
|
When the head holds no `.jscpd.json`, the gate reports that no file was measured.
|
|
63
63
|
|
|
64
64
|
## Related topics
|
|
@@ -4,7 +4,7 @@ audience: consumers
|
|
|
4
4
|
---
|
|
5
5
|
# checks-setup
|
|
6
6
|
|
|
7
|
-
`checks-setup` writes the kit config, the CI workflow
|
|
7
|
+
`checks-setup` writes the kit config, the CI workflow and the doc templates into a repository that does not hold them yet.
|
|
8
8
|
|
|
9
9
|
## What it checks
|
|
10
10
|
|
|
@@ -30,9 +30,6 @@ A newer push to the same pull request cancels the run in progress.
|
|
|
30
30
|
A `--private` run pins each job to `${{ vars.CI_RUNS_ON || 'ubuntu-latest' }}`.
|
|
31
31
|
Setting the `CI_RUNS_ON` variable to a self-hosted runner label then lands the jobs there.
|
|
32
32
|
A public run pins each job to `ubuntu-latest`.
|
|
33
|
-
It writes `.github/workflows/night-run.yml`, which installs with `bun install --frozen-lockfile` and then runs `bunx checks-lint --night`.
|
|
34
|
-
It runs on manual dispatch alone.
|
|
35
|
-
Its job uses the same runner choice as the CI workflow.
|
|
36
33
|
It copies each kit template under `dist/templates/` into `templates/`, so a new doc file starts from a copy there.
|
|
37
34
|
It names every file it wrote and every file it kept.
|
|
38
35
|
It tells the owner to declare the repository owners in `package.json` `author` or `contributors` before the first commit.
|
|
@@ -11,7 +11,7 @@ audience: consumers
|
|
|
11
11
|
oxlint accepts whatever `oxlint --suppress-all` writes to `oxlint-suppressions.json`, so raising a count to let a new site through passes the lint.
|
|
12
12
|
stylelint accepts `stylelint-suppressions.json` the same way, and writes it in the same shape, a count per rule per file.
|
|
13
13
|
The ratchet fails naming the suppressions file, the file and the rule of each count that rose or appeared.
|
|
14
|
-
|
|
14
|
+
On the whole-tree run `checks-lint --whole-tree` compares the head against the empty tree, so every count still present is reported until it is removed.
|
|
15
15
|
A count that fell and an entry that went both pass.
|
|
16
16
|
|
|
17
17
|
## What it reads
|
|
@@ -29,7 +29,7 @@ checks-suppressions-ratchet --whole-tree <head-ref>
|
|
|
29
29
|
|
|
30
30
|
With two arguments it reads the base where the head branched off, at their merge-base, so a count the base branch lowered since does not read as a rise at the head.
|
|
31
31
|
With one it compares that commit with its parent, or with the empty tree for a repository's first commit.
|
|
32
|
-
With `--whole-tree` it compares the named head with the empty tree, which is the form `checks-lint --
|
|
32
|
+
With `--whole-tree` it compares the named head with the empty tree, which is the form `checks-lint --whole-tree` runs.
|
|
33
33
|
|
|
34
34
|
## Exit codes
|
|
35
35
|
|
|
@@ -49,7 +49,7 @@ suppressions-ratchet: 2 count(s) rose or appeared; fix the site instead of suppr
|
|
|
49
49
|
|
|
50
50
|
## When it runs
|
|
51
51
|
|
|
52
|
-
`checks-lint --
|
|
52
|
+
`checks-lint --whole-tree` runs it on every whole-tree run in every repository, as [checks-lint](checks-lint.md) says.
|
|
53
53
|
A repository with neither file passes.
|
|
54
54
|
|
|
55
55
|
## Related topics
|
|
@@ -147,10 +147,10 @@ A timings option waits for Bun to honour timings under random order.
|
|
|
147
147
|
## Arguments
|
|
148
148
|
|
|
149
149
|
The default command takes no arguments except `--parallel=<workers>`, as [Parallel runs](#parallel-runs) says, `--full` and `--junit=<file>`.
|
|
150
|
-
`--full` runs the full suite outside CI, so a
|
|
150
|
+
`--full` runs the full suite outside CI, so a run started by hand covers what a local run skips.
|
|
151
151
|
A `package.json` script never takes `--full`, as [checks-test-layout](checks-test-layout.md) says of `scripts.test`.
|
|
152
152
|
Its named tier options are `--tier=live`, `--tier=pixel`, `--tier=unit` and `--tier=e2e`, and a tier run takes `--parallel=<workers>` too, but not `--full`.
|
|
153
|
-
`--junit=<file>` keeps the JUnit report Bun wrote at `<file>`, whether the tests passed or failed, so a
|
|
153
|
+
`--junit=<file>` keeps the JUnit report Bun wrote at `<file>`, whether the tests passed or failed, so a whole-tree run hands it to [checks-whole-tree-run](checks-whole-tree-run.md).
|
|
154
154
|
A `package.json` script never takes `--junit`, as [checks-test-layout](checks-test-layout.md) says of `scripts.test`.
|
|
155
155
|
Each option appears at most once.
|
|
156
156
|
It refuses test filters because every test excluded by a filter would look skipped.
|
|
@@ -186,4 +186,4 @@ A repository that tracks no TypeScript source does not need it, as [checks-test-
|
|
|
186
186
|
- [checks-test-layout](checks-test-layout.md)
|
|
187
187
|
- [checks-flake](checks-flake.md)
|
|
188
188
|
- [checks-quarantine-clock](checks-quarantine-clock.md)
|
|
189
|
-
- [checks-
|
|
189
|
+
- [checks-whole-tree-run](checks-whole-tree-run.md)
|