golangci-lint VS go-tools

Compare golangci-lint vs go-tools and see what are their differences.

golangci-lint

Fast linters Runner for Go (by golangci)

go-tools

Staticcheck - The advanced Go linter (by dominikh)
Our great sponsors
  • InfluxDB - Access the most powerful time series database as a service
  • SonarLint - Clean code begins in your IDE with SonarLint
  • SaaSHub - Software Alternatives and Reviews
golangci-lint go-tools
60 17
12,588 5,398
2.0% -
9.5 5.2
about 21 hours ago 5 days ago
Go Go
GNU General Public License v3.0 only MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

golangci-lint

Posts with mentions or reviews of golangci-lint. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-23.

go-tools

Posts with mentions or reviews of go-tools. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-23.
  • Find project-wide unused code using Golang's LSP
    2 projects | /r/golang | 23 May 2023
    For the last year or so (as of 2023) Golang has only had one active project for linting unused code, namely: unused from https://github.com/dominikh/go-tools. It works really well, but only within a package, not across packages, like within a traditional monolith. unused used to be part of another project called staticcheck, that did indeed have a flag for detecting project-wide unused code, but that is no longer supported. There are good reasons for that (see this Github discussion), mainly that it's computationally expensive.
  • Tools besides Go for a newbie
    36 projects | /r/golang | 26 Mar 2023
    IDE: use whatever make you productive. I personally use vscode. VCS: git, as golang communities use github heavily as base for many libraries. AFAIK Linter: use staticcheck for linting as it looks like mostly used linting tool in go, supported by many also. In Vscode it will be recommended once you install go plugin. Libraries/Framework: actually the standard libraries already included many things you need, decent enough for your day-to-day development cycles(e.g. `net/http`). But here are things for extra: - Struct fields validator: validator - Http server lib: chi router , httprouter , fasthttp (for non standard http implementations, but fast) - Web Framework: echo , gin , fiber , beego , etc - Http client lib: most already covered by stdlib(net/http), so you rarely need extra lib for this, but if you really need some are: resty - CLI: cobra - Config: godotenv , viper - DB Drivers: sqlx , postgre , sqlite , mysql - nosql: redis , mongodb , elasticsearch - ORM: gorm , entgo , sqlc(codegen) - JS Transpiler: gopherjs - GUI: fyne - grpc: grpc - logging: zerolog - test: testify , gomock , dockertest - and many others you can find here
    36 projects | /r/golang | 26 Mar 2023
    staticcheck
  • New linter for mixing pointer and value method receivers
    2 projects | /r/golang | 30 Nov 2022
    Also proposal to staticcheck, will see if it goes through! https://github.com/dominikh/go-tools/issues/1337
  • Zig, the Small Language
    13 projects | news.ycombinator.com | 7 Sep 2022
    This really irritated me when I started working with go, but it stopped bothering me and now I even mostly like it.

    The missing error checks are annoying, but if you have appropriate editor config it is hard to miss them: https://cdn.billmill.org/static/newsyctmp/warning.png

    Basically writing go without `staticcheck`[1] is not recommended. If you do have it set up, it's pretty easy to avoid simple errors like that.

    [1]: https://staticcheck.io/

  • Our experience upgrading from go v1.17 to v1.18 for generics
    2 projects | /r/golang | 20 Jul 2022
    However, recently [per this issue](https://github.com/dominikh/go-tools/issues/1270) it is safe to re-enable the ones I highlighted with strikethrough above. I would be interested in tracking issues for the remainder if you have those linked somewhere.
  • What are your strategies to prevent nil pointers errors in your code base?
    3 projects | /r/golang | 24 Jun 2022
    Unfortunately I don't know of any tools that can/do always detect it. There's this discussion for the staticcheck linter where they basically don't think it's worth false positives in order to support it a lint for it.
  • Go API tutorial: the begin
    2 projects | dev.to | 15 Apr 2022
    staticcheck tool. It's a tool for linting which can perform some checks on your code about simplifications, styling rules, performance issues and so on. U can find more about it here. It's not mandatory but I strongly recommend it
  • Is there a tool to find dead code?
    2 projects | /r/golang | 31 Mar 2022
    You can use Staticcheck for this: https://staticcheck.io/
  • [Newcomer] Linters for go
    3 projects | /r/golang | 29 Mar 2022
    The most used ones that I've seen are statticcheck and golangci-lint. If there's something custom that you might need, see Semgrep

What are some alternatives?

When comparing golangci-lint and go-tools you can also consider the following projects:

ireturn - Accept Interfaces, Return Concrete Types

gosec - Golang security checker

golangci-lint-action - Official GitHub action for golangci-lint from its authors

gopl.io - Example programs from "The Go Programming Language"

go - The Go programming language

ls-lint - An extremely fast directory and filename linter - Bring some structure to your project filesystem

revive - πŸ”₯ ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint

golang-standards/project-layout - Standard Go Project Layout

maligned - Tool to detect Go structs that would take less memory if their fields were sorted.

viper - Go configuration with fangs

gofumpt - A stricter gofmt