@@ -104,6 +104,7 @@ gofmt: Gofmt checks whether code was gofmt-ed. By default this tool runs with -s
104104goimports: Goimports does everything that gofmt does. Additionally it checks unused imports
105105maligned: Tool to detect Go structs that would take less memory if their fields were sorted
106106megacheck: 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
107108```
108109
109110Pass ` -E/--enable ` to enable linter and ` -D/--disable ` to disable:
@@ -196,6 +197,7 @@ golangci-lint linters
196197- [ goimports] ( https://godoc.org/golang.org/x/tools/cmd/goimports ) : Goimports does everything that gofmt does. Additionally it checks unused imports
197198- [ maligned] ( https://github.com/mdempsky/maligned ) : Tool to detect Go structs that would take less memory if their fields were sorted
198199- [ 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
199201
200202# Configuration
201203## Command-Line Options
@@ -231,7 +233,7 @@ Linters presets:
231233bugs: govet, errcheck, staticcheck, gas, megacheck
232234unused: unused, structcheck, varcheck, ineffassign, deadcode, megacheck
233235format: gofmt, goimports
234- style: golint, gosimple, interfacer, unconvert, dupl, goconst, megacheck
236+ style: golint, gosimple, interfacer, unconvert, dupl, goconst, megacheck, depguard
235237complexity: gocyclo
236238performance: maligned
237239```
@@ -427,6 +429,7 @@ Thanks to developers and authors of used linters:
427429- [golang/x/tools/goimports](https://godoc.org/golang.org/x/tools/cmd/goimports)
428430- [mdempsky/maligned](https://github.com/mdempsky/maligned)
429431- [dominikh/go-tools/megacheck](https://github.com/dominikh/go-tools/tree/master/cmd/megacheck)
432+ - [OpenPeeDeeP/depguard](https://github.com/OpenPeeDeeP/depguard)
430433
431434# Future Plans
4324351. Upstream all changes of forked linters.
0 commit comments