Analysis tools logo

89 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?

113

Mega-Linter

  • Type: cli
959

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

69

Semgrep

  • Type: cli
  • Type: service
7455

A fast, open-source, static analysis tool for finding bugs and enforcing code standards at editor, commit, and CI time. Its rules look like the code you already write; no abstract syntax trees or regex wrestling. Supports 17+ languages.

50

go vet

  • Type: cli

Examines Go source code and reports suspicious.

49
48

Sonatype

  • Type: service

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

27

GolangCI-Lint

  • Type: cli
11583

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

27

staticcheck

  • Type: cli
5088

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

25

ThreatMapper

  • Type: service
  • Type: web
2581

Vulnerability Scanner and Risk Evaluation for containers, serverless and hosts at runtime. ThreatMapper generates runtime BOMs from dependencies and operating system packages, matches against multiple threat feeds, scans for unprotected secrets, and scores issues based on severity and risk-of-exploit.

24

CodeScene

  • Type: service

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

20

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

16

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.

16

gofmt -s

  • Type: cli

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

14

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.

10

goimports

  • Type: cli

Checks missing or unreferenced package imports.

10

trunk

  • Type: cli

Modern repositories include many technologies, each with its own set of linters. With 30+ linters and counting, Trunk makes it dead-simple to identify, install, configure, and run the right linters, static analyzers, and formatters for all your repos.

9

golint

  • Type: cli
3975

Prints out coding style mistakes in Go source code.

8

errcheck

  • Type: cli
1967

Check that error return values are used.

6

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)

5

deadcode

  • Type: cli
43

Finds unused code.

5

go-critic

  • Type: cli
1446

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

5

Scanmycode CE (Community Edition)

  • Type: service
338

Scanmycode - Code Scanning/SAST/Linting using many tools/Scanners with One Report

4

ineffassign

  • Type: cli
344

Detect ineffectual assignments in Go code.

4

Sider

  • Type: service

An automated code reviewing tool. Improving developers' productivity.

4

Unibeautify

  • Type: cli
  • Type: service
528

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.

3

aligncheck

  • Type: cli

Find inefficiently packed structs.

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
6451

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

3

misspell

  • Type: cli
1217

Finds commonly misspelled English words.

2

bodyclose

  • Type: cli
231

Checks whether HTTP response body is closed.

2

dupl

  • Type: cli
301

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

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.

2

shisho

  • Type: cli
  • Type: service
343

A lightweight static code analyzer designed for developers and security teams. It allows you to analyze and transform source code with an intuitive DSL similar to sed, but for code.

2

structcheck

  • Type: cli

Find unused struct fields.

2

todocheck

  • Type: cli
395

Linter for integrating annotated TODOs with your issue trackers

2

unconvert

  • Type: cli
343

Detect redundant type conversions.

2

Codiga

  • Type: service

Automated Code Reviews and Technical Debt management platform that supports 12+ languages.

1

ApplicationInspector

  • Type: cli
4012

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

1

errwrap

  • Type: cli
354

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

goconst

  • Type: cli
228

Finds repeated strings that could be replaced by a constant.

1

gokart

  • Type: cli
2051

Golang security analysis with a focus on minimizing false positives. It is capable of tracing the source of variables and function arguments to determine whether input sources are safe.

1

gotype

  • Type: cli

Syntactic and semantic analysis similar to the Go compiler.

1

Hound CI

  • Type: cli
1918

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

1

lizard

  • Type: cli
1478

