Config represent linter config
| 14 | |
| 15 | // Config represent linter config |
| 16 | type Config struct { |
| 17 | // MinVersion is the minimum version of commitlint required |
| 18 | // should be in semver format |
| 19 | MinVersion string `yaml:"min-version"` |
| 20 | |
| 21 | // DeprecatedVersion is the old "version" key, kept for backward compatibility. |
| 22 | // Use MinVersion ("min-version") in new config files. |
| 23 | DeprecatedVersion string `yaml:"version,omitempty"` |
| 24 | |
| 25 | // Formatter of the lint result |
| 26 | Formatter string `yaml:"formatter"` |
| 27 | |
| 28 | // Enabled Rules |
| 29 | Rules []string `yaml:"rules"` |
| 30 | |
| 31 | // Severity |
| 32 | Severity SeverityConfig `yaml:"severity"` |
| 33 | |
| 34 | // Settings is rule name to rule settings |
| 35 | Settings map[string]RuleSetting `yaml:"settings"` |
| 36 | |
| 37 | // DisableDefaultIgnores disables the built-in ignore patterns |
| 38 | // (merge, revert, fixup, squash, etc.) when set to true. |
| 39 | DisableDefaultIgnores bool `yaml:"disable-default-ignores"` |
| 40 | |
| 41 | // IgnorePatterns is a list of user-defined regex patterns. |
| 42 | // If the first line of the commit message matches any pattern, |
| 43 | // linting is skipped. These are added on top of the default |
| 44 | // patterns (unless DisableDefaultIgnores is true). |
| 45 | IgnorePatterns []string `yaml:"ignores"` |
| 46 | |
| 47 | // DefaultIgnorePatterns holds the built-in patterns (set by config package). |
| 48 | // Not serialized to YAML - users never set this directly. |
| 49 | DefaultIgnorePatterns []string `yaml:"-"` |
| 50 | } |
| 51 | |
| 52 | // EffectiveIgnorePatterns returns the combined list of patterns the linter should use. |
| 53 | // If DisableDefaultIgnores is true, only user-defined patterns are returned. |
nothing calls this directly
no outgoing calls
no test coverage detected