Want to check against recommended rules?
Recommended rules are the default behavior from vacuum. If there is no ruleset supplied, vacuum will always run recommended rules only.
To explicitly define a ‘recommended only’ ruleset that can be customized, it’s easy to extend a ruleset the same way that Spectral does.
Create a new file (something like recommended-rules.yaml) and add the following YAML to it:
extends: [[spectral:oas, recommended]]
This creates a ruleset that extends ‘recommended’ rules. You can find this ruleset in the rulesets/examples directory, and it’s named recommended-ruleset.yaml
Now you can run any vacuum command that supports a ruleset.
Generating Recommended RuleSet.
To generate a complete RuleSet of every recommended rule and all the configurations used, vacuum contains a generate-ruleset
command
that accepts an ‘recommended’ option. This command only generates YAML files.
Will generate ‘my-ruleset-recommended.yaml’ and will be a complete listing of every recommended rule available.