Analysis tools logo

74 Go Static Analysis Tools

Type:
Any

What is Go?

Go is a statically typed, compiled programming language designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. Go is syntactically similar to C, but with memory safety, garbage collection, structural typing, and CSP-style concurrency. The language is often referred to as "Golang" because of its domain name, golang.org, but the proper name is Go.

(More info)

What are the best Go analysis tools?

89

Mega-Linter

  • Type: cli
173

Mega-Linter can handle any type of project thanks to its 70+ embedded Linters, its advanced reporting, runnable on any CI system or locally, with assisted installation and configuration, able to apply formatting and fixes

52

Semgrep

  • Type: cli
3936

Free, open-source lightweight static analysis for many languages. Find and block bug variants with patterns that look like source code.

50

go vet

  • Type: cli

Examines Go source code and reports suspicious.

40
35

GolangCI-Lint

  • Type: cli
7651

Alternative to `Go Meta Linter`: GolangCI-Lint is a linters aggregator.

27

staticcheck

  • Type: cli
3819

Go static analysis that specialises in finding bugs, simplifying code and improving performance.

16

gofmt -s

  • Type: cli

Checks if the code is properly formatted and could not be further simplified.

12

Better Code Hub

  • Type: service

Better Code Hub checks your GitHub codebase against 10 engineering guidelines devised by the authority in software quality, Software Improvement Group.

12

CodeScene

  • Type: service

CodeScene is a quality visualization tool for software. Prioritize technical debt, detect delivery risks, and measure organizational aspects. Fully automated.

9

DeepSource

  • Type: service

In-depth static analysis to find issues in verticals of bug risks, security, anti-patterns, performance, documentation and style. Native integrations with GitHub, GitLab and Bitbucket. Less than 5% false positives.

9

goimports

  • Type: cli

Checks missing or unreferenced package imports.

9

golint

  • Type: cli
3881

Prints out coding style mistakes in Go source code.

7

errcheck

  • Type: cli
1683

Check that error return values are used.

4

deadcode

  • Type: cli
40

Finds unused code.

3

go tool vet --shadow

  • Type: cli

Reports variables that may have been unintentionally shadowed.

3

go/ast

  • Type: cli

Package ast declares the types used to represent syntax trees for Go packages.

3

gosec (gas)

  • Type: cli
4266

Inspects source code for security problems by scanning the Go AST.

3

ineffassign

  • Type: cli
295

Detect ineffectual assignments in Go code.

3

misspell

  • Type: cli
1036

Finds commonly misspelled English words.

3

Sider

  • Type: service

An automated code reviewing tool. Improving developers' productivity.

3

Unibeautify

  • Type: cli
  • Type: service
472

Universal code beautifier with a GitHub app. Supports HTML, CSS, JavaScript, TypeScript, JSX, Vue, C++, Go, Objective-C, Java, Python, PHP, GraphQL, Markdown, and more.

2

aligncheck

  • Type: cli

Find inefficiently packed structs.

2

bodyclose

  • Type: cli
186

Checks whether HTTP response body is closed.

2

Codeac

  • Type: service

Automated code review tool integrates with GitHub, Bitbucket and GitLab (even self-hosted). Available for JavaScript, TypeScript, Python, Ruby, Go, PHP, Java, Docker, and more. (open-source free)

2

dupl

  • Type: cli
232

Reports potentially duplicated code.

2

Kiuwan

  • Type: service

Identify and remediate cyber threats in a blazingly fast, collaborative environment, with seamless integration in your SDLC. Python, C\C++, Java, C#, PHP and more.

2

structcheck

  • Type: cli

Find unused struct fields.

2

unconvert

  • Type: cli
307

Detect redundant type conversions.

1

errwrap

  • Type: cli
317

Wrap and fix Go errors with the new %w verb directive. This tool analyzes fmt.Errorf() calls and reports calls that contain a verb directive that is different than the new %w verb directive introduced in Go v1.13. It's also capable of rewriting calls to use the new %w wrap verb directive.

1

go-critic

  • Type: cli
919

Go source code linter that maintains checks which are currently not implemented in other linters.

1

goconst

  • Type: cli
200

Finds repeated strings that could be replaced by a constant.

1

gotype

  • Type: cli

Syntactic and semantic analysis similar to the Go compiler.

1

Hound CI

  • Type: cli
1881

Comments on style violations in GitHub pull requests. Supports Coffeescript, Go, HAML, JavaScript, Ruby, SCSS and Swift.

1

lll

  • Type: cli
56

Report long lines.

1

maligned

  • Type: cli
414

Detect structs that would take less memory if their fields were sorted.

1

nargs

  • Type: cli
79

Finds unused arguments in function declarations.

1

Snyk

  • Type: service

