Skip to content

Commit 034728e

Browse files
committed
generate parts of README automatically
1 parent 5236feb commit 034728e

31 files changed

+852
-280
lines changed

README.md

Lines changed: 57 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -77,34 +77,35 @@ GolangCI-Lint can be used with zero configuration. By default next linters are e
7777
```
7878
$ golangci-lint linters
7979
Enabled by default linters:
80-
govet: Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
81-
errcheck: Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
82-
staticcheck: Staticcheck is go vet on steroids, applying a ton of static analysis checks
83-
unused: Checks Go code for unused constants, variables, functions and types
84-
gosimple: Linter for Go source code that specialises on simplifying code
85-
gas: Inspects source code for security problems
86-
structcheck: Finds unused struct fields
87-
varcheck: Finds unused global variables and constants
88-
ineffassign: Detects when assignments to existing variables are not used
89-
deadcode: Finds unused code
80+
govet: Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: true]
81+
errcheck: Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false]
82+
staticcheck: Staticcheck is a go vet on steroids, applying a ton of static analysis checks [fast: false]
83+
unused: Checks Go code for unused constants, variables, functions and types [fast: false]
84+
gosimple: Linter for Go source code that specializes in simplifying a code [fast: false]
85+
gas: Inspects source code for security problems [fast: false]
86+
structcheck: Finds an unused struct fields [fast: false]
87+
varcheck: Finds unused global variables and constants [fast: false]
88+
ineffassign: Detects when assignments to existing variables are not used [fast: true]
89+
deadcode: Finds unused code [fast: false]
90+
typecheck: Like the front-end of a Go compiler, parses and type-checks Go code [fast: false]
9091
```
9192

9293
and next linters are disabled by default:
9394
```
9495
$ golangci-lint linters
9596
...
9697
Disabled by default linters:
97-
golint: Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
98-
interfacer: Linter that suggests narrower interface types
99-
unconvert: Remove unnecessary type conversions
100-
dupl: Tool for code clone detection
101-
goconst: Finds repeated strings that could be replaced by a constant
102-
gocyclo: Computes and checks the cyclomatic complexity of functions
103-
gofmt: Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
104-
goimports: Goimports does everything that gofmt does. Additionally it checks unused imports
105-
maligned: Tool to detect Go structs that would take less memory if their fields were sorted
106-
megacheck: 3 sub-linters in one: unused, gosimple and staticcheck
107-
depguard: Go linter that checks if package imports are in a list of acceptable packages
98+
golint: Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes [fast: true]
99+
interfacer: Linter that suggests narrower interface types [fast: false]
100+
unconvert: Remove unnecessary type conversions [fast: false]
101+
dupl: Tool for code clone detection [fast: true]
102+
goconst: Finds repeated strings that could be replaced by a constant [fast: true]
103+
gocyclo: Computes and checks the cyclomatic complexity of functions [fast: true]
104+
gofmt: Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true]
105+
goimports: Goimports does everything that gofmt does. Additionally it checks unused imports [fast: true]
106+
maligned: Tool to detect Go structs that would take less memory if their fields were sorted [fast: false]
107+
megacheck: 3 sub-linters in one: unused, gosimple and staticcheck [fast: false]
108+
depguard: Go linter that checks if package imports are in a list of acceptable packages [fast: false]
108109
```
109110

