GolangCI Lint support on Cirrus CI

Fedor Korotkov
CirrusLabs
Published in
1 min readMar 17, 2020

It’s always hard to hear that fellow DevTools startups have difficulties and had to close partially or fully. Last week GolangCI announced that they are going to shutdown their SaaS offering of GolangCI Lint (golangci.com).

Congrats Denis Isaev and everyone involved on the run! 🙌

Cirrus CI already supported GitHub Annotations for providing rich reports right in GitHub UI and we just added support for GolangCI Lint report format for easier migration.

GolangCI Lint reporting via Cirrus CI

Here is an example of a Cirrus CI task that uses the official golangci-lint Docker image to generate a JSON report and store it as a Cirrus CI Artifact. Secret sauce now is that you can set goalngci as a formatfor the artifacts and Cirrus CI Annotator will be able to parse the report.

task:
name: GolangCI Lint
container:
image: golangci/golangci-lint:latest
run_script:
- golangci-lint run -v --out-format json > lint-report.json
always:
golangci_artifacts:
path: lint-report.json
type: text/json
format: golangci

We highly encourage everyone to try Cirrus CI. It’s free for public repositories and all organizations get 200 CPU hours worth of compute credits to try it on private repositories.

As always don’t hesitate to ping support or ask any questions on Twitter.

--

--