MCPcopy Index your code
hub / github.com/dominikh/go-tools

github.com/dominikh/go-tools @2026.1 sqlite

repository ↗ · DeepWiki ↗ · release 2026.1 ↗
3,911 symbols 11,866 edges 845 files 977 documented · 25%
README
<h1><img alt="Staticcheck logo" src="https://github.com/dominikh/go-tools/raw/2026.1/images/logo.svg" height="300" />


    The advanced Go linter
</h1>

Staticcheck is a state of the art linter for the Go programming language. Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules.

Financial support by private and corporate sponsors guarantees the tool's continued development. Please become a sponsor if you or your company rely on Staticcheck.

Documentation

You can find extensive documentation on Staticcheck on its website.

Installation

Releases

It is recommended that you run released versions of the tools. These releases can be found as git tags (e.g. 2022.1).

The easiest way of installing a release is by using go install, for example go install honnef.co/go/tools/cmd/staticcheck@2022.1. Alternatively, we also offer prebuilt binaries.

You can find more information about installation and releases in the documentation.

Master

You can also run the master branch instead of a release. Note that while the master branch is usually stable, it may still contain new checks or backwards incompatible changes that break your build. By using the master branch you agree to become a beta tester.

Tools

All of the following tools can be found in the cmd/ directory. Each tool is accompanied by its own README, describing it in more detail.

Tool Description
staticcheck Go static analysis, detecting bugs, performance issues, and much more.
structlayout Displays the layout (field sizes and padding) of structs.
structlayout-optimize Reorders struct fields to minimize the amount of padding.
structlayout-pretty Formats the output of structlayout with ASCII art.

Libraries

In addition to the aforementioned tools, this repository contains the libraries necessary to implement these tools.

Unless otherwise noted, none of these libraries have stable APIs. Their main purpose is to aid the implementation of the tools. You'll have to expect semiregular backwards-incompatible changes if you decide to use these libraries.

System requirements

Staticcheck can be compiled and run with the latest release of Go. It can analyze code targeting any version of Go upto the latest release.

Extension points exported contracts — how you extend this code

I6 (Interface)
@ used("i5", true) [5 implementers]
unused/testdata/src/example.com/embedding/embedding.go
SomeInterface (Interface)
(no doc) [11 implementers]
simple/s1040/testdata/go1.0/CheckSameTypeTypeAssertion/CheckSameTypeTypeAssertion.go
Member (Interface)
A Member is a member of a Go package, implemented by *NamedConst, *Global, *Function, or *Type; they are created by pack [4 …
go/ir/ssa.go
Nil (Interface)
(no doc) [140 implementers]
staticcheck/sa4023/testdata/go1.0/i28241/28241.go
Positioner (Interface)
(no doc) [5 implementers]
analysis/report/report.go
Positioner (Interface)
(no doc) [5 implementers]
analysis/code/code.go
Argument (Interface)
Argument is an implicit or explicit width or precision. [3 implementers]
printf/printf.go
Join (FuncType)
Join defines the [∨] operation for a [join-semilattice]. It must implement a commutative and associative binary operatio
analysis/dfa/dfa.go

Core symbols most depended-on inside this repo

Type
called by 379
go/ir/ssa.go
Report
called by 219
analysis/report/report.go
Printf
called by 188
go/ir/html.go
Name
called by 179
go/ir/ssa.go
Errorf
called by 169
simple/s1038/testdata/go1.0/CheckPrintSprintf/CheckPrintSprintf.go
InitializeAnalyzer
called by 160
analysis/lint/lint.go
Run
called by 160
analysis/lint/testutil/util.go
Underlying
called by 154
go/types/typeutil/ext.go

Shape

Function 1,825
Method 1,142
Struct 738
TypeAlias 134
Interface 66
FuncType 6

Languages

Go100%

Modules by API surface

go/ir/ssa.go264 symbols
pattern/pattern.go179 symbols
unused/testdata/src/example.com/generic-interfaces/generic-interfaces.go78 symbols
go/ir/print.go61 symbols
go/ir/func.go61 symbols
lintcmd/runner/runner.go59 symbols
go/ir/builder.go57 symbols
staticcheck/sa5009/testdata/go1.0/CheckPrintf/CheckPrintf.go47 symbols
go/ir/lift.go47 symbols
unused/unused.go46 symbols
unused/testdata/src/example.com/typeparams/typeparams.go45 symbols
analysis/facts/typedness/testdata/src/example.com/Typedness/Typedness.go43 symbols

Dependencies from manifests, versioned

github.com/BurntSushi/tomlv1.4.1-0.20240526193 · 1×
golang.org/x/expv0.0.0-2023111020323 · 1×
golang.org/x/exp/typeparamsv0.0.0-2023110823285 · 1×
golang.org/x/modv0.31.0 · 1×
golang.org/x/syncv0.19.0 · 1×
golang.org/x/sysv0.39.0 · 1×
golang.org/x/toolsv0.40.1-0.2026010816 · 1×
golang.org/x/tools/go/expectv0.1.1-deprecated · 1×
honnef.co/go/toolsv0.0.0-0001010100000 · 1×
autoprefixer10.4.13 · 1×
postcss8.4.31 · 1×
postcss-cli10.1.0 · 1×

For agents

$ claude mcp add go-tools \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact