2 <h1><img alt="Staticcheck logo" src="/images/logo.svg" height="300" /><br />
7 Staticcheck is a state of the art linter for the [Go programming
8 language](https://go.dev/). Using static analysis, it finds bugs and performance issues,
9 offers simplifications, and enforces style rules.
11 **Financial support by [private and corporate sponsors](http://staticcheck.io/sponsors) guarantees the tool's continued development.
12 Please [become a sponsor](https://github.com/users/dominikh/sponsorship) if you or your company rely on Staticcheck.**
17 You can find extensive documentation on Staticcheck on [its website](https://staticcheck.io/docs/).
23 It is recommended that you run released versions of the tools. These
24 releases can be found as git tags (e.g. `2019.1`) as well as prebuilt
25 binaries in the [releases tab](https://github.com/dominikh/go-tools/releases).
27 The easiest way of using the releases from source is to use a Go
28 package manager such as Godep or Go modules. Alternatively you can use
29 a combination of `git clone -b` and `go get` to check out the
30 appropriate tag and download its dependencies.
35 You can also run the master branch instead of a release. Note that
36 while the master branch is usually stable, it may still contain new
37 checks or backwards incompatible changes that break your build. By
38 using the master branch you agree to become a beta tester.
42 All of the following tools can be found in the cmd/ directory. Each
43 tool is accompanied by its own README, describing it in more detail.
45 | Tool | Description |
46 |----------------------------------------------------|-------------------------------------------------------------------------|
47 | [keyify](cmd/keyify/) | Transforms an unkeyed struct literal into a keyed one. |
48 | [rdeps](cmd/rdeps/) | Find all reverse dependencies of a set of packages |
49 | [staticcheck](cmd/staticcheck/) | Go static analysis, detecting bugs, performance issues, and much more. |
50 | [structlayout](cmd/structlayout/) | Displays the layout (field sizes and padding) of structs. |
51 | [structlayout-optimize](cmd/structlayout-optimize) | Reorders struct fields to minimize the amount of padding. |
52 | [structlayout-pretty](cmd/structlayout-pretty) | Formats the output of structlayout with ASCII art. |
56 In addition to the aforementioned tools, this repository contains the
57 libraries necessary to implement these tools.
59 Unless otherwise noted, none of these libraries have stable APIs.
60 Their main purpose is to aid the implementation of the tools. If you
61 decide to use these libraries, please vendor them and expect regular
62 backwards-incompatible changes.
64 ## System requirements
66 We support the last two versions of Go.