golangci-lint/pkg/config/config.go

36 lines
617 B
Go
Raw Normal View History

package config
2018-05-05 09:24:37 +03:00
type OutFormat string
const (
OutFormatJSON = "json"
OutFormatLineNumber = "line-number"
OutFormatColoredLineNumber = "colored-line-number"
)
var OutFormats = []string{OutFormatColoredLineNumber, OutFormatLineNumber, OutFormatJSON}
type Common struct {
IsVerbose bool
}
type Run struct {
2018-05-05 11:08:14 +03:00
Paths []string
OutFormat string
ExitCodeIfIssuesFound int
2018-05-05 09:24:37 +03:00
}
type Config struct {
2018-05-05 09:24:37 +03:00
Common Common
Run Run
}
func NewDefault() *Config {
return &Config{
Run: Run{
Paths: []string{"./..."},
OutFormat: OutFormatColoredLineNumber,
},
}
}