@yuu1111/quality-check 1.0.0 → 4.0.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/README.ja.md +102 -46
- package/README.md +105 -49
- package/dist/cli.js +21876 -419
- package/package.json +11 -14
- package/schema.json +688 -0
- package/src/config.ts +0 -490
- package/src/engines.ts +0 -403
package/README.ja.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# @yuu1111/quality-check
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
設定したengineを1つのCLIで実行し baselineの差分判定も持つ統合runner
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -10,14 +10,13 @@ Projectごとのscriptから個別に呼んでいたBiome、型検査、Knip、c
|
|
|
10
10
|
bun add -D @yuu1111/quality-check
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
package
|
|
15
|
-
|
|
16
|
-
`@yuu1111/code-style-check` を宣言するProjectではKnipが未使用依存として報告するため `knip.ts` の `ignoreDependencies` で理由付きに宣言する
|
|
13
|
+
4つの検出engine `code-style-check`、`comment-check`、`document-style-check`、`tsdoc-check` はこのpackageへ同梱する
|
|
14
|
+
`bun build` がprivateなworkspace packageを `dist/cli.js` へbundleするため、このpackageを導入すればengine packageの追加導入も実行時の解決も要らない
|
|
15
|
+
Biome、`tsc`、Knipは子プロセスのままで、利用Projectの `node_modules/.bin` から解決する
|
|
17
16
|
|
|
18
17
|
## Usage
|
|
19
18
|
|
|
20
|
-
`quality.
|
|
19
|
+
`quality.json` で起動するengineを指定し、scriptから起動する
|
|
21
20
|
|
|
22
21
|
```json
|
|
23
22
|
{
|
|
@@ -28,27 +27,35 @@ package managerはこのCLIと一緒に導入し、engineのbinaryは利用Proje
|
|
|
28
27
|
```
|
|
29
28
|
|
|
30
29
|
```ts
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
30
|
+
{
|
|
31
|
+
"$schema": "./node_modules/@yuu1111/quality-check/schema.json",
|
|
32
|
+
"biome": {
|
|
33
|
+
"enabled": true
|
|
34
|
+
},
|
|
35
|
+
"comment-check": {
|
|
36
|
+
"enabled": true,
|
|
37
|
+
"ignore": ["another-project"],
|
|
38
|
+
"rules": {
|
|
39
|
+
"preset": "recommended",
|
|
40
|
+
"content": {
|
|
41
|
+
"japanese-period": "on"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"document-style-check": {
|
|
46
|
+
"enabled": true,
|
|
47
|
+
"rules": {
|
|
48
|
+
"preset": "all"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"tsdoc-check": {
|
|
52
|
+
"enabled": true,
|
|
53
|
+
"rules": {
|
|
54
|
+
"preset": "all"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"failOnWarnings": true
|
|
58
|
+
}
|
|
52
59
|
```
|
|
53
60
|
|
|
54
61
|
engineごとの出力と所要時間、集約summaryを並べて出し、どのengineが失敗したかと実行にかかった合計時間を1回の実行で示す
|
|
@@ -73,25 +80,26 @@ quality-check: 1 of 3 engines failed (1250ms)
|
|
|
73
80
|
|
|
74
81
|
| Field | 説明 |
|
|
75
82
|
|-------|-------------|
|
|
76
|
-
|
|
|
77
|
-
| `
|
|
83
|
+
| `<engine>` | engineごとのsectionで `enabled` が起動を決める |
|
|
84
|
+
| `<engine>.rules` | 同梱する4つの検出engineのrule選択 |
|
|
85
|
+
| `failOnWarnings` | warningを阻害する検出として扱う |
|
|
78
86
|
| `baseline` | baseline fileのpath `false` なら差分判定を行わない |
|
|
79
87
|
|
|
80
88
|
engineは `biome` → `typecheck` → `knip` → `code-style-check` → `comment-check` → `document-style-check` → `tsdoc-check` の順に実行する
|
|
81
89
|
|
|
82
|
-
|
|
90
|
+
engineごとのsectionが `enabled` とそのengineが受け取る条件を持つ engineが受け取らない条件は設定errorにし、打ち間違いが黙って無視されないようにする `biome`、`typecheck`、`knip` は子プロセスで起動し、4つの検出engineはin-processで起動する
|
|
83
91
|
|
|
84
92
|
| Engine | Command | 条件 |
|
|
85
|
-
|
|
93
|
+
|--------|---------|--------------|
|
|
86
94
|
| `biome` | `biome check` | `targets`、`args` 除外pathは `biome.json` が持つ |
|
|
87
95
|
| `typecheck` | `tsc --noEmit` | `args`、`projects` 設定は `tsconfig.json` が持つ |
|
|
88
96
|
| `knip` | `knip` | `args` 設定は `knip.ts` が持つ |
|
|
89
|
-
| `code-style-check` |
|
|
90
|
-
| `comment-check` |
|
|
91
|
-
| `document-style-check` |
|
|
92
|
-
| `tsdoc-check` |
|
|
97
|
+
| `code-style-check` | in-process | `ignore`、`targets`、`rules` |
|
|
98
|
+
| `comment-check` | in-process | `ignore`、`targets`、`rules` |
|
|
99
|
+
| `document-style-check` | in-process | `ignore`、`targets`、`rules` |
|
|
100
|
+
| `tsdoc-check` | in-process | `ignore`、`targets`、`rules` |
|
|
93
101
|
|
|
94
|
-
`args`
|
|
102
|
+
`args` は子プロセスengineだけが受け取り、engineの既定引数の後ろへ足す
|
|
95
103
|
設定fileで表せない起動条件や、engineの引数が変わったときの逃げ道として使う
|
|
96
104
|
|
|
97
105
|
engineが受け取らない条件は渡さず、その旨をそのengineのsectionへ出す
|
|
@@ -101,30 +109,78 @@ engineが受け取らない条件は渡さず、その旨をそのengineのsecti
|
|
|
101
109
|
biome: ignore skipped (biome.json holds its settings)
|
|
102
110
|
```
|
|
103
111
|
|
|
104
|
-
`
|
|
105
|
-
`
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
`
|
|
110
|
-
|
|
112
|
+
`rules` は同梱するengineのどのruleを実行してどう報告するかを選ぶ
|
|
113
|
+
`rules.preset` は一括で選び `recommended` はengineの既定 `all` は全て有効 `none` は全て無効にする
|
|
114
|
+
group名のkeyはengineが公開するruleのまとまりで、そのgroupの全ruleへ `off`、`on`、`error` を渡す
|
|
115
|
+
group名の下のobjectはruleを1つずつ選ぶ
|
|
116
|
+
具体的な指定が勝つため preset、group、rule の順に書ける
|
|
117
|
+
`off` は既定で有効なruleにも渡せ、`on` はengineの既定severityのままにする
|
|
118
|
+
`error` を取れるのは `tsdoc-check` だけで、そのruleを違反へ上げ opt-inのruleは先に有効にする
|
|
119
|
+
engineが知らないgroup名やrule名は設定errorになり、配布する `schema.json` がeditorへ同じ語彙を教える
|
|
120
|
+
選んだruleは同梱するengineへ直接渡すため、CLIは `--enable`、`--disable`、`--error` へは変換しない
|
|
111
121
|
|
|
112
|
-
|
|
113
|
-
新規と解消済みの判定はengineごとではなく統合CLIが1つのbaseline fileで行うため、既存の `comment-baseline.json` がある場合は `--update-baseline` で移す
|
|
122
|
+
検出engineはbaselineを持たないため、新規と解消済みの判定はengineごとではなく統合CLIが1つのbaseline fileで行う
|
|
114
123
|
|
|
115
124
|
`typecheck` は `projects` に並べたtsconfigごとに `tsc --noEmit -p <path>` を起動する
|
|
116
125
|
省略時はカレントの `tsconfig.json` を1回だけ読む
|
|
117
126
|
|
|
127
|
+
## Baseline
|
|
128
|
+
|
|
129
|
+
既存のtreeへ検査を導入するProjectは、その時点の検出を `quality-baseline.json` へ記録し、後から増えた検出だけを失敗にする
|
|
130
|
+
`--update-baseline` はそのfileを現在の検出で置き換える
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
quality-check --update-baseline
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
実行のたびに新規の検出を報告し、現れなくなったbaselineのentryを `resolved` として数える
|
|
137
|
+
新規の検出は直し、意図して受け入れるときだけ `--update-baseline` を実行する
|
|
138
|
+
entryの同一性はengineとruleとfileと検出messageで決まるため、messageが変わるとそのruleは再登録が必要になる
|
|
139
|
+
`quality.json` の `baseline` を `false` にすると差分判定を行わず、全ての検出を報告する
|
|
140
|
+
|
|
141
|
+
## Commands
|
|
142
|
+
|
|
143
|
+
`quality-check document-style` は同梱する `document-style-check` の検証記録を実行する
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
quality-check document-style lint .
|
|
147
|
+
quality-check document-style lint --write .
|
|
148
|
+
quality-check document-style lint --enable japanese-period .
|
|
149
|
+
quality-check document-style scan doc.md --rules SKILL.md --review review.json
|
|
150
|
+
quality-check document-style check doc.md --rules SKILL.md --review review.json
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
| Command | 説明 |
|
|
154
|
+
|---------|-------------|
|
|
155
|
+
| `scan` | 対象文書の未確認の検証記録を書き出す |
|
|
156
|
+
| `check` | 埋めた検証記録を現在の本文と基準に対して確認する |
|
|
157
|
+
| `lint` | 機械的な違反を報告し、`--write`で整形する |
|
|
158
|
+
|
|
159
|
+
記録は本文と基準のhashを固定するため、どちらかを編集すると無効になる `check`が保証するのは全項目に判断と根拠があることだけで、文体判断の正しさは別に確認する
|
|
160
|
+
|
|
118
161
|
## Options
|
|
119
162
|
|
|
120
163
|
| Option | 説明 |
|
|
121
164
|
|--------|-------------|
|
|
122
|
-
| `--config <path>` | 読み込むconfig file(既定は `quality.
|
|
165
|
+
| `--config <path>` | 読み込むconfig file(既定は `quality.json`) |
|
|
123
166
|
| `--baseline <path>` | baseline fileを上書きする |
|
|
124
167
|
| `--ignore <path>` | 除外pathを追加する、複数指定できる |
|
|
125
168
|
| `--update-baseline` | 現在の検出でbaselineを置き換える |
|
|
126
169
|
| `--json` | engineごとの結果をJSONで出力する |
|
|
170
|
+
| `document-style <command>` | 検証記録を実行する(`scan`、`check`、`lint`) |
|
|
127
171
|
|
|
128
172
|
`--ignore` と位置引数の対象pathは、その条件を受け取るengineへだけ渡す
|
|
129
173
|
|
|
174
|
+
### document-style
|
|
175
|
+
|
|
176
|
+
| Option | 説明 |
|
|
177
|
+
|--------|-------------|
|
|
178
|
+
| `--rules <path>` | `## 判断基準`を持つ基準fileで、`scan`と`check`では必須 |
|
|
179
|
+
| `--review <path>` | 読み書きする検証記録file |
|
|
180
|
+
| `--enable <rule>` | opt-in ruleを実行する、複数指定できる |
|
|
181
|
+
| `--disable <rule>` | 既定で有効なruleも含めて無効にする、複数指定できる |
|
|
182
|
+
| `--ignore <path>` | 検査から外すpath、複数指定できる |
|
|
183
|
+
| `--write` | 報告の代わりに整形を適用する |
|
|
184
|
+
| `--json` | 検出をJSONで出力する |
|
|
185
|
+
|
|
130
186
|
色は標準出力が端末のときだけ付ける `NO_COLOR` で無効にし、`FORCE_COLOR` で強制できる `--json` の出力には付けない
|
package/README.md
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# @yuu1111/quality-check
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
The baseline diff lives here too.
|
|
5
|
+
Integrated CLI that runs the configured engines and owns the baseline diff.
|
|
7
6
|
|
|
8
7
|
## Install
|
|
9
8
|
|
|
@@ -11,14 +10,13 @@ The baseline diff lives here too.
|
|
|
11
10
|
bun add -D @yuu1111/quality-check
|
|
12
11
|
```
|
|
13
12
|
|
|
14
|
-
`comment-check`, `document-style-check`, and `tsdoc-check` are
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
A project that declares `@yuu1111/code-style-check` sees Knip report it as an unused dependency, so it names it in `ignoreDependencies` with the reason.
|
|
13
|
+
The four finding engines `code-style-check`, `comment-check`, `document-style-check`, and `tsdoc-check` are built into this package.
|
|
14
|
+
`bun build` bundles those private workspace packages into `dist/cli.js`, so installing this package is enough and no engine package has to be installed or resolved at run time.
|
|
15
|
+
Biome, `tsc`, and Knip stay child processes and resolve from the project's `node_modules/.bin`.
|
|
18
16
|
|
|
19
17
|
## Usage
|
|
20
18
|
|
|
21
|
-
Declare the engines to run
|
|
19
|
+
Declare the engines to run in `quality.json`, then call the CLI from a script:
|
|
22
20
|
|
|
23
21
|
```json
|
|
24
22
|
{
|
|
@@ -29,27 +27,35 @@ Declare the engines to run and the conditions of each engine in `quality.config.
|
|
|
29
27
|
```
|
|
30
28
|
|
|
31
29
|
```ts
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
30
|
+
{
|
|
31
|
+
"$schema": "./node_modules/@yuu1111/quality-check/schema.json",
|
|
32
|
+
"biome": {
|
|
33
|
+
"enabled": true
|
|
34
|
+
},
|
|
35
|
+
"comment-check": {
|
|
36
|
+
"enabled": true,
|
|
37
|
+
"ignore": ["another-project"],
|
|
38
|
+
"rules": {
|
|
39
|
+
"preset": "recommended",
|
|
40
|
+
"content": {
|
|
41
|
+
"japanese-period": "on"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"document-style-check": {
|
|
46
|
+
"enabled": true,
|
|
47
|
+
"rules": {
|
|
48
|
+
"preset": "all"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"tsdoc-check": {
|
|
52
|
+
"enabled": true,
|
|
53
|
+
"rules": {
|
|
54
|
+
"preset": "all"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"failOnWarnings": true
|
|
58
|
+
}
|
|
53
59
|
```
|
|
54
60
|
|
|
55
61
|
Each engine prints its own section with its own time, and the summary names the engines that failed and the total time the run took:
|
|
@@ -74,59 +80,109 @@ Exit code 0 means every engine passed, 1 that at least one failed, and 2 that th
|
|
|
74
80
|
|
|
75
81
|
| Field | Description |
|
|
76
82
|
|-------|-------------|
|
|
77
|
-
|
|
|
78
|
-
| `
|
|
83
|
+
| `<engine>` | One section per engine; `enabled` starts it |
|
|
84
|
+
| `<engine>.rules` | Rule selection of the four built-in finding engines |
|
|
85
|
+
| `failOnWarnings` | Treat every warning as a blocking finding |
|
|
79
86
|
| `baseline` | Baseline file path; `false` disables the diff |
|
|
80
87
|
|
|
81
88
|
Engines run in the order `biome`, `typecheck`, `knip`, `code-style-check`, `comment-check`, `document-style-check`, `tsdoc-check`.
|
|
82
89
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
Each engine owns a top-level section that holds `enabled` and the conditions that engine takes.
|
|
91
|
+
A condition an engine does not take is rejected, so a typo fails at start-up instead of being ignored.
|
|
92
|
+
`biome`, `typecheck`, and `knip` run as child processes, and the four finding engines run in-process.
|
|
86
93
|
|
|
87
94
|
| Engine | Command | Conditions |
|
|
88
95
|
|--------|---------|------------|
|
|
89
96
|
| `biome` | `biome check` | `targets`, `args`; `biome.json` holds the excluded paths |
|
|
90
97
|
| `typecheck` | `tsc --noEmit` | `args`, `projects`; `tsconfig.json` holds the settings |
|
|
91
98
|
| `knip` | `knip` | `args`; `knip.ts` holds the settings |
|
|
92
|
-
| `code-style-check` |
|
|
93
|
-
| `comment-check` |
|
|
94
|
-
| `document-style-check` |
|
|
95
|
-
| `tsdoc-check` |
|
|
99
|
+
| `code-style-check` | in-process | `ignore`, `targets`, `rules` |
|
|
100
|
+
| `comment-check` | in-process | `ignore`, `targets`, `rules` |
|
|
101
|
+
| `document-style-check` | in-process | `ignore`, `targets`, `rules` |
|
|
102
|
+
| `tsdoc-check` | in-process | `ignore`, `targets`, `rules` |
|
|
96
103
|
|
|
97
|
-
`args` is appended after the engine defaults, for conditions the config cannot express and for the case where an engine changes its arguments.
|
|
104
|
+
`args` applies only to the child-process engines and is appended after the engine defaults, for conditions the config cannot express and for the case where an engine changes its arguments.
|
|
98
105
|
|
|
99
|
-
A
|
|
106
|
+
A command line override an engine does not take is not passed on, and the section says so:
|
|
100
107
|
|
|
101
108
|
```text
|
|
102
109
|
== biome ==
|
|
103
110
|
biome: ignore skipped (biome.json holds its settings)
|
|
104
111
|
```
|
|
105
112
|
|
|
106
|
-
`
|
|
107
|
-
`
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
The
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
`rules` selects which rules of the built-in engines run and how they are reported.
|
|
114
|
+
`rules.preset` selects in bulk: `recommended` is the engine default, `all` turns every rule on, and `none` turns every rule off.
|
|
115
|
+
A group key names one of the rule groups the engine publishes and takes `off`, `on`, or `error` for every rule in that group.
|
|
116
|
+
An object under a group key names single rules.
|
|
117
|
+
The most specific setting wins, so a preset, a group, and a rule may be written in that order.
|
|
118
|
+
`off` also works for a rule that is on by default, and `on` keeps the engine default severity.
|
|
119
|
+
Only `tsdoc-check` takes `error`, which raises the rule and turns an opt-in rule on first.
|
|
120
|
+
A group or rule name that the engine does not know is a configuration error, and the published `schema.json` teaches an editor the same names.
|
|
121
|
+
The selection is handed to the built-in engines directly, so the CLI no longer turns it into `--enable`, `--disable`, or `--error` arguments.
|
|
113
122
|
|
|
114
|
-
|
|
115
|
-
The new-and-resolved diff is done by this CLI from a single baseline file, so an existing `comment-baseline.json` is moved over with `--update-baseline`.
|
|
123
|
+
No check engine keeps a baseline of its own, so the new-and-resolved diff is done by this CLI from a single baseline file.
|
|
116
124
|
|
|
117
125
|
`typecheck` starts `tsc --noEmit -p <path>` once per path in `projects`, and falls back to the current `tsconfig.json`.
|
|
118
126
|
|
|
127
|
+
## Baseline
|
|
128
|
+
|
|
129
|
+
A project that adopts the checks on an existing tree records the findings it has today in `quality-baseline.json`, so only the findings it adds later fail.
|
|
130
|
+
`--update-baseline` replaces that file with the current findings:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
quality-check --update-baseline
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Every run reports the new findings and counts the baseline entries that no longer appear as `resolved`.
|
|
137
|
+
Fix the new findings, and run `--update-baseline` only when the team accepts one on purpose.
|
|
138
|
+
An entry is identified by its engine, rule, file, and message, so a change to a message re-baselines that rule.
|
|
139
|
+
Set `baseline` to `false` in `quality.json` to diff nothing and report every finding.
|
|
140
|
+
|
|
141
|
+
## Commands
|
|
142
|
+
|
|
143
|
+
`quality-check document-style` runs the review ledger of the built-in `document-style-check` engine:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
quality-check document-style lint .
|
|
147
|
+
quality-check document-style lint --write .
|
|
148
|
+
quality-check document-style lint --enable japanese-period .
|
|
149
|
+
quality-check document-style scan doc.md --rules SKILL.md --review review.json
|
|
150
|
+
quality-check document-style check doc.md --rules SKILL.md --review review.json
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
| Command | Description |
|
|
154
|
+
|---------|-------------|
|
|
155
|
+
| `scan` | Write an unconfirmed review record for the given documents |
|
|
156
|
+
| `check` | Verify a filled review record against the current documents and rules |
|
|
157
|
+
| `lint` | Report mechanical violations, or fix them with `--write` |
|
|
158
|
+
|
|
159
|
+
The review file pins the document bytes and the rules bytes by hash, so editing either one invalidates the record.
|
|
160
|
+
`check` only confirms that every candidate carries a decision and a reason; it does not judge the writing.
|
|
161
|
+
|
|
119
162
|
## Options
|
|
120
163
|
|
|
121
164
|
| Option | Description |
|
|
122
165
|
|--------|-------------|
|
|
123
|
-
| `--config <path>` | Config file to load (default `quality.
|
|
166
|
+
| `--config <path>` | Config file to load (default `quality.json`) |
|
|
124
167
|
| `--baseline <path>` | Override the baseline file |
|
|
125
168
|
| `--ignore <path>` | Add an excluded path, repeatable |
|
|
126
169
|
| `--update-baseline` | Replace the baseline with the current findings |
|
|
127
170
|
| `--json` | Print the per-engine results as JSON |
|
|
171
|
+
| `document-style <command>` | Run the review ledger (`scan`, `check`, or `lint`) |
|
|
128
172
|
|
|
129
173
|
`--ignore` and the positional targets reach only the engines that take them.
|
|
130
174
|
|
|
175
|
+
### document-style
|
|
176
|
+
|
|
177
|
+
| Option | Description |
|
|
178
|
+
|--------|-------------|
|
|
179
|
+
| `--rules <path>` | Rules file that holds the criteria, required by `scan` and `check` |
|
|
180
|
+
| `--review <path>` | Review file to write or read |
|
|
181
|
+
| `--enable <rule>` | Run an opt-in rule, repeatable |
|
|
182
|
+
| `--disable <rule>` | Turn a rule off, repeatable |
|
|
183
|
+
| `--ignore <path>` | Path to leave out, repeatable |
|
|
184
|
+
| `--write` | Apply `lint` fixes instead of reporting them |
|
|
185
|
+
| `--json` | Print findings as JSON |
|
|
186
|
+
|
|
131
187
|
Color is added only when stdout is a terminal.
|
|
132
188
|
`NO_COLOR` turns it off and `FORCE_COLOR` turns it on; the `--json` output stays plain.
|