@avi2dg/checks 0.56.0 → 0.57.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 +7 -5
- package/docs/configs/dependency-rules.md +3 -3
- package/docs/configs/native-settings.md +5 -5
- package/docs/design.md +4 -2
- package/docs/gates/checks-frontend-syntax.md +2 -2
- package/docs/gates/checks-graphwalk.md +126 -0
- package/docs/gates/checks-lint-coverage.md +2 -1
- package/docs/gates/checks-lint.md +10 -5
- package/docs/gates/checks-night-run.md +38 -9
- package/docs/gates/checks-no-plain-js.md +1 -1
- package/docs/gates/checks-quarantine-clock.md +4 -2
- package/docs/gates/checks-repetition.md +12 -7
- package/docs/gates/checks-suppressions-ratchet.md +5 -2
- package/package.json +4 -7
- package/src/complexity/graphwalk.ts +374 -0
- package/src/complexity/knip.ts +2 -17
- package/src/complexity/repetition.ts +51 -16
- package/src/complexity/suppressions-ratchet.ts +14 -5
- package/src/core/gates.ts +13 -8
- package/src/core/git.ts +3 -1
- package/src/core/lint.ts +54 -20
- package/src/core/main.ts +12 -8
- package/src/testing/night-run-findings.ts +20 -3
- package/src/testing/night-run.ts +13 -7
- package/src/testing/quarantine-clock.ts +10 -2
- package/docs/gates/checks-exports.md +0 -104
- package/docs/gates/checks-imports.md +0 -64
- package/docs/gates/checks-unused.md +0 -66
- package/src/complexity/exports.ts +0 -189
- package/src/complexity/unused.ts +0 -49
- package/src/dependencies/imports.ts +0 -94
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.57.0
|
|
6
|
+
|
|
7
|
+
Released 2026-10-27.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- **testing:** run live tier and four lint gates at night [#13](https://github.com/avi2d/checks/pull/13)
|
|
12
|
+
|
|
13
|
+
## 0.56.1
|
|
14
|
+
|
|
15
|
+
Released 2026-10-27.
|
|
16
|
+
|
|
17
|
+
### Fixes
|
|
18
|
+
|
|
19
|
+
- **complexity:** merge unused, exports and imports walks into one pass [#12](https://github.com/avi2d/checks/pull/12)
|
|
20
|
+
|
|
5
21
|
## 0.56.0
|
|
6
22
|
|
|
7
23
|
Released 2026-10-27.
|
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
|
|
12
|
+
A gate reads either the working tree or the range `checks-lint` resolves, or the whole tree at the head under `checks-lint --night`.
|
|
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
|
|
|
@@ -19,8 +19,7 @@ The table groups the gates by vector, the part of a repository each one judges.
|
|
|
19
19
|
| --- | --- | --- | --- |
|
|
20
20
|
| complexity | [`checks-suppressions-ratchet`](gates/checks-suppressions-ratchet.md) | the range | every repository |
|
|
21
21
|
| complexity | [`checks-repetition`](gates/checks-repetition.md) | the range | a repository tracking `*.ts` or `*.tsx` |
|
|
22
|
-
| complexity | [`checks-
|
|
23
|
-
| complexity | [`checks-exports`](gates/checks-exports.md) | the range | a repository tracking `*.ts` or `*.tsx` |
|
|
22
|
+
| complexity | [`checks-graphwalk`](gates/checks-graphwalk.md) | the range | a repository tracking `*.ts` or `*.tsx` or `*.astro` |
|
|
24
23
|
| quality | [`checks-lint-coverage`](gates/checks-lint-coverage.md) | the working tree | a repository tracking `*.ts` or `*.tsx` or `*.astro` |
|
|
25
24
|
| quality | [`checks-comment-gate`](gates/checks-comment-gate.md) | the range | every repository |
|
|
26
25
|
| quality | [`checks-effect-scope`](gates/checks-effect-scope.md) | the working tree | a repository tracking `oxlint.config.ts` |
|
|
@@ -34,11 +33,14 @@ The table groups the gates by vector, the part of a repository each one judges.
|
|
|
34
33
|
| delivery | [`checks-commit-identity`](gates/checks-commit-identity.md) | the range | every repository |
|
|
35
34
|
| delivery | [`checks-ci-wiring`](gates/checks-ci-wiring.md) | the working tree | every repository |
|
|
36
35
|
| delivery | [`checks-secrets`](gates/checks-secrets.md) | the range | every repository |
|
|
37
|
-
| dependencies | [`checks-imports`](gates/checks-imports.md) | the working tree | a repository tracking `*.ts` or `*.tsx` |
|
|
38
36
|
| dependencies | [`checks-advisories`](gates/checks-advisories.md) | the range | a repository tracking `bun.lock` |
|
|
39
37
|
|
|
40
38
|
<!-- end generated gates -->
|
|
41
39
|
|
|
40
|
+
Four of these gates run only at night.
|
|
41
|
+
They are `checks-lint-coverage`, `checks-quarantine-clock`, `checks-repetition` and `checks-suppressions-ratchet`.
|
|
42
|
+
The night-run workflow runs them with `checks-lint --night`, which hands each range gate `--whole-tree HEAD`, so the four judge the whole tree with no base.
|
|
43
|
+
|
|
42
44
|
These bins run on their own:
|
|
43
45
|
|
|
44
46
|
- [`checks-test`](gates/checks-test.md) runs the suite as `scripts.test` and refuses a skip without a reason at its test site.
|
|
@@ -48,7 +50,7 @@ These bins run on their own:
|
|
|
48
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.
|
|
49
51
|
- [`checks-mutation-scope`](gates/checks-mutation-scope.md) turns a branch's diff into the files its mutation runs mutate.
|
|
50
52
|
- [`checks-subsumed-tests`](gates/checks-subsumed-tests.md) lists each test another test subsumes in a mutation run.
|
|
51
|
-
- [`checks-night-run`](gates/checks-night-run.md) opens or comments on one GitHub issue per finding of a night run on `main`, each file whose mutation score fell and each
|
|
53
|
+
- [`checks-night-run`](gates/checks-night-run.md) opens or comments on one GitHub issue per finding of a night run on `main`, each file whose mutation score fell, each failing test, and each failed nightly gate.
|
|
52
54
|
- [`checks-changelog`](gates/checks-changelog.md) writes the pending release into `CHANGELOG.md` from the conventional commits since the last release.
|
|
53
55
|
- [`checks-release-notes`](gates/checks-release-notes.md) writes one `CHANGELOG.md` section to a file for a GitHub release.
|
|
54
56
|
- [`checks-release-report`](gates/checks-release-report.md) tells whether the history holds unreleased features or fixes since the last tag.
|
|
@@ -11,7 +11,7 @@ The kit's dependency-cruiser rules hold a repository's imports, and a repository
|
|
|
11
11
|
`defineConfig` from `@avi2dg/checks/dependency-cruiser` returns these rules, with or without a config of the repository's own:
|
|
12
12
|
|
|
13
13
|
- `no-circular`
|
|
14
|
-
- `no-orphans`, which a repository that depends on `astro` gets only by listing its own, as [checks-
|
|
14
|
+
- `no-orphans`, which a repository that depends on `astro` gets only by listing its own, as [checks-graphwalk](../gates/checks-graphwalk.md) explains
|
|
15
15
|
- `not-to-dev-dep`, which refuses shipped source importing a dev-only package, and a package listed in `peerDependencies` too is not dev-only
|
|
16
16
|
- `no-non-package-json`, which refuses an import of an installed package that the nearest `package.json` does not declare, and counts a peer that `peerDependenciesMeta` marks optional as declared
|
|
17
17
|
- `not-to-unresolvable`, which refuses a specifier nothing installed answers
|
|
@@ -61,9 +61,9 @@ A rule under `forbidden` that takes a kit rule's name replaces that rule whole,
|
|
|
61
61
|
|
|
62
62
|
## Running it
|
|
63
63
|
|
|
64
|
-
`checks-lint` runs [checks-
|
|
64
|
+
`checks-lint` runs [checks-graphwalk](../gates/checks-graphwalk.md) in the full run, which cruises every tracked TypeScript file against `dependency-cruiser.config.ts`, or against the kit's defaults when the repository holds no config.
|
|
65
65
|
|
|
66
66
|
## Related topics
|
|
67
67
|
|
|
68
|
-
- [checks-
|
|
68
|
+
- [checks-graphwalk](../gates/checks-graphwalk.md)
|
|
69
69
|
- [Why it is shaped this way](../design.md)
|
|
@@ -14,11 +14,11 @@ A consuming repository puts each setting in the file its tool reads, and no mani
|
|
|
14
14
|
| `oxlint.config.ts` | Effect paths and their exemptions, ignore patterns, and any rule or budget the repository sets over the kit's defaults | oxlint and `checks-effect-scope` |
|
|
15
15
|
| `oxlint-suppressions.json` | The existing violations oxlint suppresses, per file and rule | oxlint and `checks-suppressions-ratchet` |
|
|
16
16
|
| `stylelint-suppressions.json` | The existing violations stylelint suppresses, per file and rule | stylelint, `checks-frontend-syntax` and `checks-suppressions-ratchet` |
|
|
17
|
-
| `exports-baseline.json` | The existing unused exports and types, per file, kind and name | `checks-
|
|
17
|
+
| `exports-baseline.json` | The existing unused exports and types, per file, kind and name | `checks-graphwalk` |
|
|
18
18
|
| `.jscpd.json` | The `path` and `ignore` globs of the files repetition is measured in | jscpd and `checks-repetition` |
|
|
19
|
-
| `knip.config.ts` | The `entry` globs Knip traces unreferenced files from | Knip
|
|
19
|
+
| `knip.config.ts` | The `entry` globs Knip traces unreferenced files from | Knip and `checks-graphwalk` |
|
|
20
20
|
| `stylelint.config.ts` | The Baseline target, the token files, the CSS families the repository turns on, and any stylelint rule the repository sets over the kit's families | `checks-frontend-syntax` |
|
|
21
|
-
| `dependency-cruiser.config.ts` | Entry points nothing imports, paths that may import dev dependencies, and import boundaries, when the kit's defaults do not fit | `checks-
|
|
21
|
+
| `dependency-cruiser.config.ts` | Entry points nothing imports, paths that may import dev dependencies, and import boundaries, when the kit's defaults do not fit | `checks-graphwalk` |
|
|
22
22
|
| `tsconfig.json` | Compiler options, and the Effect language service plugin whose `overrides` and kit severities `checks-effect-scope` writes, keeping every other key | TypeScript and Effect language service |
|
|
23
23
|
| `package.json` | `scripts` with the `checks-vendor` arguments in `prepare`, `author` and `contributors` | Bun, `checks-commit-identity` and `checks-vendor` |
|
|
24
24
|
| `bunfig.toml` | Test discovery and quarantine exclusion | Bun and `checks-test-layout` |
|
|
@@ -69,7 +69,7 @@ import { defineConfig } from "@avi2dg/checks/knip";
|
|
|
69
69
|
export default defineConfig({ entry: ["src/index.ts"] });
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
`dependency-cruiser.config.ts` is optional, since `checks-
|
|
72
|
+
`dependency-cruiser.config.ts` is optional, since `checks-graphwalk` cruises against the kit's defaults without one:
|
|
73
73
|
|
|
74
74
|
```ts
|
|
75
75
|
import { defineConfig } from "@avi2dg/checks/dependency-cruiser";
|
|
@@ -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
|
|
96
|
+
`checks-suppressions-ratchet` refuses every count that file still holds when the night 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
|
@@ -125,9 +125,10 @@ A gate then behaves the same alone or through `checks-lint`, and `lint-coverage.
|
|
|
125
125
|
The gates run one at a time and pass their output straight through, so each report reads whole and in the order of the gate table.
|
|
126
126
|
`checks-lint` picks the gates that apply from the tracked files for the full run, and a repository cannot select gates.
|
|
127
127
|
A scoped run selects a subset by changed paths, and the desk run selects the fast tree gates.
|
|
128
|
-
A TypeScript gate applies as soon as the repository tracks TypeScript source, and `checks-lint-coverage` and `checks-
|
|
128
|
+
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.
|
|
129
|
+
`checks-lint-coverage` and `checks-repetition` run only at night.
|
|
129
130
|
|
|
130
|
-
dependency-cruiser runs
|
|
131
|
+
dependency-cruiser runs inside the `checks-graphwalk` gate rather than as a script each repository adds to `lint`, so the full run keeps it.
|
|
131
132
|
A repository with no config of its own is cruised against the kit's defaults, since every rule has one.
|
|
132
133
|
The gate cruises the tracked TypeScript, so a build output or a linked library outside git never reaches the cruise.
|
|
133
134
|
It runs dependency-cruiser under Bun, which loads a TypeScript config wherever it sits, the kit's defaults under `node_modules` among them.
|
|
@@ -162,6 +163,7 @@ A stylesheet already over 400 lines fails until it is split, whatever the suppre
|
|
|
162
163
|
`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.
|
|
163
164
|
It compares each file's count of repeated lines, and does not use jscpd's `--baseline-from-ref`.
|
|
164
165
|
That flag reports a repeated block as new once its text changes, so a change that shortens an existing repeated block would fail.
|
|
166
|
+
At night `checks-lint --night` 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.
|
|
165
167
|
|
|
166
168
|
## checks-test runs the suite itself
|
|
167
169
|
|
|
@@ -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 at night 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 [checks-suppressions-ratchet](checks-suppressions-ratchet.md) fails
|
|
64
|
+
stylelint lets a file and rule through while its problems stay within the count, and the nightly [checks-suppressions-ratchet](checks-suppressions-ratchet.md) fails on every count still present 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
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
audience: consumers
|
|
4
|
+
---
|
|
5
|
+
# checks-graphwalk
|
|
6
|
+
|
|
7
|
+
`checks-graphwalk` is the gate that judges unreferenced files, unused exports and import violations together, running Knip once over the working tree for unreferenced files and unused exports and dependency-cruiser once for import violations, plus Knip once more on the base checkout when the range adds baseline entries.
|
|
8
|
+
|
|
9
|
+
## What it checks
|
|
10
|
+
|
|
11
|
+
It runs Knip once with the repository's own configuration and names each `.ts`, `.tsx` or `.astro` file no entry reaches.
|
|
12
|
+
It names each exported value and type no file imports from the same run, so one graph build feeds both findings.
|
|
13
|
+
It reads only the files, exports and types issue types, so an unused dependency never fails it.
|
|
14
|
+
It asks Knip for those issue types itself, so a configuration that narrows `include` or excludes them still judges them.
|
|
15
|
+
A configuration that turns the exports or types rules off silences those symbols, so keep both rules on.
|
|
16
|
+
A configuration that turns the files rule off still has its files judged.
|
|
17
|
+
It holds each reported symbol against `exports-baseline.json`, and fails on any symbol the baseline does not hold.
|
|
18
|
+
It fails on any baseline entry the range adds unless Knip reports that same symbol unused at the base, so the baseline records debt that already existed and never debt the range creates.
|
|
19
|
+
It fails on any baseline entry Knip no longer reports, so the baseline only shrinks.
|
|
20
|
+
It runs dependency-cruiser over every tracked `.ts`, `.tsx`, `.mts` and `.cts` file and names each violation with its rule, the importing module and the module it reaches.
|
|
21
|
+
It fails on a violation whose rule has `error` severity, and lists a `warn` or `info` violation without failing.
|
|
22
|
+
It fails when the repository tracks no `.ts`, `.tsx`, `.astro`, `.mts` or `.cts` file, since an empty scan would pass without judging anything.
|
|
23
|
+
It fails when the repository holds no Knip configuration, since Knip's default entries cannot tell a dead file from an entry point.
|
|
24
|
+
|
|
25
|
+
In a repository whose `package.json` lists `astro` under `dependencies` or `devDependencies`, the kit's defaults leave `no-orphans` out.
|
|
26
|
+
The cruise never reads an `.astro` file, so a `.ts` module only a page imports would read as an orphan.
|
|
27
|
+
The unreferenced-files section already names each file no entry reaches there, and it reads `.astro` imports.
|
|
28
|
+
A repository that wants the rule back lists its own `no-orphans` under `forbidden` in `dependency-cruiser.config.ts`.
|
|
29
|
+
|
|
30
|
+
## What it reads
|
|
31
|
+
|
|
32
|
+
It runs Knip and dependency-cruiser over the working tree, so an uncommitted file is judged like a committed one.
|
|
33
|
+
It reads the repository's Knip configuration, which names the entries.
|
|
34
|
+
The repository writes `knip.config.ts` with the kit's builder, which requires `entry`, the files nothing imports:
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import { defineConfig } from "@avi2dg/checks/knip";
|
|
38
|
+
|
|
39
|
+
export default defineConfig({ entry: ["src/index.ts"] });
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The builder sets `include` to unreferenced files alone, and adds `tests/**/*.test.ts`, `dependency-cruiser.config.ts` and `oxlint.config.ts` to the entries.
|
|
43
|
+
In a repository that depends on `astro`, Knip reads `.astro` imports, so a file only an `.astro` entry imports counts as used and an `.astro` file no entry reaches is named.
|
|
44
|
+
The gate resolves the Knip binary from the installed kit, so a consumer installs nothing beyond the kit.
|
|
45
|
+
It reads `exports-baseline.json` in the repository root, which holds each accepted unused export as a file, kind and name triple.
|
|
46
|
+
It reads `exports-baseline.json` again at the base of the range, where a commit without the file counts as empty.
|
|
47
|
+
When the range adds baseline entries, it runs Knip again on a temporary checkout of the base and removes the checkout when it ends.
|
|
48
|
+
That checkout links the repository's `node_modules`, so a configuration importing the kit's builder loads there too.
|
|
49
|
+
It cruises against the first config it finds there:
|
|
50
|
+
|
|
51
|
+
1. `dependency-cruiser.config.ts`, which calls `defineConfig` from `@avi2dg/checks/dependency-cruiser`.
|
|
52
|
+
1. A config under one of dependency-cruiser's own names, such as `.dependency-cruiser.cjs`.
|
|
53
|
+
1. The kit's defaults, which `defineConfig()` returns with no argument.
|
|
54
|
+
|
|
55
|
+
It runs dependency-cruiser from the installed kit under Bun, which loads a TypeScript config wherever it sits.
|
|
56
|
+
It leaves out a tracked file the working tree no longer holds.
|
|
57
|
+
|
|
58
|
+
## Arguments
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
checks-graphwalk
|
|
62
|
+
checks-graphwalk <ref>
|
|
63
|
+
checks-graphwalk <base-ref> <head-ref>
|
|
64
|
+
checks-graphwalk --write
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
With no argument it judges `HEAD` alone.
|
|
68
|
+
With one the base is that commit's parent, or the empty tree for a repository's first commit, where nothing counts as already unused.
|
|
69
|
+
With two arguments the base is where the head branched off, at their merge-base.
|
|
70
|
+
When the checked-out commit is a merge of the head ref and one other commit, as a pull request's default checkout is, the base is that other commit instead.
|
|
71
|
+
So under `checks-lint` a pull request's merge checkout is judged against the base branch tip it merges, and a symbol that branch already baselined does not count as added.
|
|
72
|
+
With `--write` it records every unused export and type Knip reports into `exports-baseline.json`, the way `oxlint --suppress-all` seeds `oxlint-suppressions.json`.
|
|
73
|
+
|
|
74
|
+
A repository adopting the gate runs `checks-graphwalk --write` on a branch that changes no source and commits the file it writes.
|
|
75
|
+
The gate passes that range, since Knip reports every seeded symbol unused at the base too.
|
|
76
|
+
A seed written after the range adds a dead export, or after it removes the last import of one, fails on that symbol.
|
|
77
|
+
|
|
78
|
+
## Exit codes
|
|
79
|
+
|
|
80
|
+
| Code | When |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| 0 | no file is unreferenced, no symbol is unlisted, added or stale, and no import breaks an `error` rule, or `--write` recorded the baseline |
|
|
83
|
+
| 1 | a file is unreferenced, a symbol is unlisted, added or stale, an import breaks an `error` rule, or the repository holds no Knip configuration |
|
|
84
|
+
| 2 | a ref does not resolve, a scanner cannot run, or a Knip report, a cruise report or the baseline does not parse |
|
|
85
|
+
|
|
86
|
+
The gate exits 1 when any section reports a violation, and exits 2 only when no section reports one and at least one section cannot decide.
|
|
87
|
+
|
|
88
|
+
It also exits 2 when the repository tracks no `.ts`, `.tsx`, `.astro`, `.mts` or `.cts` file, or, with `--write`, when it tracks no TypeScript file.
|
|
89
|
+
A repository that tracks `.astro` files but no `.ts`, `.tsx`, `.mts` or `.cts` file prints only the unreferenced-files section.
|
|
90
|
+
|
|
91
|
+
## Sample output
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
unused: 1 unreferenced file(s):
|
|
95
|
+
src/dead.ts
|
|
96
|
+
exports: 2 unused export(s) not in exports-baseline.json:
|
|
97
|
+
src/used.ts: unusedExport (export)
|
|
98
|
+
src/used.ts: UnusedOptions (type)
|
|
99
|
+
imports: 1 violation(s) in 5 module(s) cruised against the kit's defaults
|
|
100
|
+
error no-orphans: src/dead.ts
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
A passing run counts what each section judged:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
unused: no unreferenced files among 3 tracked .ts/.tsx/.astro file(s)
|
|
107
|
+
exports: no unused exports or types
|
|
108
|
+
imports: 3 module(s) cruised against the kit's defaults, no violation
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
A passing run with a held baseline counts what it holds:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
exports: 2 unused export(s) in exports-baseline.json, and no new ones
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## When it runs
|
|
118
|
+
|
|
119
|
+
`checks-lint` runs it over each pull request's range when the repository tracks a `.ts`, `.tsx` or `.astro` file.
|
|
120
|
+
Such a repository names its entries in a Knip configuration.
|
|
121
|
+
|
|
122
|
+
## Related topics
|
|
123
|
+
|
|
124
|
+
- [checks-lint](checks-lint.md)
|
|
125
|
+
- [checks-repetition](checks-repetition.md)
|
|
126
|
+
- [The dependency rules](../configs/dependency-rules.md)
|
|
@@ -53,7 +53,8 @@ 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` runs it
|
|
56
|
+
`checks-lint --night` runs it nightly when the repository tracks a `.ts`, `.tsx` or `.astro` file.
|
|
57
|
+
No pull request run selects it.
|
|
57
58
|
|
|
58
59
|
## Related topics
|
|
59
60
|
|
|
@@ -4,18 +4,19 @@ audience: consumers
|
|
|
4
4
|
---
|
|
5
5
|
# checks-lint
|
|
6
6
|
|
|
7
|
-
`checks-lint` runs every applicable
|
|
7
|
+
`checks-lint` runs every applicable gate in the selected set and reports each failure.
|
|
8
8
|
|
|
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 `--night` it runs the four nightly gates instead.
|
|
12
13
|
It scopes the run to the gates the change reaches, and the full run stays the fallback.
|
|
13
14
|
Applicability below selects the full run, and a scoped or desk run selects a subset.
|
|
14
15
|
A Markdown change runs the range gates plus `checks-copy`.
|
|
15
16
|
A TypeScript source change runs every applicable gate.
|
|
16
17
|
A test file classifies as TypeScript, so its change runs every applicable gate too.
|
|
17
18
|
Gates requiring tracked TypeScript files begin running when the repository tracks TypeScript.
|
|
18
|
-
`checks-lint-coverage` and `checks-
|
|
19
|
+
`checks-lint-coverage` and `checks-graphwalk` also begin running when the repository tracks an `.astro` file.
|
|
19
20
|
`checks-advisories` begins running when the repository tracks `bun.lock`.
|
|
20
21
|
`checks-lint` defers its scan to the scheduled run, so the desk and the pull request fetch no database.
|
|
21
22
|
`checks-frontend-syntax` begins running when the repository tracks `frontend-syntax.json` at its root.
|
|
@@ -31,6 +32,7 @@ A local run with `GITHUB_BASE_REF` set starts at that branch on `origin` instead
|
|
|
31
32
|
A clone with no remote tracking refs checks `HEAD` alone.
|
|
32
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.
|
|
33
34
|
Tree gates read the working tree rather than the range.
|
|
35
|
+
With `--night` the range gates read the whole tree at `HEAD` instead of a range.
|
|
34
36
|
|
|
35
37
|
## Arguments
|
|
36
38
|
|
|
@@ -38,11 +40,13 @@ Tree gates read the working tree rather than the range.
|
|
|
38
40
|
checks-lint
|
|
39
41
|
checks-lint [--full | --desk]
|
|
40
42
|
checks-lint [--full | --desk] <base-ref> <head-ref>
|
|
43
|
+
checks-lint --night
|
|
41
44
|
```
|
|
42
45
|
|
|
43
46
|
With two arguments, the base and head override range discovery.
|
|
44
47
|
`--full` forces the unscoped run.
|
|
45
48
|
`--desk` runs the fast tree gates.
|
|
49
|
+
With `--night`, it takes no other arguments and runs the four nightly gates over the whole tree.
|
|
46
50
|
|
|
47
51
|
## Exit codes
|
|
48
52
|
|
|
@@ -54,11 +58,11 @@ With two arguments, the base and head override range discovery.
|
|
|
54
58
|
|
|
55
59
|
## Sample output
|
|
56
60
|
|
|
57
|
-
<!-- generated lint-sample: bun run build writes it from
|
|
61
|
+
<!-- generated lint-sample: bun run build writes it from PR_GATES in src/core/gates.ts and scripts/doc-blocks.ts -->
|
|
58
62
|
|
|
59
63
|
```
|
|
60
64
|
checks-lint: range 2504acf098d120e73a8ece3c96f22b934f35c6a8..10ba7d8935b73ed72624120a1542e51bd21ca7c7 from HEAD against origin/main
|
|
61
|
-
checks-lint: 1 of
|
|
65
|
+
checks-lint: 1 of 13 gate(s) failed: checks-comment-gate
|
|
62
66
|
```
|
|
63
67
|
|
|
64
68
|
<!-- end generated lint-sample -->
|
|
@@ -66,9 +70,10 @@ checks-lint: 1 of 19 gate(s) failed: checks-comment-gate
|
|
|
66
70
|
## When it runs
|
|
67
71
|
|
|
68
72
|
A repository runs it from `bun run lint` in a pull request workflow that fetches the whole git history.
|
|
69
|
-
It leaves out the TypeScript gates while the repository tracks no TypeScript file, except that `checks-lint-coverage` and `checks-
|
|
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.
|
|
70
74
|
It never runs `checks-browser`, which a product runs after it builds its site.
|
|
71
75
|
A pull request run scopes the gates to the change.
|
|
76
|
+
A repository runs the four nightly gates from its night-run workflow with `checks-lint --night` over the whole tree.
|
|
72
77
|
|
|
73
78
|
## Related topics
|
|
74
79
|
|
|
@@ -4,7 +4,7 @@ audience: consumers
|
|
|
4
4
|
---
|
|
5
5
|
# checks-night-run
|
|
6
6
|
|
|
7
|
-
`checks-night-run` turns a night run on `main` into GitHub issues, one for each file whose mutation score fell and one for each
|
|
7
|
+
`checks-night-run` turns a night run on `main` into GitHub issues, one for each file whose mutation score fell, one for each failing test, and one for each failed nightly gate.
|
|
8
8
|
|
|
9
9
|
## What it checks
|
|
10
10
|
|
|
@@ -15,6 +15,9 @@ A file only one night holds is no finding, since it lacks one of the two scores.
|
|
|
15
15
|
A file with no scored mutant has no score, so it is no finding either.
|
|
16
16
|
An equal score is no finding, even when it counts other mutants.
|
|
17
17
|
Each failing test in a JUnit report is a finding, whatever the previous night holds.
|
|
18
|
+
Each nightly gate the lint log names as failed is a finding.
|
|
19
|
+
A log where every named gate is undecided files `checks-lint` itself, with no per-gate issue.
|
|
20
|
+
A log with no passing run and no named gate files `checks-lint` itself, so a gate run that never finished still reaches an issue.
|
|
18
21
|
A file whose test worker crashed is one finding, since Bun reports none of its tests.
|
|
19
22
|
With no previous night it compares no score and still files each failing test.
|
|
20
23
|
With no mutation report it compares and records no score and still files each failing test.
|
|
@@ -26,6 +29,7 @@ Each finding has a key that stays the same from night to night:
|
|
|
26
29
|
| a file whose mutation score fell | `mutation:<file>` |
|
|
27
30
|
| a failing test | `test:<file> > <describe> > <name>` |
|
|
28
31
|
| a file whose test worker crashed | `test:<file>` |
|
|
32
|
+
| a nightly gate that failed | `gates:<gate>` |
|
|
29
33
|
|
|
30
34
|
## How it files a finding
|
|
31
35
|
|
|
@@ -33,8 +37,8 @@ It creates the `night-run` label when the repository lacks it.
|
|
|
33
37
|
It reads every open issue labelled `night-run`, and reads the key each one carries in a hidden marker in its body.
|
|
34
38
|
A finding whose key an open issue carries gets one comment on that issue, so a regression that lasts two nights stays one issue.
|
|
35
39
|
Any other finding opens one issue labelled `night-run`.
|
|
36
|
-
The issue and the comment name tonight's run, the file and
|
|
37
|
-
The body holds the file, the full test name and the finding key.
|
|
40
|
+
The issue and the comment name tonight's run, the file and the test, the score of both nights or the failed gate.
|
|
41
|
+
The body holds the file, the full test name or the failed gate, and the finding key.
|
|
38
42
|
A title longer than GitHub's 256 characters is cut to at most 256 and ends in `…`.
|
|
39
43
|
A night with no finding makes no call to GitHub's issues or labels at all.
|
|
40
44
|
Closing an issue ends it, and the same finding on a later night opens a new one.
|
|
@@ -44,6 +48,7 @@ A run on any ref but `refs/heads/main` files no issue and records no score, and
|
|
|
44
48
|
## What it reads
|
|
45
49
|
|
|
46
50
|
It reads tonight's Stryker `mutation.json` report, when the mutation run left one, and any number of JUnit reports, such as the ones `checks-test --junit=<file>` keeps, as [checks-test](checks-test.md#arguments) says.
|
|
51
|
+
It reads the lint log `--gates` names for the `gate(s) failed:` line `checks-lint --night` prints.
|
|
47
52
|
It scans the newest 30 successful runs of the same workflow on `main` from newest to oldest.
|
|
48
53
|
It takes the first run whose `night-run` artifact still exists as the previous night.
|
|
49
54
|
That artifact holds `night-run.json`, the scores the run recorded.
|
|
@@ -56,11 +61,12 @@ It calls `gh` with the job's `GH_TOKEN`, which needs `actions: read` for the pre
|
|
|
56
61
|
## Arguments
|
|
57
62
|
|
|
58
63
|
```sh
|
|
59
|
-
checks-night-run [--mutation <mutation-report>] [--tests <junit-report>]...
|
|
64
|
+
checks-night-run [--mutation <mutation-report>] [--tests <junit-report>]... [--gates <lint-log>]
|
|
60
65
|
```
|
|
61
66
|
|
|
62
67
|
`--mutation` names tonight's Stryker report and is given at most once.
|
|
63
68
|
`--tests` names one JUnit report and is given once per report.
|
|
69
|
+
`--gates` names tonight's `checks-lint --night` log and is given at most once.
|
|
64
70
|
At least one report is given.
|
|
65
71
|
|
|
66
72
|
## Exit codes
|
|
@@ -68,7 +74,7 @@ At least one report is given.
|
|
|
68
74
|
| Code | When |
|
|
69
75
|
| --- | --- |
|
|
70
76
|
| 0 | it filed every finding and recorded tonight's scores, it found nothing to file, or the run is off `main` and it listed each finding |
|
|
71
|
-
| 2 | an argument does not parse, a report does not decode, a GitHub Actions variable is unset or a `gh` call fails |
|
|
77
|
+
| 2 | an argument does not parse, a report or the lint log does not decode, a GitHub Actions variable is unset or a `gh` call fails |
|
|
72
78
|
|
|
73
79
|
It never exits 1, because a finding becomes an issue rather than a failed run.
|
|
74
80
|
|
|
@@ -83,7 +89,7 @@ checks-night-run: recorded 42 file score(s) in reports/night-run.json
|
|
|
83
89
|
|
|
84
90
|
## When it runs
|
|
85
91
|
|
|
86
|
-
Only a night workflow the repository writes runs it, after that workflow's full mutation run
|
|
92
|
+
Only a night workflow the repository writes runs it, after that workflow's full mutation run, its long test tiers and its nightly lint gates.
|
|
87
93
|
|
|
88
94
|
## Running it at night
|
|
89
95
|
|
|
@@ -132,8 +138,24 @@ jobs:
|
|
|
132
138
|
name: night-run-tests
|
|
133
139
|
path: reports/night-run-tests/
|
|
134
140
|
retention-days: 1
|
|
141
|
+
gates:
|
|
142
|
+
runs-on: ubuntu-latest
|
|
143
|
+
steps:
|
|
144
|
+
- uses: actions/checkout@v5
|
|
145
|
+
with:
|
|
146
|
+
fetch-depth: 0
|
|
147
|
+
- uses: oven-sh/setup-bun@v2
|
|
148
|
+
with:
|
|
149
|
+
bun-version-file: .bun-version
|
|
150
|
+
- run: bun install --frozen-lockfile
|
|
151
|
+
- run: mkdir -p reports/night-run-gates && bunx checks-lint --night > reports/night-run-gates/gates.log 2>&1 || true
|
|
152
|
+
- uses: actions/upload-artifact@v4
|
|
153
|
+
with:
|
|
154
|
+
name: night-run-gates
|
|
155
|
+
path: reports/night-run-gates/
|
|
156
|
+
retention-days: 1
|
|
135
157
|
report:
|
|
136
|
-
needs: [mutation, tests]
|
|
158
|
+
needs: [mutation, gates, tests]
|
|
137
159
|
if: ${{ !cancelled() && needs.tests.result == 'success' }}
|
|
138
160
|
runs-on: ubuntu-latest
|
|
139
161
|
permissions:
|
|
@@ -151,13 +173,18 @@ jobs:
|
|
|
151
173
|
with:
|
|
152
174
|
name: night-run-mutation
|
|
153
175
|
path: reports/mutation
|
|
176
|
+
- if: needs.gates.result == 'success'
|
|
177
|
+
uses: actions/download-artifact@v4
|
|
178
|
+
with:
|
|
179
|
+
name: night-run-gates
|
|
180
|
+
path: reports/night-run-gates
|
|
154
181
|
- uses: actions/download-artifact@v4
|
|
155
182
|
with:
|
|
156
183
|
name: night-run-tests
|
|
157
184
|
path: reports/night-run-tests
|
|
158
185
|
- env:
|
|
159
186
|
GH_TOKEN: ${{ github.token }}
|
|
160
|
-
run: bunx checks-night-run ${{ needs.mutation.result == 'success' && '--mutation reports/mutation/mutation.json' || '' }} --tests reports/night-run-tests/live.xml --tests reports/night-run-tests/pixel.xml
|
|
187
|
+
run: bunx checks-night-run ${{ needs.mutation.result == 'success' && '--mutation reports/mutation/mutation.json' || '' }} --tests reports/night-run-tests/live.xml --tests reports/night-run-tests/pixel.xml ${{ needs.gates.result == 'success' && '--gates reports/night-run-gates/gates.log' || '' }}
|
|
161
188
|
- uses: actions/upload-artifact@v4
|
|
162
189
|
with:
|
|
163
190
|
name: night-run
|
|
@@ -171,14 +198,16 @@ A repository takes minute 7 of its own tier's 30 minute night window, so reposit
|
|
|
171
198
|
The tests job runs each long tier the repository holds, `live` and `pixel` as [checks-test](checks-test.md#test-tiers) names them, and keeps each JUnit report.
|
|
172
199
|
Each `|| true` lets the job go on to the upload after a failing test, since that test becomes an issue.
|
|
173
200
|
A tier that writes no report fails the report job, because `checks-night-run` cannot read it.
|
|
201
|
+
The gates job runs the nightly lint gates and keeps the log, since a failing gate becomes an issue.
|
|
174
202
|
The report job runs whenever the tests job succeeds, so a failing test that also stops Stryker still becomes an issue.
|
|
175
203
|
It passes `--mutation` only when the mutation job succeeded, and the failed mutation job still fails the run.
|
|
204
|
+
It passes `--gates` only when the gates job succeeded, and the failed gates job still fails the run.
|
|
176
205
|
The concurrency group queues a run started by hand behind the scheduled one, so two runs never file the same finding twice.
|
|
177
206
|
A dispatch on a branch runs both jobs and lists its findings in the report job's log, and `if-no-files-found: ignore` lets that run upload no record.
|
|
178
207
|
`issues: write` on the report job is the one permission beyond reading the repository and its runs.
|
|
179
208
|
A public repository keeps `runs-on: ubuntu-latest` on every job.
|
|
180
209
|
A private repository sets `runs-on` on the mutation job to the labels declared under `checks.mutationRunner` in `package.json`, and [checks-ci-wiring](checks-ci-wiring.md#runners) refuses a mutation job that names `CI_RUNS_ON`.
|
|
181
|
-
A private repository sets `runs-on: ${{ vars.CI_RUNS_ON || 'ubuntu-latest' }}` on the tests and report jobs.
|
|
210
|
+
A private repository sets `runs-on: ${{ vars.CI_RUNS_ON || 'ubuntu-latest' }}` on the tests, gates, and report jobs.
|
|
182
211
|
A successful run uploads `night-run`, so the next night compares with it, and a failed run uploads nothing a later night reads.
|
|
183
212
|
The artifact keeps 90 days, so a gap of nights still leaves a previous night to compare with.
|
|
184
213
|
|
|
@@ -25,10 +25,12 @@ A rebase keeps the entry's author date and moves the head's committer date forwa
|
|
|
25
25
|
```sh
|
|
26
26
|
checks-quarantine-clock <base-ref> <head-ref>
|
|
27
27
|
checks-quarantine-clock <ref>
|
|
28
|
+
checks-quarantine-clock --whole-tree <head-ref>
|
|
28
29
|
```
|
|
29
30
|
|
|
30
|
-
With two arguments it judges the head, and the base
|
|
31
|
+
With two arguments it judges the head, and the base must resolve but changes nothing.
|
|
31
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 --night` runs.
|
|
32
34
|
|
|
33
35
|
## Exit codes
|
|
34
36
|
|
|
@@ -47,7 +49,7 @@ quarantine-clock: 1 test(s) in tests/quarantine/ is past 30 days; fix each and m
|
|
|
47
49
|
|
|
48
50
|
## When it runs
|
|
49
51
|
|
|
50
|
-
`checks-lint` runs it
|
|
52
|
+
`checks-lint --night` runs it nightly in every repository, as [checks-lint](checks-lint.md) says.
|
|
51
53
|
A repository with no test file under `tests/quarantine/` passes with nothing checked.
|
|
52
54
|
|
|
53
55
|
## Related topics
|
|
@@ -12,11 +12,12 @@ 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
|
+
At night `checks-lint --night` 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.
|
|
15
16
|
A block two bins need goes into a module both import, as `rangeFromArgs` and `checkoutFiles` in `src/core/git.ts` show.
|
|
16
17
|
|
|
17
18
|
## What it reads
|
|
18
19
|
|
|
19
|
-
jscpd reads the head's `.jscpd.json` at
|
|
20
|
+
jscpd reads the head's `.jscpd.json` at each end it scans, so its `path` and `ignore` globs select the files to measure.
|
|
20
21
|
A `path` entry the base revision lacks reads as empty there, so a newly measured folder never fails the scan.
|
|
21
22
|
|
|
22
23
|
```json
|
|
@@ -27,33 +28,37 @@ A repository that lists `"css"` in `format` measures its stylesheets the same wa
|
|
|
27
28
|
|
|
28
29
|
The gate sets the 50 tokens and 5 lines itself, over any the file names.
|
|
29
30
|
A `threshold` the file names never fails the gate, which reads jscpd's report once the scan finishes.
|
|
30
|
-
The bin reads the
|
|
31
|
+
The bin reads the named commits rather than the working tree's file contents.
|
|
31
32
|
|
|
32
33
|
## Arguments
|
|
33
34
|
|
|
34
35
|
```sh
|
|
35
36
|
checks-repetition <base-ref> <head-ref>
|
|
36
37
|
checks-repetition <ref>
|
|
38
|
+
checks-repetition --whole-tree <head-ref>
|
|
37
39
|
```
|
|
38
40
|
|
|
41
|
+
With `--whole-tree` it scans the named head alone, which is the form `checks-lint --night` runs.
|
|
42
|
+
|
|
39
43
|
## Exit codes
|
|
40
44
|
|
|
41
45
|
| Code | Result |
|
|
42
46
|
| --- | --- |
|
|
43
|
-
| 0 |
|
|
44
|
-
| 1 |
|
|
47
|
+
| 0 | Across a range, no measured file repeated more lines. With `--whole-tree`, no measured file repeats lines at the head. |
|
|
48
|
+
| 1 | Across a range, at least one measured file repeated more lines. With `--whole-tree`, at least one measured file repeats lines at the head. |
|
|
45
49
|
| 2 | A config or ref is invalid, or jscpd cannot run. |
|
|
46
50
|
|
|
47
51
|
## Sample output
|
|
48
52
|
|
|
49
53
|
```
|
|
50
|
-
repetition: 1 file(s) .jscpd.json holds repeat
|
|
51
|
-
src/copy.ts: 10 repeated line(s)
|
|
54
|
+
repetition: 1 file(s) .jscpd.json holds repeat lines at the head, at 50 tokens and 5 lines:
|
|
55
|
+
src/copy.ts: 10 repeated line(s)
|
|
56
|
+
src/copy.ts:1-10 repeats src/ledger.ts:1-10
|
|
52
57
|
```
|
|
53
58
|
|
|
54
59
|
## When it runs
|
|
55
60
|
|
|
56
|
-
`checks-lint` runs it
|
|
61
|
+
`checks-lint --night` runs it nightly when the repository tracks a `.ts` or `.tsx` file.
|
|
57
62
|
When the head holds no `.jscpd.json`, the gate reports that no file was measured.
|
|
58
63
|
|
|
59
64
|
## Related topics
|
|
@@ -11,6 +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
|
+
At night `checks-lint --night` compares the head against the empty tree, so every count still present is reported until it is removed.
|
|
14
15
|
A count that fell and an entry that went both pass.
|
|
15
16
|
|
|
16
17
|
## What it reads
|
|
@@ -23,10 +24,12 @@ A commit without a file counts it as empty, so the commit that first adds a base
|
|
|
23
24
|
```sh
|
|
24
25
|
checks-suppressions-ratchet <base-ref> <head-ref>
|
|
25
26
|
checks-suppressions-ratchet <ref>
|
|
27
|
+
checks-suppressions-ratchet --whole-tree <head-ref>
|
|
26
28
|
```
|
|
27
29
|
|
|
28
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.
|
|
29
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 --night` runs.
|
|
30
33
|
|
|
31
34
|
## Exit codes
|
|
32
35
|
|
|
@@ -46,8 +49,8 @@ suppressions-ratchet: 2 count(s) rose or appeared; fix the site instead of suppr
|
|
|
46
49
|
|
|
47
50
|
## When it runs
|
|
48
51
|
|
|
49
|
-
`checks-lint` runs it
|
|
50
|
-
A repository with neither file passes
|
|
52
|
+
`checks-lint --night` runs it nightly in every repository, as [checks-lint](checks-lint.md) says.
|
|
53
|
+
A repository with neither file passes.
|
|
51
54
|
|
|
52
55
|
## Related topics
|
|
53
56
|
|