mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-12 03:26:30 +00:00
c28f7cb29f
Initial part of #435
21 lines
561 B
Go
21 lines
561 B
Go
package golinters
|
|
|
|
import (
|
|
"honnef.co/go/tools/simple"
|
|
|
|
"github.com/golangci/golangci-lint/pkg/config"
|
|
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
|
|
)
|
|
|
|
func NewGosimple(settings *config.StaticCheckSettings) *goanalysis.Linter {
|
|
cfg := staticCheckConfig(settings)
|
|
|
|
analyzers := setupStaticCheckAnalyzers(simple.Analyzers, getGoVersion(settings), cfg.Checks)
|
|
|
|
return goanalysis.NewLinter(
|
|
"gosimple",
|
|
"Linter for Go source code that specializes in simplifying a code",
|
|
analyzers,
|
|
nil,
|
|
).WithLoadMode(goanalysis.LoadModeTypesInfo)
|
|
}
|