Lizard is an extensible Cyclomatic Complexity Analyzer for many programming languages including C/C++ (doesn't require all the header files or Java imports). It also does copy-paste detection (code clone detection/code duplicate detection) and many other forms of static code analysis. Counts lines of code without comments, CCN (cyclomatic complexity number), token count of functions, parameter count of functions.

1

lll

  • Type: cli
62

Report long lines.

1

maligned

  • Type: cli
500

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

1

nargs

  • Type: cli
81

Finds unused arguments in function declarations.

1

Snyk Code

  • Type: service

Snyk Code finds security vulnerabilities based on AI. Its speed of analysis allow us to analyse your code in real time and deliver results when you hit the save button in your IDE. Supported languages are Java, JavaScript, Python, PHP, C#, Go and TypeScript. Integrations with GitHub, BitBucket and Gitlab. It is free to try and part of the Snyk platform also covering SCA, containers and IaC.

1

Svace

  • Type: cli

Static code analysis tool for Java,C,C++,C#,Go.

1

unparam

  • Type: cli
414

Find unused function parameters.

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
300

Static analyser for finding deadlocks in Go.

0

dogsled

  • Type: cli
69

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
314

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

0

gocyclo

  • Type: cli
1094

Calculate cyclomatic complexities of functions in Go source code.

0

gofumpt

  • Type: cli
  • Type: ide-plugin
1992

Enforce a stricter format than `gofmt`, while being backwards-compatible. That is, `gofumpt` is happy with a subset of the formats that `gofmt` is happy with. The tool is a fork of `gofmt` as of Go 1.19, and requires Go 1.18 or later. It can be used as a drop-in replacement to format your Go code, and running gofmt after gofumpt should produce no changes. `gofumpt` will never add rules which disagree with `gofmt` formatting. So we extend `gofmt` rather than compete with it.

0

goone

  • Type: cli
41

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

0

goreporter

  • Type: cli
3025

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

0

goroutine-inspect

  • Type: cli
426

An interactive tool to analyze Golang goroutine dump.

0

govulncheck

  • Type: cli
  • Type: service

Govulncheck reports known vulnerabilities that affect Go code. It uses static analysis of source code or a binary's symbol table to narrow down reports to only those that could affect the application. By default, govulncheck makes requests to the Go vulnerability database at https://vuln.go.dev. Requests to the vulnerability database contain only module paths, not code or other properties of your program.

0

nakedret

  • Type: cli
87

Finds naked returns.

0

prealloc

  • Type: cli
509

Finds slice declarations that could potentially be preallocated.

0

Reviewdog

  • Type: cli
5806

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

0

revive

  • Type: cli
3896

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

0

safesql

  • Type: cli
567

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

Semgrep Supply Chain

  • Type: service

Quickly find and remediate high-priority security issues. Semgrep Supply Chain prioritizes the 2% of vulnerabilities that are reachable from your code.

0

Sigrid

  • Type: cli
  • Type: service

Sigrid helps you to improve your software by measuring your system's code quality, and then compares the results against a benchmark of thousands of industry systems to give you concrete advice on areas where you can improve.

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

sqlvet

  • Type: cli
458

Performs static analysis on raw SQL queries in your Go code base to surface potential runtime errors. It checks for SQL syntax error, identifies unsafe queries that could potentially lead to SQL injections makes sure column count matches value count in INSERT statements and validates table- and column names.

0

structslop

  • Type: cli
673

Static analyzer for Go that recommends struct field rearrangements to provide for maximum space/allocation efficiency

0

TencentCodeAnalysis

  • Type: service
  • Type: cli
1324

Tencent Cloud Code Analysis (TCA for short, code-named CodeDog inside the company early) is a comprehensive platform for code analysis and issue tracking. TCA consist of three components, server, web and client. It integrates of a number of self-developed tools, and also supports dynamic integration of code analysis tools in various programming languages.

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
176

Enforces empty lines at the right places.

-1

emerge

  • Type: cli
  • Type: web
390

Emerge is a source code and dependency visualizer that can be used to gather insights about source code structure, metrics, dependencies and complexity of software projects. After scanning the source code of a project it provides you an interactive web interface to explore and analyze your project by using graph structures.

-1

gochecknoglobals

  • Type: cli
70

Checks that no globals are present.

-1

LGTM

  • Type: service

Find security vulnerabilities, variants, and critical code quality issues using CodeQL queries over source code. Automatic PR code review; free for open source. Formerly semmle. It supports public Git repositories hosted on Bitbucket Cloud, GitHub.com, GitLab.com.

-3

ShiftLeft Scan

  • Type: cli
  • Type: service
548

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.

-4

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
3537

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

-1

interfacer

  • Type: cli
698

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.