---
name: golangci-lint
description: "Use when adopting golangci-lint to assess this standard: Run one Go lint profile in CI"
---

# Apply golangci-lint

Pin the aggregate linter and commit the enabled checks. Run it across the module using the same build tags and Go version as the project.

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by golangci-lint.
2. Use golangci-lint in this repository to meet this standard: Run one Go lint profile in CI. Pin the aggregate linter and commit the enabled checks. Run it across the module using the same build tags and Go version as the project. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
3. Record the tool version, configuration, scope and findings. Explain any checks that could not run.
4. Use the same invocation after changes and compare the evidence against the baseline.

Refer to [the upstream documentation](https://golangci-lint.run/) for configuration and prerequisites.

## Tool invocation

```
golangci-lint run
```
