Prepare for #164: rename GAS to gosec

1. Rename in a backward compatible way
2. Remove gosec default exclude list because gosec is already disabled
by default.
3. Warn about unmatched linter names in //nolint directives
4. Process linter names in //nolint directives in upper case
5. Disable gosec for golangci-lint in .golangci.yml
This commit is contained in:
Denis Isaev 2018-09-01 14:16:30 +03:00 committed by Isaev Denis
parent 47440bc2cc
commit 8a478c47ac
29 changed files with 361 additions and 107 deletions

View file

@ -20,8 +20,8 @@ func (e *Executor) initLinters() {
}
func IsLinterInConfigsList(name string, linters []linter.Config) bool {
for _, linter := range linters {
if linter.Linter.Name() == name {
for _, lc := range linters {
if lc.Name() == name {
return true
}
}
@ -40,7 +40,7 @@ func (e *Executor) executeLinters(cmd *cobra.Command, args []string) {
var disabledLCs []linter.Config
for _, lc := range e.DBManager.GetAllSupportedLinterConfigs() {
if !IsLinterInConfigsList(lc.Linter.Name(), enabledLCs) {
if !IsLinterInConfigsList(lc.Name(), enabledLCs) {
disabledLCs = append(disabledLCs, lc)
}
}