Got an OpenLint ruleset? Run it with vacuum. Add --openlint and pass your rules with -r.

vacuum lint api.yaml --openlint -r rules.yaml

Leave the flag off and vacuum works as usual. Your existing rules, reports and integrations keep their native behaviour.

Bring your rules

A small rules.yaml to get started:

rules:
  info-title:
    severity: error
    given: $.info
    then:
      field: title
      function: truthy

Use -r, or set ruleset in your configuration. OpenLint mode requires an explicit ruleset. It does not load vacuum’s recommended rules or download rules for you.

Local YAML rulesets can use custom JavaScript through functions and functionsDir. Local JavaScript rulesets work too. Network limits and function timeouts still apply.


What changes?

The flag selects OpenLint’s rule behaviour:

  • Empty objects and arrays are truthy.
  • String lengths use UTF-16 code units.
  • Schema validation defaults to draft 7.
  • Rulesets follow the OpenLint schema.
  • Overrides apply per input file.

Results use zero-based source ranges. Findings in resolved references point to the source definition.

JSON and YAML inputs can be objects, arrays or scalars. Format detection selects which rules run.

Commands

Use --openlint with lint, report, spectral-report, html-report, dashboard or language-server.

vacuum spectral-report api.yaml results.json --openlint -r rules.yaml

Autofix uses native mode. Do not combine --openlint with --fix.


Compatibility checks

vacuum passes 252/252 tests for the pinned OpenLint v1 draft. Every PR and main build runs the suite. A mismatch fails the build.

The upstream fixtures are unchanged. The runner has one correction: it checks each range endpoint named by a test, and allows the required end position when a test only names the start. Incorrect positions still fail.

Run the same check from the vacuum source checkout:

GOWORK=off node scripts/test-openlint.mjs

You need Go, Node.js and Git. The first run downloads the pinned test repositories. Later runs reuse .cache/openlint.

The standard is still a draft. The supported revision is pinned so an upstream change cannot silently change your results.