golangci-lint – fast Go linters runner

golangci-lint runs a large collection of Go static analysis tools through a single interface.

It executes linters efficiently using parallel processing, the Go build cache and its own analysis cache. The default setup is deliberately conservative, while projects can enable a much broader collection of specialised checks.

The version 2 configuration format separates linters from source formatters and provides dedicated commands for linting and formatting. Configuration can be stored in YAML, TOML or JSON.

This is free and open source software.

Key Features

  • Bundles more than a hundred Go linters behind a single command-line interface.
  • Runs analysis in parallel and reuses both the Go build cache and cached analysis results.
  • Provides curated default linters while allowing individual checks or complete linter sets to be enabled and disabled.
  • Separate formatter support for gofmt, gofumpt, goimports, gci, golines and swaggo.
  • Can automatically apply supported linter fixes and source formatting.
  • Version 2 configuration supports detailed linter settings, exclusions, severities, output controls and path handling.
  • Can limit results to new issues, which is useful when introducing linting to established codebases.
  • Outputs text, JSON, HTML, Checkstyle, Code Climate, JUnit XML, TeamCity and SARIF reports.
  • Integrates with popular editors and CI systems including GitHub Actions.
  • Supports building custom golangci-lint binaries containing additional linters.

Website: github.com/golangci/golangci-lint
Support:
Developer: GolangCI
License: GNU General Public License v3.0

golangci-lint commands

golangci-lint is written in Go. Learn Go with our recommended free books and free tutorials.


Related Software

Go Linters
reviveDesigned as a drop-in replacement for golint
golangci-lintFast Go linters runner
gosecSecurity scanner for Go projects
StaticcheckAdvanced Go linter
go-criticOpinionated Go source code linter
VetExamines Go source code and reports suspicious constructs
gofumptStricter gofmt
gofmtFormats Go programs
goconstFind repeated Go literals that could be replaced with constants
go-ruleguardAnalysis-based Go linter that runs dynamically loaded rules
sloglintEnforce consistent structured logging conventions in Go
forbidigoGo linter for forbidding identifiers
godotKeep source code comments consistent
Godoc-LintEnforce consistent documentation comments in Go code
exhaustiveCheck Go switch statements for missing enum cases

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted