3 Star 2 Fork 1

Gitee 极速下载 / GolangCI-Lint

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/golangci/golangci-lint
克隆/下载
config.go 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
Denis Isaev 提交于 2018-06-29 00:12 . Fix #124: support unparam linter
package linter
const (
PresetFormatting = "format"
PresetComplexity = "complexity"
PresetStyle = "style"
PresetBugs = "bugs"
PresetUnused = "unused"
PresetPerformance = "performance"
)
type Config struct {
Linter Linter
EnabledByDefault bool
DoesFullImport bool
NeedsSSARepr bool
InPresets []string
Speed int // more value means faster execution of linter
OriginalURL string // URL of original (not forked) repo, needed for autogenerated README
}
func (lc Config) WithFullImport() Config {
lc.DoesFullImport = true
return lc
}
func (lc Config) WithSSA() Config {
lc.DoesFullImport = true
lc.NeedsSSARepr = true
return lc
}
func (lc Config) WithPresets(presets ...string) Config {
lc.InPresets = presets
return lc
}
func (lc Config) WithSpeed(speed int) Config {
lc.Speed = speed
return lc
}
func (lc Config) WithURL(url string) Config {
lc.OriginalURL = url
return lc
}
func (lc Config) NeedsProgramLoading() bool {
return lc.DoesFullImport
}
func (lc Config) NeedsSSARepresentation() bool {
return lc.NeedsSSARepr
}
func (lc Config) GetSpeed() int {
return lc.Speed
}
func NewConfig(linter Linter) *Config {
return &Config{
Linter: linter,
}
}
1
https://gitee.com/mirrors/GolangCI-Lint.git
git@gitee.com:mirrors/GolangCI-Lint.git
mirrors
GolangCI-Lint
GolangCI-Lint
v1.10.1

搜索帮助