Documentation
¶
Overview ¶
Package vacuumlint runs Vacuum with an effective OpenLint ruleset and turns its results into ifc7 findings. It is shared by the OpenAPI and JSON Schema lint plugins.
Index ¶
- func BuildRuleSet(rs *contract.RulesetDocument, kind Kind) (*rulesets.RuleSet, string, error)
- func Engine() contract.Engine
- func Failure(msg string) contract.LintOutput
- func Output(fs []contract.Finding, eng *contract.Engine) contract.LintOutput
- func Run(exec *motor.RuleSetExecution) contract.LintOutput
- type Kind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRuleSet ¶
BuildRuleSet turns an effective ruleset into a runnable Vacuum rule set for kind. Built-ins that don't apply to kind are dropped; if none apply, the kind's recommended set is used, so one org ruleset covers every interface type.
func Failure ¶
func Failure(msg string) contract.LintOutput
Failure is the exported form of failure for plugins that fail before running Vacuum (for example, unparsable input).
func Output ¶
Output sorts findings and builds the plugin output: ifc7 score with default weights, raw text rendered from findings, and finding counts.
func Run ¶
func Run(exec *motor.RuleSetExecution) contract.LintOutput
Run executes rs against spec and returns the plugin output.