• Stars
    star
    6,094
  • Rank 6,602 (Top 0.2 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Staticcheck - The advanced Go linter

Staticcheck logo
The advanced Go linter

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/[email protected]. 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
keyify Transforms an unkeyed struct literal into a keyed one.
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

Releases support the current and previous version of Go at the time of release. The master branch supports the current version of Go.

More Repositories

1

go-mode.el

Emacs mode for the Go programming language
Emacs Lisp
1,384
star
2

gotraceui

Go execution trace frontend
Go
1,118
star
3

go-staticcheck

397
star
4

go-unused

341
star
5

go-js-dom

Go
248
star
6

go-structlayout

242
star
7

go-simple

228
star
8

xcapture

The command-line window recorder
Go
93
star
9

filesize

filesize is a small ruby class for handling filesizes with both the SI and binary prefixes, allowing conversion from any size to any other size.
Ruby
81
star
10

staticcheck-action

Staticcheck's official GitHub Action
81
star
11

tmux-ruby

ruby library to control tmux
Ruby
81
star
12

implements

Check which interfaces a Go type implements
Go
66
star
13

yasnippet-go

48
star
14

go-errcheck.el

Emacs Lisp
42
star
15

go-vanity

Go
39
star
16

everything

The semantic desktop search engine
Go
26
star
17

wayland-go

Wayland in Go
Go
26
star
18

go-augeas

Go bindings for augeas
Go
21
star
19

weechat-ruby

A ruby wrapper around the (not so nice) WeeChat API
Ruby
20
star
20

go-js-xhr

Go
19
star
21

go-vk

Go bindings for Vulkan
Go
19
star
22

netstat-nat

Go
18
star
23

go-keyify

15
star
24

gamayun

Torrent client designed for seeding tens of thousands of torrents.
Go
14
star
25

wayfarer

Experiments involving a Zig Wayland compositor.
Zig
13
star
26

go-nut

Go
11
star
27

go-rdeps

11
star
28

go-js-console

Go
9
star
29

go-transmission

Go
9
star
30

idxgrep

Indexed grep
Go
7
star
31

go-vfat

VFAT library for Go
Go
6
star
32

dmenu-ruby

A Ruby OOP wrapper around dmenu
Ruby
5
star
33

go-challenge-solutions

Go
5
star
34

go-pcap

Go
5
star
35

go-quickcheck

Go
4
star
36

go-irc

Go
4
star
37

go-collectd

Go
4
star
38

go-helpers

A random collection of Go helpers and scripts
Shell
4
star
39

uses

Go
4
star
40

go-color

Go package for working with colors
Go
4
star
41

go-curve

Primitives and routines for 2D shapes, curves, and paths. A port of kurbo.
Go
3
star
42

gosu-changdul

a widget set and window manager for gosu
Ruby
3
star
43

go-id3

Go
3
star
44

go-xmpp

Go
3
star
45

orlydb

Ruby
3
star
46

go-conntrack

Go
3
star
47

omapi

Go implementation of the OMAPI protocol to control the ISC DHCP server
Go
3
star
48

go-js-d3

Go
3
star
49

c3_xbmc

nfo files and rename scripts for Chaos Communication Congress recordings so XBMC can add them as a show
Shell
3
star
50

gutter

3
star
51

go-safeish

Somewhat safe unsafe helpers for Go
Go
2
star
52

go-libwayland

Go bindings for libwayland
C
2
star
53

go-flood-exporter

Go
2
star
54

dk-comment-toggle

Ruby
2
star
55

weechat-scripts

A bunch of WeeChat scripts
Ruby
2
star
56

gwm

A stacking window manager
Go
2
star
57

go-cups

Go
2
star
58

go-ident

Go
2
star
59

go-wgpu

Go bindings for wgpu, the Rust WebGPU implementation
Go
2
star
60

go-styx

Go implementation of the 9P protocol
2
star
61

go-js-http

Go
2
star
62

jello

A Go implementation of the Vello 2D renderer
WGSL
2
star
63

tmp-demo

Go
1
star
64

emacs-yard

emacs font locking for YARD documentation
Emacs Lisp
1
star
65

ryzom

Go libraries for writing tools for Ryzom
Go
1
star
66

simple-router

JavaScript
1
star
67

go-uzbl

Go
1
star
68

go-js-util

Go
1
star
69

facharbeit

My "Facharbeit"
PHP
1
star
70

go-sndprint

Go
1
star
71

sketchup-selection_manager

Ruby
1
star
72

rubyircd

Ruby
1
star
73

go-js-cubism

Go
1
star
74

gemtester

Ruby
1
star
75

langfmt.el

An emacs library for adding gofmt-like functionality to programming modes
Emacs Lisp
1
star
76

wgpu-linux-amd64

Go
1
star
77

keyword_arguments

named_arguments comes with a bunch of convenient methods for making "named arguments" (hashes as method arguments) in Ruby less painfull
Ruby
1
star
78

go-pcsensor

Go
1
star
79

ident

A Ruby library for querying identd servers
Ruby
1
star
80

nft-traffic-stats-collector

Go
1
star