mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
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:
parent
47440bc2cc
commit
8a478c47ac
29 changed files with 361 additions and 107 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue