@willbooster/wb 22.18.0 → 22.19.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.
Files changed (3) hide show
  1. package/README.md +21 -0
  2. package/dist/index.js +55 -54
  3. package/package.json +5 -4
package/README.md CHANGED
@@ -19,6 +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 threshold violations as
23
+ warnings without failing
22
24
  wb concurrently <commands...> Run commands concurrently
23
25
  wb deploy Deploy to the WB_ENV environment. A Cloudflare
24
26
  Workers app (vinext or plain Worker): validate
@@ -185,6 +187,25 @@ A package whose `package.json` defines a `test/post` script gets a `post` phase:
185
187
 
186
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.
187
189
 
190
+ ## Code-quality warnings
191
+
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: functions and files over a metric limit, and
194
+ duplicated blocks. `--base <ref>` limits them to what the working tree changed since the merge-base
195
+ with `<ref>`. The command always exits with 0, including when the check cannot complete.
196
+
197
+ ```sh
198
+ bun wb code-gauge
199
+ bun wb code-gauge --base origin/HEAD
200
+ ```
201
+
202
+ `wb verify` and `wb verify --full` run the same check as their `code-gauge` step and print the
203
+ warnings after the recap: the total, how many are in code changed since the merge-base with
204
+ `origin/HEAD`, and at most 10 violations, those first. The step never fails verification.
205
+
206
+ wb uses its own `code-gauge` and code-gauge's default thresholds; a `code-gauge.config.json` in the
207
+ repository overrides them.
208
+
188
209
  ## Slidev checks
189
210
 
190
211
  `wb slidev-check` checks slide text with textlint, then checks rendered Slidev decks.