Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

4,229 Commits

Folders and files

Repository files navigation

gopherlint

A stable, bugfix-only fork of golangci-lint.

Purpose

gopherlint exists for teams that want a linter that doesn't change between releases. golangci-lint is an excellent project that moves quickly — adding linters, improving defaults, and keeping pace with the Go ecosystem. This fork trades that freshness for predictability.

What changes: Only backported bugfixes from upstream, or original fixes for regressions. No new features, no linter additions or removals, no config-breaking changes.

What doesn't change: The linter set, configuration format, behavior, and CLI interface remain frozen for the life of a major version.

Based on

golangci-lint v2.13.1

Versioning

v1.GOMAJOR.PATCH
Segment Meaning
1 Fork major version — stable, no breaking changes
GOMAJOR Major Go version this release targets (e.g. 27 = Go 1.27)
PATCH Bugfix increment

Example: v1.27.0 is the first release targeting Go 1.27, based on golangci-lint v2.13.1.

Installation

Install script (recommended)

curl -sSfL https://raw.githubusercontent.com/flimzy/gopherlint/main/install.sh | sh -s -- -b /usr/local/bin

To install a specific version:

curl -sSfL https://raw.githubusercontent.com/flimzy/gopherlint/main/install.sh | sh -s -- -b /usr/local/bin v1.27.0

Binary releases

Pre-built binaries are available on the Releases page. Download the archive for your platform, extract it, and place the gopherlint binary somewhere on your PATH.

Build from source

git clone https://github.com/flimzy/gopherlint.git
cd gopherlint
go build -o /usr/local/bin/gopherlint ./cmd/gopherlint

Symlink for compatibility

If your scripts or CI hardcode the name golangci-lint, a symlink works:

ln -s /usr/local/bin/gopherlint /usr/local/bin/golangci-lint

Why not go install?

go install module@version does not support modules with replace directives in go.mod. gopherlint vendors and patches upstream dependencies (like gosec) to backport bugfixes, which requires replace directives. This is fundamental to how the project works, so go install will not be supported. Use the install script or build from source instead.

Usage

gopherlint is a drop-in replacement for golangci-lint. It accepts the same flags and the same configuration format. The only difference is the binary name. Refer to the golangci-lint documentation — it applies directly to gopherlint (based on v2.13.1).

# Same config, same flags — just a different binary name
gopherlint run ./...

Existing .golangci.yml / .golangci.toml / .golangci.json config files work without modification.

GitHub Actions

The official golangci-lint action hardcodes the binary name golangci-lint, so it cannot invoke gopherlint directly. Two approaches are available.

Option A: run directly (simpler)

- name: Install gopherlint
  run: |
    curl -sSfL https://github.com/flimzy/gopherlint/releases/download/v1.27.0/gopherlint-v1.27.0-linux-amd64.tar.gz \
      | tar -xz --strip-components=1 -C /usr/local/bin gopherlint-v1.27.0-linux-amd64/gopherlint

- name: Run gopherlint
  run: gopherlint run ./...

Option B: use the official action (GitHub annotations)

Install gopherlint and expose it as golangci-lint so the official action can find and invoke it. This preserves inline PR annotations.

- name: Install gopherlint
  run: |
    curl -sSfL https://github.com/flimzy/gopherlint/releases/download/v1.27.0/gopherlint-v1.27.0-linux-amd64.tar.gz \
      | tar -xz --strip-components=1 -C /usr/local/bin gopherlint-v1.27.0-linux-amd64/gopherlint
    ln -s /usr/local/bin/gopherlint /usr/local/bin/golangci-lint

- name: Run gopherlint via golangci-lint action
  uses: golangci/golangci-lint-action@v6
  with:
    install-mode: none

New features and linters

This fork does not add new features or linters. For that, use golangci-lint directly.

License

GPL-3.0

About

No description, website, or topics provided.

Resources

Contributing

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages