remove GOLANGCI_COM_RUN: make runs in golangci.com and local runs identical

This commit is contained in:
Denis Isaev 2018-07-29 23:52:10 +03:00
parent 55cdda4166
commit b1948fdbaa
No known key found for this signature in database
GPG Key ID: A36A0EC8E27A1A01

View File

@ -2,7 +2,6 @@ package lintersdb
import ( import (
"fmt" "fmt"
"os"
"sort" "sort"
"strings" "strings"
"sync" "sync"
@ -187,23 +186,6 @@ func GetAllSupportedLinterConfigs() []linter.Config {
WithURL("https://github.com/alexkohler/prealloc"), WithURL("https://github.com/alexkohler/prealloc"),
} }
if os.Getenv("GOLANGCI_COM_RUN") == "1" {
disabled := map[string]bool{
golinters.Gocyclo{}.Name(): true, // annoying
golinters.Dupl{}.Name(): true, // annoying
golinters.Maligned{}.Name(): true, // rarely usable
golinters.TypeCheck{}.Name(): true, // annoying because of different building envs
golinters.Misspell{}.Name(): true, // unsure about false-positives number
golinters.Lll{}.Name(): true, // annoying
golinters.Unparam{}.Name(): true, // need to check it first
golinters.Nakedret{}.Name(): true, // annoying
golinters.Prealloc{}.Name(): true, // annoying
}
return enableLinterConfigs(lcs, func(lc *linter.Config) bool {
return !disabled[lc.Linter.Name()]
})
}
enabled := map[string]bool{ enabled := map[string]bool{
golinters.Govet{}.Name(): true, golinters.Govet{}.Name(): true,
golinters.Errcheck{}.Name(): true, golinters.Errcheck{}.Name(): true,