golangci-lint

The golangci-lint Go linter, built with the workstation's Go toolchain onto the system PATH.

Installs golangci-lint by building it with the workstation’s Go toolchain and placing the binary in /usr/local/bin, so it is on the PATH of both root and the login user.

devtools:
  - name: go
  - name: golangci-lint

Version behavior

versionResult
omitteda pinned default release, chosen to be a known-good v2
v2.13.0that exact release tag
2.13.0normalized to v2.13.0
latestthe newest release, resolved at install time

Dependency on Go

The recipe needs a Go toolchain to install the linter. If go is declared first, that toolchain is used. If no Go toolchain is present at all, the recipe installs the distribution’s Go package as a fallback, which is usually older and occasionally too old for the pinned linter. Declare go explicitly whenever you care which toolchain builds it.

Example

devtools:
  - name: go
    version: "1.22.5"
  - name: golangci-lint
    version: v2.13.0

Notes

  • The install check runs golangci-lint version, so a partially written binary from an interrupted install is detected and replaced.
  • Changing version reinstalls on the next setup run.
  • Works on Debian, Ubuntu, and Alpine.