Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

awesome-go-linters

A curated list of awesome Go linters. More than 60 linters and tools!
https://github.com/golangci/awesome-go-linters

Last synced: 3 days ago
JSON representation

  • Cloud Linters

    • Go Focused

      • GolangCI - Open Source SaaS service for running linters on Github pull requests. Free for Open Source.
      • Golint online - Lints online Go source files on GitHub, Bitbucket and Google Project Hosting using the golint package.
      • GopherCI - GopherCI helps you maintain high-quality Go projects, by checking each GitHub Pull Request, for backward incompatible changes, and a suite of other tests.
      • Go Report Card - Go repo report card.
    • General Purpose

      • CodeClimate - The open and extensible static analysis platform.
      • CodeFactor - Automated Code Analysis for repos on GitHub or BitBucket.
      • HoundCI - Code review tool for GitHub pull requests
      • QuantifiedCode - Automated code review & repair
      • Scrutinizer - A proprietery code quality checker that can be integrated with GitHub
      • SideCI - An automated code reviewing tool. Improving developers' productivity.
  • Linters

    • Code Formatting

      • gofmt - Gofmt formats Go programs. Must have for every project. Don't forget to use -s flag.
      • goimports - Goimports does everything that gofmt does. Additionally it checks unused imports.
      • dedupimport - Fix duplicate imports that have the same import path but different import names.
      • gofumpt - The tool is a modified fork of gofmt, enforcing a stricter format than gofmt, while being backwards compatible.
      • unindent - Report code that is unnecessarily indented
    • Code Complexity

      • depth - Count the maxdepth of go functions. It's helpful to see if a function needs to be splitted into several smaller functions, for readability purpose.
      • abcgo - ABC metrics for Go source code.
      • funlen - linter that checks for long functions. It can check both the number of lines and the number of statements.
      • gocyclo - Computes and checks the cyclomatic complexity of functions.
      • nakedret - nakedret is a Go static analysis tool to find naked returns in functions greater than a specified function length.
      • splint - It finds any functions that are too long or have too many parameters or results.
    • Style and Patterns Checking

      • gochecknoinits - Find init functions, to reduce side effects in code.
      • gochecknoglobals - Find global vars, to reduce side effects in code.
      • gosimple - gosimple is a linter for Go source code that specialises on simplifying code.
      • dogsled - Finds assignments/declarations with too many blank identifiers.
      • dupl - Tool for code clone detection.
      • go-checkstyle - checkstyle is a style check tool like java checkstyle. This tool inspired by java checkstyle, golint. The style refered to some points in Go Code Review Comments.
      • go-cleanarch - go-cleanarch was created to validate Clean Architecture rules, like a The Dependency Rule and interaction between packages in your Go projects.
      • go-consistent - source code analyzer that helps you to make your Go programs more consistent.
      • go-namecheck - source code analyzer that helps you to maintain variable/field naming conventions inside your project.
      • go-printf-func-name - checks that printf-like functions are named with `f` at the end.
      • go-ruleguard - Define and run pattern-based custom linting rules.
      • goconst - Find in Go repeated strings that could be replaced by a constant.
      • interfacer - Linter that suggests narrower interface types.
      • GoLint - Golint is a linter for Go source code.
      • impi - Verify imports grouping and ordering.
      • lll - Line length linter, used to enforce line length in files.
      • misspell - Finds commonly misspelled English words
      • nofuncflags - disallow boolean params to functions (flags).
      • predeclared - Find code that shadows Go's built-in identifiers (e.g., `append`, `copy`, `int`).
      • revive - ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
      • unconvert - Remove unnecessary type conversions from Go source.
      • usedexports - Find in Go exported variables that could be unexported.
      • whitespace - Checks for unnecessary newlines at the start and end of functions
    • Bugs

      • badtime - Badtime is a Golang linter that detects inappropriate usage of the time.Time struct.
      • gas - Inspects source code for security problems by scanning the Go AST.
      • go vet - Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string. Can check shadowing of variables, but must be enabled explicitly.
      • staticcheck - staticcheck is `go vet` on steroids, applying a ton of static analysis checks you might be used to from tools like ReSharper for C#.
      • gas - Inspects source code for security problems by scanning the Go AST.
      • apicompat - Checks recent changes to a Go project for backwards incompatible changes.
      • bodyclose - checks whether HTTP response body is closed and a re-use of TCP connection is not blocked
      • durcheck - durcheck is a very simple linter which detects potential bugs with time.Duration in a Go package.
      • enumcase - enumcase checks every switch statement handles all const values of the type.
      • enumlinter - Enum linter for enumerated types in Go.
      • errcheck - Errcheck is a program for checking for unchecked errors in Go programs.
      • gosumcheck - Checks all possible cases of type-switch are handled.
      • go-sumtype - Checks all possible cases of type-switch are handled.
      • mulint - Go lint which detects recursive locks, which may lead to dead locks.
      • scopelint - scopelint checks for unpinned variables in go programs.
      • sqlrows - checks whether Close on sql.Rows is called.
      • safesql - Static analysis tool for Golang that protects against SQL injections.
    • Unused Code

      • unused - unused checks Go code for unused constants, variables, functions and types.
      • deadcode - Finds unused code.
      • ineffassign - Detect when assignments to existing variables are not used.
      • unparam - Report unused function parameters.
      • varcheck - Find unused global variables and constants.
    • Reports

      • GoReporter - A Golang tool that does static analysis, unit testing, code review and generate code quality report.
      • flen - Get info on length of functions in a Go package.
      • golinters - golinters generates HTML reports about Go linters.
      • GoReporter - A Golang tool that does static analysis, unit testing, code review and generate code quality report.
    • Misc

      • megacheck - megacheck runs staticcheck, gosimple and unused at once. Because it is able to reuse work, it will be faster than running each tool separately.
      • tarp - tarp finds functions and methods without direct unit tests in Go source code.
      • lingo - Set of specific checks.
      • go-outdated - Console application that displays outdated packages.
      • go-template-lint - go-template-lint is a linter for Go text/template (and html/template) template files.
      • godox - Find all TODO/FIXME comments.
      • lingo - Set of specific checks.
      • go-critic - source code linter that brings checks that are currently not implemented in other linters.
      • go-mnd - Magic number detector for Go.
      • gocheckit - A Go tool to help identify Deprecated Go Modules.
    • Performance

      • Copyfighter - Statically analyzes Go code and reports functions that are passing large structs by value.
      • maligned - Tool to detect Go structs that would take less memory if their fields were sorted.
      • prealloc - Find slice declarations that could potentially be preallocated.
      • rangerdanger - Tool to detect range statements iterating over addressable arrays
      • aligncheck - Warn about un-optimally aligned structures.
  • Linters Helper Tools

    • Misc

      • reviewdog - "reviewdog" provides a way to post review comments to code hosting service, such as GitHub, automatically by integrating with any linter tools with ease.
      • reviewdog - "reviewdog" provides a way to post review comments to code hosting service, such as GitHub, automatically by integrating with any linter tools with ease.
      • golangci-lint - Linters Runner for Go. 5x faster than gometalinter. Nice colored output. Can report only new issues. Fewer false-positives. Yaml/toml config.
      • gometalinter - Metalinter is a tool to automatically apply all static analysis tool and report their output in normalized form.
      • lint - Run linters as part of go test.
      • revgrep - Filters output from static analysis tools, showing only recently changed lines of code
      • zb - speedup linting by caching gometalinter result.
      • golintui - A simple terminal UI for Go linters.