110111
Pass `-E/--enable` to enable linter and `-D/--disable` to disable:
@@ -174,30 +175,30 @@ golangci-lint linters
174175
```
175176

176177
## Enabled By Default Linters
177-
- [go vet](https://golang.org/cmd/vet/) - Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
178-
- [errcheck](https://github.com/kisielk/errcheck): Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
179-
- [staticcheck](https://staticcheck.io/): Staticcheck is a go vet on steroids, applying a ton of static analysis checks
180-
- [unused](https://github.com/dominikh/go-tools/tree/master/cmd/unused): Checks Go code for unused constants, variables, functions, and types
181-
- [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple): Linter for Go source code that specializes in simplifying a code
182-
- [gas](https://github.com/GoASTScanner/gas): Inspects source code for security problems
183-
- [structcheck](https://github.com/opennota/check): Finds an unused struct fields
184-
- [varcheck](https://github.com/opennota/check): Finds unused global variables and constants
185-
- [ineffassign](https://github.com/gordonklaus/ineffassign): Detects when assignments to existing variables are not used
186-
- [deadcode](https://github.com/remyoudompheng/go-misc/tree/master/deadcode): Finds unused code
187-
- typecheck: Like the front-end of a Go compiler, parses and type-checks Go code. Similar to [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype).
178+
- [govet](https://golang.org/cmd/vet/) - Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
179+
- [errcheck](https://github.com/kisielk/errcheck) - Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases
180+
- [staticcheck](https://staticcheck.io/) - Staticcheck is a go vet on steroids, applying a ton of static analysis checks
181+
- [unused](https://github.com/dominikh/go-tools/tree/master/cmd/unused) - Checks Go code for unused constants, variables, functions and types
182+
- [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) - Linter for Go source code that specializes in simplifying a code
183+
- [gas](https://github.com/GoASTScanner/gas) - Inspects source code for security problems
184+
- [structcheck](https://github.com/opennota/check) - Finds an unused struct fields
185+
- [varcheck](https://github.com/opennota/check) - Finds unused global variables and constants
186+
- [ineffassign](https://github.com/gordonklaus/ineffassign) - Detects when assignments to existing variables are not used
187+
- [deadcode](https://github.com/remyoudompheng/go-misc/tree/master/deadcode) - Finds unused code
188+
- typecheck - Like the front-end of a Go compiler, parses and type-checks Go code
188189

189190
## Disabled By Default Linters (`-E/--enable`)
190-
- [golint](https://github.com/golang/lint): Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
191-
- [interfacer](https://github.com/mvdan/interfacer): Linter that suggests narrower interface types
192-
- [unconvert](https://github.com/mdempsky/unconvert): Remove unnecessary type conversions
193-
- [dupl](https://github.com/mibk/dupl): Tool for code clone detection
194-
- [goconst](https://github.com/jgautheron/goconst): Finds repeated strings that could be replaced by a constant
195-
- [gocyclo](https://github.com/alecthomas/gocyclo): Computes and checks the cyclomatic complexity of functions
196-
- [gofmt](https://golang.org/cmd/gofmt/): Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
197-
- [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports): Goimports does everything that gofmt does. Additionally it checks unused imports
198-
- [maligned](https://github.com/mdempsky/maligned): Tool to detect Go structs that would take less memory if their fields were sorted
199-
- [megacheck](https://github.com/dominikh/go-tools/tree/master/cmd/megacheck): 3 sub-linters in one: unused, gosimple and staticcheck
200-
- [depguard](https://github.com/OpenPeeDeeP/depguard): Go linter that checks if package imports are in a list of acceptable packages
191+
- [golint](https://github.com/golang/lint) - Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
192+
- [interfacer](https://github.com/mvdan/interfacer) - Linter that suggests narrower interface types
193+
- [unconvert](https://github.com/mdempsky/unconvert) - Remove unnecessary type conversions
194+
- [dupl](https://github.com/mibk/dupl) - Tool for code clone detection
195+
- [goconst](https://github.com/jgautheron/goconst) - Finds repeated strings that could be replaced by a constant
196+
- [gocyclo](https://github.com/alecthomas/gocyclo) - Computes and checks the cyclomatic complexity of functions
197+
- [gofmt](https://golang.org/cmd/gofmt/) - Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification
198+
- [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) - Goimports does everything that gofmt does. Additionally it checks unused imports
199+
- [maligned](https://github.com/mdempsky/maligned) - Tool to detect Go structs that would take less memory if their fields were sorted
200+
- [megacheck](https://github.com/dominikh/go-tools/tree/master/cmd/megacheck) - 3 sub-linters in one: unused, gosimple and staticcheck
201+
- [depguard](https://github.com/OpenPeeDeeP/depguard) - Go linter that checks if package imports are in a list of acceptable packages
201202

202203
# Configuration
203204
## Command-Line Options
@@ -306,7 +307,6 @@ There is a [`.golangci.yml`](https://github.com/golangci/golangci-lint/blob/mast
306307
It's a [.golangci.yml](https://github.com/golangci/golangci-lint/blob/master/.golangci.yml) of this repo: we enable more linters than by default and make their settings more strict:
307308
```yaml
308309
run:
309-
deadline: 30s
310310
tests: true
311311

312312
linters-settings:
@@ -410,26 +410,19 @@ Thanks to [alecthomas/gometalinter](https://github.com/alecthomas/gometalinter)
410410
Thanks to [bradleyfalzon/revgrep](https://github.com/bradleyfalzon/revgrep) for cool diff tool.
411411

412412
Thanks to developers and authors of used linters:
413-
- [golang/vet](https://golang.org/cmd/vet/)
414-
- [kisielk/errcheck](https://github.com/kisielk/errcheck)
415-
- [staticcheck](https://staticcheck.io/)
416-
- [dominikh/go-tools/unused](https://github.com/dominikh/go-tools/tree/master/cmd/unused)
417-
- [dominikh/go-tools/gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple)
418-
- [GoASTScanner/gas](https://github.com/GoASTScanner/gas)
419-
- [opennota/check](https://github.com/opennota/check)
420-
- [gordonklaus/ineffassign](https://github.com/gordonklaus/ineffassign)
421-
- [remyoudompheng/go-misc/deadcode](https://github.com/remyoudompheng/go-misc/tree/master/deadcode)
422-
- [golang/lint](https://github.com/golang/lint)
423-
- [mvdan/interfacer](https://github.com/mvdan/interfacer)
424-
- [mdempsky/unconvert](https://github.com/mdempsky/unconvert)
425-
- [mibk/dupl](https://github.com/mibk/dupl)
426-
- [jgautheron/goconst](https://github.com/jgautheron/goconst)
427-
- [alecthomas/gocyclo](https://github.com/alecthomas/gocyclo)
428-
- [golang/gofmt](https://golang.org/cmd/gofmt/)
429-
- [golang/x/tools/goimports](https://godoc.org/golang.org/x/tools/cmd/goimports)
430-
- [mdempsky/maligned](https://github.com/mdempsky/maligned)
431-
- [dominikh/go-tools/megacheck](https://github.com/dominikh/go-tools/tree/master/cmd/megacheck)
432-
- [OpenPeeDeeP/depguard](https://github.com/OpenPeeDeeP/depguard)
413+
- [kisielk](https://github.com/kisielk)
414+
- [golang](https://github.com/golang)
415+
- [dominikh](https://github.com/dominikh)
416+
- [GoASTScanner](https://github.com/GoASTScanner)
417+
- [opennota](https://github.com/opennota)
418+
- [mvdan](https://github.com/mvdan)
419+
- [mdempsky](https://github.com/mdempsky)
420+
- [gordonklaus](https://github.com/gordonklaus)
421+
- [mibk](https://github.com/mibk)
422+
- [jgautheron](https://github.com/jgautheron)
423+
- [remyoudompheng](https://github.com/remyoudompheng)
424+
- [alecthomas](https://github.com/alecthomas)
425+
- [OpenPeeDeeP](https://github.com/OpenPeeDeeP)
433426

434427
# Future Plans
435428
1. Upstream all changes of forked linters.

0 commit comments

Comments
 (0)