mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-13 12:06:29 +00:00
82fd65665f
bidichk checks for dangerous unicode character sequences (https://github.com/golangci/golangci-lint/pull/2330)
33 lines
899 B
Go
33 lines
899 B
Go
package config
|
|
|
|
// Config encapsulates the config data specified in the golangci yaml config file.
|
|
type Config struct {
|
|
cfgDir string // The directory containing the golangci config file.
|
|
Run Run
|
|
|
|
Output Output
|
|
|
|
LintersSettings LintersSettings `mapstructure:"linters-settings"`
|
|
Linters Linters
|
|
Issues Issues
|
|
Severity Severity
|
|
Version Version
|
|
|
|
InternalCmdTest bool `mapstructure:"internal-cmd-test"` // Option is used only for testing golangci-lint command, don't use it
|
|
InternalTest bool // Option is used only for testing golangci-lint code, don't use it
|
|
}
|
|
|
|
// getConfigDir returns the directory that contains golangci config file.
|
|
func (c *Config) GetConfigDir() string {
|
|
return c.cfgDir
|
|
}
|
|
|
|
func NewDefault() *Config {
|
|
return &Config{
|
|
LintersSettings: defaultLintersSettings,
|
|
}
|
|
}
|
|
|
|
type Version struct {
|
|
Format string `mapstructure:"format"`
|
|
}
|