Linting with golangci-lint

The Go backend uses golangci-lint for static analysis. It runs locally for fast developer feedback and in CI as a non-blocking quality signal alongside the deploy job.

Running Locally

If golangci-lint is not installed:

Enabled Linters

The pragmatic linter set is configured in backend/go/.golangci.yml: errcheck is excluded on *_test.go files — test helper calls frequently return errors that are already visible through assertion failures.

CI Integration

A lint-go job runs in .github/workflows/backend-flyio-deploy.yml whenever files under backend/go/** change. It uses the official golangci/golangci-lint-action@v6 action pinned to v1.64. The job runs in parallel with deploy-go-backend — a lint failure does not block a deploy. This is intentional while the baseline is being cleaned up.

Suppressing False Positives

Use //nolint:<linter> with a comment explaining why:
Avoid blanket //nolint without a linter name.

Migration Path to Blocking CI

Once the baseline lint warnings are resolved, make lint a required check before deploy by adding a needs dependency: