@@ -112,7 +112,7 @@ $ golangci-lint help linters
112
112
...
113
113
Disabled by default linters:
114
114
golint: Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes [fast: true]
115
- gas: Inspects source code for security problems [fast: false]
115
+ gosec ( gas) : Inspects source code for security problems [fast: false]
116
116
interfacer: Linter that suggests narrower interface types [fast: false]
117
117
unconvert: Remove unnecessary type conversions [fast: false]
118
118
dupl: Tool for code clone detection [fast: true]
@@ -193,12 +193,12 @@ We compare golangci-lint and gometalinter in default mode, but explicitly enable
193
193
$ golangci-lint run --no-config --issues-exit-code=0 --deadline=30m \
194
194
--disable-all --enable=deadcode --enable=gocyclo --enable=golint --enable=varcheck \
195
195
--enable=structcheck --enable=maligned --enable=errcheck --enable=dupl --enable=ineffassign \
196
- --enable=interfacer --enable=unconvert --enable=goconst --enable=gas --enable=megacheck
196
+ --enable=interfacer --enable=unconvert --enable=goconst --enable=gosec --enable=megacheck
197
197
$ gometalinter --deadline=30m --vendor --cyclo-over=30 --dupl-threshold=150 \
198
198
--exclude=< defaul golangci-lint excludes> --skip=testdata --skip=builtin \
199
199
--disable-all --enable=deadcode --enable=gocyclo --enable=golint --enable=varcheck \
200
200
--enable=structcheck --enable=maligned --enable=errcheck --enable=dupl --enable=ineffassign \
201
- --enable=interfacer --enable=unconvert --enable=goconst --enable=gas --enable=megacheck
201
+ --enable=interfacer --enable=unconvert --enable=goconst --enable=gosec --enable=megacheck
202
202
./...
203
203
```
204
204
@@ -301,7 +301,7 @@ golangci-lint help linters
301
301
302
302
## Disabled By Default Linters (` -E/--enable ` )
303
303
- [ golint] ( https://github.com/golang/lint ) - Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes
304
- - [ gas ] ( https://github.com/GoASTScanner/gas ) - Inspects source code for security problems
304
+ - [ gosec ] ( https://github.com/securego/gosec ) - Inspects source code for security problems
305
305
- [ interfacer] ( https://github.com/mvdan/interfacer ) - Linter that suggests narrower interface types
306
306
- [ unconvert] ( https://github.com/mdempsky/unconvert ) - Remove unnecessary type conversions
307
307
- [ dupl] ( https://github.com/mibk/dupl ) - Tool for code clone detection
@@ -364,21 +364,6 @@ Flags:
364
364
# golint: False positive when tests are defined in package 'test'
365
365
- func name will be used as test\.Test.* by other packages, and that stutters; consider calling this
366
366
367
- # gas: Too many false-positives on 'unsafe' usage
368
- - Use of unsafe calls should be audited
369
-
370
- # gas: Too many false-positives for parametrized shell calls
371
- - Subprocess launch(ed with variable|ing should be audited)
372
-
373
- # gas: Duplicated errcheck checks
374
- - G104
375
-
376
- # gas: Too many issues in popular repos
377
- - (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)
378
-
379
- # gas: False positive is triggered by 'src, err := ioutil.ReadFile(filename)'
380
- - Potential file inclusion via variable
381
-
382
367
# govet: Common false positives
383
368
- (possible misuse of unsafe.Pointer|should have signature)
384
369
@@ -643,6 +628,7 @@ linters:
643
628
disable :
644
629
- maligned
645
630
- prealloc
631
+ - gosec
646
632
` ` `
647
633
648
634
# False Positives
@@ -698,7 +684,7 @@ Thanks to developers and authors of used linters:
698
684
- [kisielk](https://github.com/kisielk)
699
685
- [golang](https://github.com/golang)
700
686
- [dominikh](https://github.com/dominikh)
701
- - [GoASTScanner ](https://github.com/GoASTScanner )
687
+ - [securego ](https://github.com/securego )
702
688
- [opennota](https://github.com/opennota)
703
689
- [mvdan](https://github.com/mvdan)
704
690
- [mdempsky](https://github.com/mdempsky)
0 commit comments