EffectiveIgnorePatterns returns the combined list of patterns the linter should use. If DisableDefaultIgnores is true, only user-defined patterns are returned.
()
| 52 | // EffectiveIgnorePatterns returns the combined list of patterns the linter should use. |
| 53 | // If DisableDefaultIgnores is true, only user-defined patterns are returned. |
| 54 | func (c *Config) EffectiveIgnorePatterns() []string { |
| 55 | if c.DisableDefaultIgnores { |
| 56 | return c.IgnorePatterns |
| 57 | } |
| 58 | combined := make([]string, 0, len(c.DefaultIgnorePatterns)+len(c.IgnorePatterns)) |
| 59 | combined = append(combined, c.DefaultIgnorePatterns...) |
| 60 | combined = append(combined, c.IgnorePatterns...) |
| 61 | return combined |
| 62 | } |
| 63 | |
| 64 | // GetRule returns RuleConfig for given rule name |
| 65 | func (c *Config) GetRule(ruleName string) RuleSetting { |
no outgoing calls