Vulnerability scanner for dependencies of node.js apps (free for Open Source Projects).

1

SmartDec Scanner

  • Type: cli

SAST tool which is capable of identifying vulnerabilities and undocumented features. The analyzer scans the source code and executables without debug info (i.e. binaries). Supports: Java/Scala/Kotlin, PHP, C#, JavaScript, TypeScript, VBScript, HTML5, Python, Perl, C/C++, Objective-C/Swift, PL/SQL, T-SQL, ABAP, 1C, Apex, Go, Ruby, Groovy, Delphi, VBA, Visual Basic 6, Solidity, Vyper, COBOL.

1

Sonatype

  • Type: service

Reports known vulnerabilities in common dependencies and recommends updated packages to minimize breaking changes

1

todocheck

  • Type: cli
329

Linter for integrating annotated TODOs with your issue trackers

1

unparam

  • Type: cli
318

Find unused function parameters.

0

ApplicationInspector

  • Type: cli
3788

Creates reports of over 400 rule patterns for feature detection (e.g. the use of cryptography or version control in apps).

0

Code Inspector

  • Type: service

Code quality and technical debt management platform that supports 10+ languages.

0

Code Intelligence

  • Type: service

CI/CD-agnostic DevSecOps platform which combines industry-leading fuzzing engines for finding bugs and visualizing code coverage

0

dingo-hunter

  • Type: cli
274

Static analyser for finding deadlocks in Go.

0

dogsled

  • Type: cli
64

Finds assignments/declarations with too many blank identifiers.

0

flen

  • Type: cli
49

Get info on length of functions in a Go package.

0

go-consistent

  • Type: cli
299

Analyzer that helps you to make your Go programs more consistent.

0

gocyclo

  • Type: cli
758

Calculate cyclomatic complexities of functions in Go source code.

0

goone

  • Type: cli
20

Finds N+1 queries (SQL calls in a for loop) in go code

0

goreporter

  • Type: cli
2860

Concurrently runs many linters and normalises their output to a report.

0

goroutine-inspect

  • Type: cli
276

An interactive tool to analyze Golang goroutine dump.

0

LGTM.com

  • Type: service

Deep code analysis for GitHub and Bitbucket to find security vulnerabilities and critical code quality issues (using Semmle QL). Automatic code review for pull requests; free for public repositories.

0

nakedret

  • Type: cli
71

Finds naked returns.

0

ocular

  • Type: service

Enables code auditors and security teams to interactively investigate their unique code bases to find business logic flaws and technical vulnerabilities that traditional SASTs cannot. This is done by enabling the analyst to write their own custom queries. Can find hard-coded secrets, authentication issues, and malicious code like rootkits and backdoors.

0

prealloc

  • Type: cli
425

Finds slice declarations that could potentially be preallocated.

0

Reviewdog

  • Type: cli
3253

A tool for posting review comments from any linter in any code hosting service.

0

revive

  • Type: cli
2589

Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.

0

safesql

  • Type: cli
550

Static analysis tool for Golang that protects against SQL injections.

0

Scrutinizer

  • Type: service

A proprietary code quality checker that can be integrated with GitHub.

0

ShiftLeft Scan

  • Type: cli
  • Type: service
264

Scan is a free open-source DevSecOps platform for detecting security issues in source code and dependencies. It supports a broad range of languages and CI/CD pipelines.

0

ShiftLeft

  • Type: service

Identify vulnerabilities that are unique to your code base before they reach production. Leverages the Code Property Graph (CPG) to run its analyses concurrently in a single graph of graphs. Automatically finds business logic flaws in dev like hardcoded secrets and logic bombs

0

SonarCloud

  • Type: service

Multi-language cloud-based static code analysis. History, trends, security hot-spots, pull request analysis and more. Free for open source.

0

test

  • Type: cli

Show location of test failures from the stdlib testing module.

0

varcheck

  • Type: cli

Find unused global variables and constants.

0

wsl

  • Type: cli
109

Enforces empty lines at the right places.

-1

gochecknoglobals

  • Type: cli
41

Checks that no globals are present.

-2

Embold

  • Type: service

Intelligent software analytics platform that identifies design issues, code issues, duplication and metrics. Supports Java, C, C++, C#, JavaScript, TypeScript, Python, Go, Kotlin and more.

Deprecated/unmaintained tools

0

Go Meta Linter

  • Type: cli
3551

Concurrently run Go lint tools and normalise their output. Use `golangci-lint` for new projects.

0

interfacer

  • Type: cli
703

Suggest narrower interfaces that can be used.

❤️ Sponsor this project

We are currently looking for partners who want to sponsor hosting and development of the project.

Check out our Github Sponsors page here

Missing an entry? Please let us know.