View Single Post
Old 08-22-2026, 01:03 PM   #232
Kayadelenium
Connoisseur
Kayadelenium rocks like Gibraltar!Kayadelenium rocks like Gibraltar!Kayadelenium rocks like Gibraltar!Kayadelenium rocks like Gibraltar!Kayadelenium rocks like Gibraltar!Kayadelenium rocks like Gibraltar!Kayadelenium rocks like Gibraltar!Kayadelenium rocks like Gibraltar!Kayadelenium rocks like Gibraltar!Kayadelenium rocks like Gibraltar!Kayadelenium rocks like Gibraltar!
 
Kayadelenium's Avatar
 
Posts: 89
Karma: 100000
Join Date: Jul 2026
Location: Planet Earth
Device: Kobo Forma
0.11.0 is out with all three of your requests, Doitsu — crates.io, npm and the binaries, so the plugin will pick it up.

`-u` now decides what every format contains. You were right that one flag meaning two things depending on `--format` is not something anyone should have to remember, and measuring settled the rest: epubcheck's own `-u` gates its JSON too, `nUsage` included. Same book, both tools, before and after:

```
epubcheck epubveri 0.11.0
no -u nUsage=0, 1 message usage=0, 1 item
-u nUsage=1, 2 messages usage=1, 2 items
```

`--format ids` follows the same rule. My advice for the plugin is to pass `-u` and filter in your own UI — one run, and your toggle does not have to re-invoke the validator.

One thing to expect when you re-test, since it is what produced your original report: `--advisory` findings still print without `-u`. They are emitted at usage severity, so a filter written as "hide usage" would make that flag silently do nothing. `--advisory` is their switch, `-u` is everyone else's. So `--format json --advisory` with no `-u` now shows `ADV-`/`NEXT-` and nothing else at usage severity.

The summary has all five counts, and this is a breaking change for you — the keys are singular now, so `errors`/`warnings` are `error`/`warning`, plus `fatal`, `info` and `usage`. Your note about the grammar is why: "information has no plural and usages doesn't make sense" is correct, and doing it while the counts were being added meant one break instead of two. `fatal`, `info` and `usage` are omitted when zero, as `fatal` already was; `error` and `warning` are always present. They describe what the output contains, so with no `-u` the usage count is 0 rather than a number you cannot see the findings for — again, what epubcheck does.

```json
"summary": { "error": 1, "warning": 0, "usage": 1 }
```

The browser build mirrors the same shape, but has no flag to filter on and so always returns everything.

What has not changed, deliberately: the library API still never filters. `validate_bytes` returns every finding at every severity whatever the CLI was given. That is the boundary that matters — a repair tool dispatching on findings below error severity would otherwise go quietly dark — and it is the one thing I was actually protecting when I got the CLI half wrong.

Thank you for pushing on it. I had written the reasoning down as a decision before you replied, including what would make me reverse it, and you produced exactly that, so the record now says superseded rather than defended.
Kayadelenium is offline   Reply With Quote