Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { // The path to the sources to analyze SourcesToAnalyzePath []string `yaml:"sources"` // Exclude patterns (list of regular expressions. When a file matches one of these patterns, it is not analyzed) ExcludePatterns []string `yaml:"exclude"` // Reports Reports ConfigurationReport `yaml:"reports"` // Requirements Requirements *ConfigurationRequirements `yaml:"requirements"` Watching bool // if not empty, compare the current analysis with the one in this branch / commit CompareWith string // Location of cache files Storage *Storage.Workdir }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) SetExcludePatterns ¶
func (c *Configuration) SetExcludePatterns(patterns []string)
func (*Configuration) SetSourcesToAnalyzePath ¶
func (c *Configuration) SetSourcesToAnalyzePath(paths []string) error
type ConfigurationDefaultRule ¶ added in v0.15.0
type ConfigurationLoader ¶ added in v0.15.0
type ConfigurationLoader struct {
FilenameToChecks []string
}
func NewConfigurationLoader ¶ added in v0.15.0
func NewConfigurationLoader() *ConfigurationLoader
func (*ConfigurationLoader) CreateDefaultFile ¶ added in v0.15.0
func (c *ConfigurationLoader) CreateDefaultFile() error
func (*ConfigurationLoader) Import ¶ added in v0.16.0
func (c *ConfigurationLoader) Import(yamlString string) (*Configuration, error)
func (*ConfigurationLoader) Loads ¶ added in v0.15.0
func (c *ConfigurationLoader) Loads(cfg *Configuration) (*Configuration, error)
type ConfigurationReport ¶ added in v0.15.0
type ConfigurationRequirements ¶ added in v0.15.0
type ConfigurationRequirements struct { Rules *struct { CyclomaticComplexity *ConfigurationDefaultRule `yaml:"cyclomatic_complexity"` Loc *ConfigurationDefaultRule `yaml:"loc"` Maintainability *ConfigurationDefaultRule `yaml:"maintainability"` Coupling *struct { Forbidden []struct { From string `yaml:"from"` To string `yaml:"to"` } `yaml:"forbidden"` } `yaml:"coupling"` } `yaml:"rules"` FailOnError bool `yaml:"fail_on_error"` }
Click to show internal directories.
Click to hide internal directories.