@willbooster/wb 22.19.0 → 22.20.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.md +12 -8
- package/dist/index.js +53 -54
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ Commands:
|
|
|
19
19
|
WB_ENV. Prefix scripts that write to remote
|
|
20
20
|
environments with this command to fail fast on
|
|
21
21
|
missing secrets.
|
|
22
|
-
wb code-gauge Print code-gauge
|
|
23
|
-
|
|
22
|
+
wb code-gauge Print code-gauge errors and warnings without
|
|
23
|
+
failing
|
|
24
24
|
wb concurrently <commands...> Run commands concurrently
|
|
25
25
|
wb deploy Deploy to the WB_ENV environment. A Cloudflare
|
|
26
26
|
Workers app (vinext or plain Worker): validate
|
|
@@ -187,12 +187,13 @@ A package whose `package.json` defines a `test/post` script gets a `post` phase:
|
|
|
187
187
|
|
|
188
188
|
For `wb verify` and `wb verify --full`, a log-write failure falls back to printing subsequent raw output. If a log cannot be completed, the command reports the log error and fails an otherwise successful run; an existing nonzero command exit status is preserved.
|
|
189
189
|
|
|
190
|
-
## Code-quality
|
|
190
|
+
## Code-quality checks
|
|
191
191
|
|
|
192
192
|
`wb code-gauge` runs [`code-gauge check`](https://github.com/WillBooster/code-gauge#threshold-check-code-gauge-check)
|
|
193
|
-
on the project and prints every threshold violation
|
|
194
|
-
duplicated blocks. `--base <ref>` limits them to what the working tree
|
|
195
|
-
with `<ref>`. The command always exits with 0, including when
|
|
193
|
+
on the project and prints every threshold violation as an error or a warning: functions and files
|
|
194
|
+
over a metric limit, and duplicated blocks. `--base <ref>` limits them to what the working tree
|
|
195
|
+
changed since the merge-base with `<ref>`. The command always exits with 0, including when there
|
|
196
|
+
are errors or the check cannot complete.
|
|
196
197
|
|
|
197
198
|
```sh
|
|
198
199
|
bun wb code-gauge
|
|
@@ -200,8 +201,11 @@ bun wb code-gauge --base origin/HEAD
|
|
|
200
201
|
```
|
|
201
202
|
|
|
202
203
|
`wb verify` and `wb verify --full` run the same check as their `code-gauge` step and print the
|
|
203
|
-
|
|
204
|
-
`origin/HEAD`, and at most 10 violations
|
|
204
|
+
violations after the recap: the totals per level, how many are in code changed since the merge-base
|
|
205
|
+
with `origin/HEAD`, and at most 10 violations: those in the changed code first, then the rest, each
|
|
206
|
+
group with its errors before its warnings. A limit milder than its line's level names its own, as in
|
|
207
|
+
`error: ... function cognitive complexity 56 (max 30), function ncss 61 (warning max 60)`. The step
|
|
208
|
+
never fails verification.
|
|
205
209
|
|
|
206
210
|
wb uses its own `code-gauge` and code-gauge's default thresholds; a `code-gauge.config.json` in the
|
|
207
211
|
repository overrides them.
|