golangci/golangci-lint
View on GitHub ↗ ★ 19,495 Go
Fast linters runner for Go
25 mentions on Hacker News by 22 people: 3 stories, 22 comments · first 2018-05-25 · latest 2026-08-20
20082026
-
I like the way that golang supports the use of tools in the go.mod file. Something like: go get -tool github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.4 And then you can list tools : go list -f '{{.Tool}}' all ANd run them: go…
comment by stevekemp · 2026-04-03 · in Show HN: Home Maker: Declare Your Dev Tools in a Makefile -
A simpler approach is to use `go run` with a specific version. e.g.: go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.4 run Easy enough to stuff in a Makefile or whatever. Even better in Go 1.24 since according to this…
comment by jchw · 2025-01-29 · in Go 1.24's go tool is one of the best additions to the ecosystem in years -
…rolls up lot of linters and checkers into a single binary. There is a config file too. https://github.com/golangci/golangci-lint
comment by nickcw · 2024-01-23 · in Deadcode: Finding unreachable functions in Go -
…package but hasn't been wrapped in your codebase to make it unique or stacktraced. It comes with https://github.com/golangci/golangci-lint and can even be made part of your in-editor LSP diagnostics. But still, it's not perfect. And so I…
comment by tombh · 2023-08-23 · in Structured logging with slog -
Note that without the `Output:` line you can silently not be running these tests - https://github.com/golangci/golangci-lint/issues/3084 covers when this can be problematic and there's now a golangci-lint integrated linter for catching it
comment by jamietanna · 2023-06-10 · in Executable Examples in Go -
Things I can't live without in a new Go project in no particular order: - https://github.com/golangci/golangci-lint - meta-linter - https://goreleaser.com - automate release workflows - https://magefile.org - build tool that can version…
comment by jzelinskie · 2023-05-23 · in How to start a Go project in 2023 -
…I recommend using golangci-lint[0], which aggregates a ton of useful linters like this one. [0]: https://github.com/golangci/golangci-lint
comment by cube2222 · 2022-12-11 · in New in Go 1.20: wrapping multiple errors -
Use golangci-lint ( https://golangci-lint.run , https://github.com/golangci/golangci-lint ) which combines all of the best lints (including staticcheck).
comment by thegeekpirate · 2022-09-07 · in Zig, the Small Language -
Looks like fixes for golangci-lint just got merged and should be in the next release: https://github.com/golangci/golangci-lint/pull/2991
comment by Andys · 2022-07-19 · in Our experience upgrading from go v1.17 to v1.18 for generics -
There are tools for Go that detect non-optimal struct alignment. I use golangci-lint, available at: https://github.com/golangci/golangci-lint The struct alignment linter is not included by default. To enable it, run the linter with this…
comment by oofabz · 2022-01-10 · in Saving a Third of Our Memory by Re-Ordering Go Struct Fields (2020) -
…occur on an enum type across the codebase is one less thing I need to worry about. golangci-lint ( https://github.com/golangci/golangci-lint ) is an absolute must, and includes https://github.com/nishanths/exhaustive which will check this…
comment by thegeekpirate · 2021-12-10 · in Notes on the Go translation of Reposurgeon (2020) -
…mind stop-gaps like this too much on balance. [0] https://github.com/golang/go/issues/20148 [1] https://github.com/golangci/golangci-lint
comment by xh-dude · 2021-08-24 · in Error stack traces in Go with x/xerror -
https://github.com/mibk/dupl does a great job, and it's included in https://github.com/golangci/golangci-lint (which everyone should use, tbh)
comment by thegeekpirate · 2021-05-25 · in Rf: an experimental refactoring tool for Go -
…deployment I recommend: https://github.com/goreleaser/goreleaser During development I recommend: https://github.com/golangci/golangci-lint and https://github.com/stretchr/testify
comment by sandreas · 2020-05-27 · in Diving into Go by building a CLI application -
…is popular for checking unhandled errors. If you'd like a combo-pack, check out https://github.com/golangci/golangci-lint which includes all of the popular linters in a configurable way.
comment by shazow · 2020-02-28 · in I Want Off Mr. Golang's Wild Ride -
…to it. This and also gosec are invaluable! Something I looked recently and should adopt soon: https://github.com/golangci/golangci-lint So far, this is what my 'de facto' lint list looks like: echo "Checking for unchecked errors." errcheck…
comment by henvic · 2019-11-11 · in Improving Go code: An introduction to the static analysis tool Staticcheck -
…on github.com/alecthomas/gometalinter despite gometalinter being deprecated in favor of the much faster github.com/golangci/golangci-lint. Because golangci-lint is licensed under GPL and goreportcard is licensed under Apache 2.0 it would…
comment by rmilejczz · 2019-09-28 · in Do we need to rethink what free software is? -
I've been very happy having switched from gometalinter to golangci-lint: https://github.com/golangci/golangci-lint
comment by LukeShu · 2019-02-12 · in Go 1.12 Release Candidate 1 is released -
…for unused variables etc., but is slower than varcheck and structcheck, apparently). [1] https://www.github.com/golangci/golangci-lint
comment by atombender · 2018-12-22 · in I Do Not Like Go -
…such as requiring all exported functions to have comments don't need to be included. [1] https://github.com/golangci/golangci-lint [2] https://github.com/Microsoft/vscode-go
comment by atombender · 2018-06-02 · in Revive – Fast, configurable, extensible linter for Go