-
-
Notifications
You must be signed in to change notification settings - Fork 77
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The README says vacuum lint -d -c <category> can be used to see a specific category of report.
Lines 351 to 368 in dc29a0b
| ## See just a specific category of report | |
| ``` | |
| ./vacuum lint -d -c schemas <your-openapi-spec.yaml> | |
| ``` | |
| The options here are: | |
| - `examples` | |
| - `operations` | |
| - `information` | |
| - `descriptions` | |
| - `schemas` | |
| - `security` | |
| - `tags` | |
| - `validation` | |
| - `owasp` |
And the help (still) shows the --category flag.
root@e5f08157e506:/work# vacuum version
v0.14.3
root@e5f08157e506:/work# vacuum lint --help
Lint an OpenAPI specification, the output of the response will be in the terminal
Usage:
vacuum lint <your-openapi-file.yaml> [flags]
Flags:
-a, --all-results Render out all results, regardless of the number when using -d
-c, --category string Show a single category of results
-d, --details Show full details of linting report
...However, no filtering can be seen by the --category flag in v0.5.0 and onward while the flag works nicely in v0.4.5.
$ docker run --rm -v `pwd`/openapi:/work:ro dshanley/vacuum:v0.5.0 lint -c validation -d /work/openapi.yaml
██╗ ██╗ █████╗ ██████╗██╗ ██╗██╗ ██╗███╗ ███╗
██║ ██║██╔══██╗██╔════╝██║ ██║██║ ██║████╗ ████║
██║ ██║███████║██║ ██║ ██║██║ ██║██╔████╔██║
╚██╗ ██╔╝██╔══██║██║ ██║ ██║██║ ██║██║╚██╔╝██║
╚████╔╝ ██║ ██║╚██████╗╚██████╔╝╚██████╔╝██║ ╚═╝ ██║
╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
version: latest | compiled: Wed, 11 Dec 2024 04:47:10 UTC
🔗 https://quobix.com/vacuum | https://github.com/daveshanley/vacuum
INFO Linting file '/work/openapi.yaml' against 42 rules: https://quobix.com/vacuum/rulesets/recommended
/work/openapi.yaml
------------------
Location | Severity | Message | Rule | Category | Path
vvvvvvvvvvvvvvvvvvvvvv
> HUNDREDS OF LINES HERE <
^^^^^^^^^^^^^^^^^^^^^^
| | ...513 more violations not rendered. |
Category | Errors | Warnings | Info
Operations | 0 | 24 | 0
Tags | 0 | 76 | 0
Schemas | 0 | 4 | 0
Validation | 1 | 0 | 0
Descriptions | 0 | 73 | 282
Examples | 0 | 253 | 0
Error: failed with 1 errors
Linting file '/work/openapi.yaml' failed with 1 errors, 430
warnings and 282 informs
$ docker run --rm -v `pwd`/openapi:/work:ro dshanley/vacuum:v0.4.5 lint -c validation -d /work/openapi.yaml
██╗ ██╗ █████╗ ██████╗██╗ ██╗██╗ ██╗███╗ ███╗
██║ ██║██╔══██╗██╔════╝██║ ██║██║ ██║████╗ ████║
██║ ██║███████║██║ ██║ ██║██║ ██║██╔████╔██║
╚██╗ ██╔╝██╔══██║██║ ██║ ██║██║ ██║██║╚██╔╝██║
╚████╔╝ ██║ ██║╚██████╗╚██████╔╝╚██████╔╝██║ ╚═╝ ██║
╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
version: latest | compiled: Wed, 11 Dec 2024 04:45:56 UTC
🔗 https://quobix.com/vacuum | https://github.com/daveshanley/vacuum
INFO Linting against 42 rules: https://quobix.com/vacuum/rulesets/recommended
# Validation Issues
Line / Column | Severity | Message | Rule | Path
(5495:3) | error | Server URL is not valid: must not have a trailing slash | oas3-api-servers | $.servers[0].url
Category | Errors | Warnings | Info
Operations | 0 | 24 | 0
Tags | 0 | 76 | 0
Schemas | 0 | 4 | 0
Validation | 1 | 0 | 0
Descriptions | 0 | 73 | 282
Examples | 0 | 253 | 0
Linting failed with 1 errors, 430 warnings and 282 informs
Looking back, the filtering by --category flag seems to have been dropped in this commit: d5fbf0d#diff-c192182bd1736dfde898947b8eef754b5381e85cc177945f935c65b4b087b2ceL148-L170
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working