Check it in CI
starboard lint is the whole check. Besides the errors in the reference
itself, it fails when a file is not in canonical form
(not-formatted) and when generated/ no
longer matches the sources (generated-stale).
Run it on every pull request and the reference cannot drift from what was
committed.
It exits 1 on errors. Warnings are reported but pass, unless you add
--strict. starboard rules lists every rule with its default severity,
and each rule has a page; see the
list of rules.
With the GitHub Action
Section titled “With the GitHub Action”Add a workflow, for example .github/workflows/starboard.yml:
name: Starboard
on: pull_request: push: branches: [main]
permissions: contents: read
jobs: starboard: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: c65llc/starboard@v0 with: version: v0.2.0 args: lint --strictThe Action downloads the release you name in version, checks its SHA-256
against the release’s checksums.txt, and runs it with args. @v0 always
points at the newest 0.x release of the Action; version pins the binary,
so the result changes only when you change it. The
Action reference lists every input.
This is the command it runs, which you can run first on your machine:
starboard lint --strict0 errors, 0 warningsIn other CI systems
Section titled “In other CI systems”Install the binary as in Install, then run starboard lint
(or starboard lint --strict) from the repository root. Any exit status
other than 0 should fail the job: 1 means findings, 2 means Starboard could
not run, for example because there is no starboard.yaml.
For a machine-readable report, which a CI annotation step or a coding agent
can read, use --json:
starboard lint --json{ "version": 1, "errors": [], "warnings": []}The JSON output reference describes each finding’s fields.
Before you push
Section titled “Before you push”The same check runs well as a git pre-commit hook, so a commit never carries an unformatted or stale reference:
starboard fmt --check && starboard lintstarboard skills hooks pre-commit prints a ready-made hook script; see
Working with coding agents.
When lint reports not-formatted or
generated-stale, starboard lint --fix
formats the sources and regenerates generated/, then checks again. Commit
what it changes.