diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml index 5b29e6e57775..4e32e784a3a4 100644 --- a/.golangci.next.reference.yml +++ b/.golangci.next.reference.yml @@ -366,10 +366,6 @@ formatters: # Default: false no-prefix-comments: true - # Skip generated files. - # Default: true - skip-generated: false - # Enable custom order of sections. # If `true`, make the section order the same as the order of `sections`. # Default: false @@ -438,9 +434,6 @@ linters-settings: # See the default value of `exclude` to get the builtin exclusions. # Default: true use-builtin-exclusions: false - # Ignore *_test.go files. - # Default: false - ignore-test: true bidichk: # The following configurations check for all mentioned invisible Unicode runes. @@ -468,9 +461,6 @@ linters-settings: # If it's higher than 0.0 (float) the check is enabled # Default: 0.0 package-average: 0.5 - # Should ignore tests. - # Default: false - skip-tests: true decorder: # Required order of `type`, `const`, `var` and `func` declarations inside a file. @@ -655,9 +645,6 @@ linters-settings: check: - switch - map - # Check switch statements in generated files also. - # Default: false - check-generated: true # Presence of "default" case in switch statements satisfies exhaustiveness, # even if all enum members are not listed. # Default: false @@ -817,9 +804,6 @@ linters-settings: # Minimum occurrences of constant string count to trigger issue. # Default: 3 min-occurrences: 2 - # Ignore test files. - # Default: false - ignore-tests: true # Look for existing constants matching the values. # Default: true match-constant: false @@ -1733,10 +1717,6 @@ linters-settings: - G601 # Implicit memory aliasing of items from a range statement - G602 # Slice access out of bounds - # Exclude generated files - # Default: false - exclude-generated: true - # Filter out the issues with a lower severity than the given value. # Valid options are: low, medium, high. # Default: low @@ -1843,10 +1823,6 @@ linters-settings: - 'example.com/your/project/i18n/markers.OK' - 'example.com/your/project/i18n/markers.TODO' - 'command-line-arguments.Simple' - # Ignore test files. - # - # Default: true - ignore-tests: false # List of Unicode scripts to watch for any usage in string literals. # https://pkg.go.dev/unicode#pkg-variables # @@ -2462,11 +2438,6 @@ linters-settings: # Defaults to unlimited. max-open-files: 2048 - # When set to false, ignores files with "GENERATED" header, similar to golint. - # See https://github.com/mgechev/revive#configuration for details. - # Default: false - ignore-generated-header: true - # Sets the default severity. # See https://github.com/mgechev/revive#configuration # Default: warning @@ -4238,10 +4209,6 @@ severity: # Default: "" default: error - # If set to true `severity-rules` regular expressions become case-sensitive. - # Default: false - case-sensitive: true - # When a list of severity rules are provided, severity information will be added to lint issues. # Severity rules have the same filtering capability as exclude rules # except you are allowed to specify one matcher per severity rule. diff --git a/jsonschema/golangci.next.jsonschema.json b/jsonschema/golangci.next.jsonschema.json index 100acc262e25..6e8891ac8020 100644 --- a/jsonschema/golangci.next.jsonschema.json +++ b/jsonschema/golangci.next.jsonschema.json @@ -526,11 +526,6 @@ "description": "To enable/disable the asasalint builtin exclusions of function names.", "type": "boolean", "default": true - }, - "ignore-test": { - "description": "Ignore *_test.go files.", - "type": "boolean", - "default": false } } }, @@ -589,11 +584,6 @@ "type": "object", "additionalProperties": false, "properties": { - "skip-tests": { - "description": "Should the linter execute on test files as well", - "type": "boolean", - "default": false - }, "max-complexity": { "description": "Max complexity the function can have", "type": "integer", @@ -852,11 +842,6 @@ "examples": ["switch", "map"] } }, - "check-generated": { - "description": "Check switch statements in generated files", - "type": "boolean", - "default": false - }, "explicit-exhaustive-switch": { "description": "Only run exhaustive check on switches with \"//exhaustive:enforce\" comment.", "type": "boolean", @@ -1010,11 +995,6 @@ }, "default": ["standard", "default"] }, - "skip-generated": { - "description": "Skip generated files.", - "type": "boolean", - "default": true - }, "no-inline-comments": { "description": "Checks that no inline Comments are present.", "type": "boolean", @@ -1149,11 +1129,6 @@ "type": "integer", "default": 3 }, - "ignore-tests": { - "description": "Ignore test files.", - "type": "boolean", - "default": false - }, "ignore-calls": { "description": "Ignore when constant is not used as function argument", "type": "boolean", @@ -1767,11 +1742,6 @@ "$ref": "#/definitions/gosec-rules" } }, - "exclude-generated": { - "description": "Exclude generated files", - "type": "boolean", - "default": false - }, "severity": { "description": "Filter out the issues with a lower severity than the given value", "type": "string", @@ -1810,11 +1780,6 @@ "type": "string" } }, - "ignore-tests": { - "description": "Ignore test files.", - "type": "boolean", - "default": false - }, "watch-for-scripts": { "description": "List of Unicode scripts to watch for any usage in string literals.", "type": "array", @@ -2541,9 +2506,6 @@ "max-open-files": { "type": "integer" }, - "ignore-generated-header": { - "type": "boolean" - }, "confidence": { "type": "number" }, @@ -4422,11 +4384,6 @@ "type": "string", "default": "" }, - "case-sensitive": { - "description": "If set to true, severity-rules regular expressions become case sensitive.", - "type": "boolean", - "default": false - }, "rules": { "description": "When a list of severity rules are provided, severity information will be added to lint issues. Severity rules have the same filtering capability as exclude rules except you are allowed to specify one matcher per severity rule.\nOnly affects out formats that support setting severity information.", "type": "array", diff --git a/pkg/config/linters_settings.go b/pkg/config/linters_settings.go index 82fea90e3a94..bc11207bcb66 100644 --- a/pkg/config/linters_settings.go +++ b/pkg/config/linters_settings.go @@ -32,7 +32,6 @@ var defaultLintersSettings = LintersSettings{ }, Exhaustive: ExhaustiveSettings{ Check: []string{"switch"}, - CheckGenerated: false, DefaultSignifiesExhaustive: false, IgnoreEnumMembers: "", PackageScopeOnly: false, @@ -75,7 +74,6 @@ var defaultLintersSettings = LintersSettings{ Gosmopolitan: GosmopolitanSettings{ AllowTimeLocal: false, EscapeHatches: []string{}, - IgnoreTests: true, WatchForScripts: []string{"Han"}, }, Inamedparam: INamedParamSettings{ @@ -304,7 +302,6 @@ func (s *LintersSettings) Validate() error { type AsasalintSettings struct { Exclude []string `mapstructure:"exclude"` UseBuiltinExclusions bool `mapstructure:"use-builtin-exclusions"` - IgnoreTest bool `mapstructure:"ignore-test"` } type BiDiChkSettings struct { @@ -326,7 +323,6 @@ type CopyLoopVarSettings struct { type Cyclop struct { MaxComplexity int `mapstructure:"max-complexity"` PackageAverage float64 `mapstructure:"package-average"` - SkipTests bool `mapstructure:"skip-tests"` } type DepGuardSettings struct { @@ -397,7 +393,6 @@ type ErrorLintAllowPair struct { type ExhaustiveSettings struct { Check []string `mapstructure:"check"` - CheckGenerated bool `mapstructure:"check-generated"` DefaultSignifiesExhaustive bool `mapstructure:"default-signifies-exhaustive"` IgnoreEnumMembers string `mapstructure:"ignore-enum-members"` IgnoreEnumTypes string `mapstructure:"ignore-enum-types"` @@ -460,7 +455,6 @@ type GocognitSettings struct { type GoConstSettings struct { IgnoreStrings string `mapstructure:"ignore-strings"` - IgnoreTests bool `mapstructure:"ignore-tests"` MatchWithConstants bool `mapstructure:"match-constant"` MinStringLen int `mapstructure:"min-len"` MinOccurrencesCount int `mapstructure:"min-occurrences"` @@ -535,19 +529,17 @@ type GoModGuardSettings struct { } type GoSecSettings struct { - Includes []string `mapstructure:"includes"` - Excludes []string `mapstructure:"excludes"` - Severity string `mapstructure:"severity"` - Confidence string `mapstructure:"confidence"` - ExcludeGenerated bool `mapstructure:"exclude-generated"` - Config map[string]any `mapstructure:"config"` - Concurrency int `mapstructure:"concurrency"` + Includes []string `mapstructure:"includes"` + Excludes []string `mapstructure:"excludes"` + Severity string `mapstructure:"severity"` + Confidence string `mapstructure:"confidence"` + Config map[string]any `mapstructure:"config"` + Concurrency int `mapstructure:"concurrency"` } type GosmopolitanSettings struct { AllowTimeLocal bool `mapstructure:"allow-time-local"` EscapeHatches []string `mapstructure:"escape-hatches"` - IgnoreTests bool `mapstructure:"ignore-tests"` WatchForScripts []string `mapstructure:"watch-for-scripts"` } @@ -749,13 +741,12 @@ type RecvcheckSettings struct { } type ReviveSettings struct { - Go string `mapstructure:"-"` - MaxOpenFiles int `mapstructure:"max-open-files"` - IgnoreGeneratedHeader bool `mapstructure:"ignore-generated-header"` - Confidence float64 `mapstructure:"confidence"` - Severity string `mapstructure:"severity"` - EnableAllRules bool `mapstructure:"enable-all-rules"` - Rules []struct { + Go string `mapstructure:"-"` + MaxOpenFiles int `mapstructure:"max-open-files"` + Confidence float64 `mapstructure:"confidence"` + Severity string `mapstructure:"severity"` + EnableAllRules bool `mapstructure:"enable-all-rules"` + Rules []struct { Name string `mapstructure:"name"` Arguments []any `mapstructure:"arguments"` Severity string `mapstructure:"severity"` diff --git a/pkg/config/severity.go b/pkg/config/severity.go index fd090932f049..f41e17b11b2b 100644 --- a/pkg/config/severity.go +++ b/pkg/config/severity.go @@ -8,9 +8,8 @@ import ( const severityRuleMinConditionsCount = 1 type Severity struct { - Default string `mapstructure:"default"` - CaseSensitive bool `mapstructure:"case-sensitive"` - Rules []SeverityRule `mapstructure:"rules"` + Default string `mapstructure:"default"` + Rules []SeverityRule `mapstructure:"rules"` } func (s *Severity) Validate() error { diff --git a/pkg/goformatters/gci/gci.go b/pkg/goformatters/gci/gci.go index 76e8186cc960..4b8c19c29004 100644 --- a/pkg/goformatters/gci/gci.go +++ b/pkg/goformatters/gci/gci.go @@ -32,9 +32,11 @@ func New(settings *config.GciSettings) (*Formatter, error) { Cfg: gcicfg.BoolConfig{ NoInlineComments: settings.NoInlineComments, NoPrefixComments: settings.NoPrefixComments, - SkipGenerated: settings.SkipGenerated, CustomOrder: settings.CustomOrder, NoLexOrder: settings.NoLexOrder, + + // Should be managed with `formatters.exclusions.generated`. + SkipGenerated: false, }, SectionStrings: settings.Sections, ModPath: modPath, diff --git a/pkg/golinters/asasalint/asasalint.go b/pkg/golinters/asasalint/asasalint.go index ccc58fee40a5..ade349610a46 100644 --- a/pkg/golinters/asasalint/asasalint.go +++ b/pkg/golinters/asasalint/asasalint.go @@ -14,7 +14,9 @@ func New(settings *config.AsasalintSettings) *goanalysis.Linter { if settings != nil { cfg.Exclude = settings.Exclude cfg.NoBuiltinExclusions = !settings.UseBuiltinExclusions - cfg.IgnoreTest = settings.IgnoreTest + + // Should be managed with `linters.exclusions.rules`. + cfg.IgnoreTest = false } a, err := asasalint.NewAnalyzer(cfg) diff --git a/pkg/golinters/cyclop/cyclop.go b/pkg/golinters/cyclop/cyclop.go index 772b5601ca71..3f46860c30cd 100644 --- a/pkg/golinters/cyclop/cyclop.go +++ b/pkg/golinters/cyclop/cyclop.go @@ -14,7 +14,8 @@ func New(settings *config.Cyclop) *goanalysis.Linter { var cfg map[string]map[string]any if settings != nil { d := map[string]any{ - "skipTests": settings.SkipTests, + // Should be managed with `linters.exclusions.rules`. + "skipTests": false, } if settings.MaxComplexity != 0 { diff --git a/pkg/golinters/exhaustive/exhaustive.go b/pkg/golinters/exhaustive/exhaustive.go index 9249efb69a38..1e73bc274d81 100644 --- a/pkg/golinters/exhaustive/exhaustive.go +++ b/pkg/golinters/exhaustive/exhaustive.go @@ -16,7 +16,6 @@ func New(settings *config.ExhaustiveSettings) *goanalysis.Linter { cfg = map[string]map[string]any{ a.Name: { exhaustive.CheckFlag: settings.Check, - exhaustive.CheckGeneratedFlag: settings.CheckGenerated, exhaustive.DefaultSignifiesExhaustiveFlag: settings.DefaultSignifiesExhaustive, exhaustive.IgnoreEnumMembersFlag: settings.IgnoreEnumMembers, exhaustive.IgnoreEnumTypesFlag: settings.IgnoreEnumTypes, @@ -24,6 +23,8 @@ func New(settings *config.ExhaustiveSettings) *goanalysis.Linter { exhaustive.ExplicitExhaustiveMapFlag: settings.ExplicitExhaustiveMap, exhaustive.ExplicitExhaustiveSwitchFlag: settings.ExplicitExhaustiveSwitch, exhaustive.DefaultCaseRequiredFlag: settings.DefaultCaseRequired, + // Should be managed with `linters.exclusions.generated`. + exhaustive.CheckGeneratedFlag: true, }, } } diff --git a/pkg/golinters/goconst/goconst.go b/pkg/golinters/goconst/goconst.go index 07bed301f328..11a8cd50c264 100644 --- a/pkg/golinters/goconst/goconst.go +++ b/pkg/golinters/goconst/goconst.go @@ -54,7 +54,6 @@ func New(settings *config.GoConstSettings) *goanalysis.Linter { func runGoconst(pass *analysis.Pass, settings *config.GoConstSettings) ([]goanalysis.Issue, error) { cfg := goconstAPI.Config{ IgnoreStrings: settings.IgnoreStrings, - IgnoreTests: settings.IgnoreTests, MatchWithConstants: settings.MatchWithConstants, MinStringLength: settings.MinStringLen, MinOccurrences: settings.MinOccurrencesCount, @@ -62,6 +61,9 @@ func runGoconst(pass *analysis.Pass, settings *config.GoConstSettings) ([]goanal NumberMin: settings.NumberMin, NumberMax: settings.NumberMax, ExcludeTypes: map[goconstAPI.Type]bool{}, + + // Should be managed with `linters.exclusions.rules`. + IgnoreTests: false, } if settings.IgnoreCalls { diff --git a/pkg/golinters/goconst/testdata/goconst_dont_ignore.yml b/pkg/golinters/goconst/testdata/goconst_dont_ignore.yml deleted file mode 100644 index c2abf80ec968..000000000000 --- a/pkg/golinters/goconst/testdata/goconst_dont_ignore.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: "2" - -linters-settings: - goconst: - ignore-tests: false diff --git a/pkg/golinters/goconst/testdata/goconst_dont_ignore_test.go b/pkg/golinters/goconst/testdata/goconst_dont_ignore_test.go index 5c31cce3741c..8133d12a6913 100644 --- a/pkg/golinters/goconst/testdata/goconst_dont_ignore_test.go +++ b/pkg/golinters/goconst/testdata/goconst_dont_ignore_test.go @@ -1,5 +1,4 @@ //golangcitest:args -Egoconst -//golangcitest:config_path testdata/goconst_dont_ignore.yml package testdata import ( diff --git a/pkg/golinters/goconst/testdata/goconst_ignore.yml b/pkg/golinters/goconst/testdata/goconst_ignore.yml deleted file mode 100644 index bfb70d3a9cb7..000000000000 --- a/pkg/golinters/goconst/testdata/goconst_ignore.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: "2" - -linters-settings: - goconst: - ignore-tests: true diff --git a/pkg/golinters/goconst/testdata/goconst_ignore_test.go b/pkg/golinters/goconst/testdata/goconst_ignore_test.go deleted file mode 100644 index 549e9cc7b868..000000000000 --- a/pkg/golinters/goconst/testdata/goconst_ignore_test.go +++ /dev/null @@ -1,37 +0,0 @@ -//golangcitest:args -Egoconst -//golangcitest:config_path testdata/goconst_ignore.yml -//golangcitest:expected_exitcode 0 -package testdata - -import ( - "fmt" - "testing" -) - -func TestGoConstA(t *testing.T) { - a := "needconst" - fmt.Print(a) - b := "needconst" - fmt.Print(b) - c := "needconst" - fmt.Print(c) -} - -func TestGoConstB(t *testing.T) { - a := "needconst" - fmt.Print(a) - b := "needconst" - fmt.Print(b) -} - -const AlreadyHasConst = "alreadyhasconst" - -func TestGoConstC(t *testing.T) { - a := "alreadyhasconst" - fmt.Print(a) - b := "alreadyhasconst" - fmt.Print(b) - c := "alreadyhasconst" - fmt.Print(c) - fmt.Print("alreadyhasconst") -} diff --git a/pkg/golinters/gosec/gosec.go b/pkg/golinters/gosec/gosec.go index 6b46beaccfe4..148fd9426888 100644 --- a/pkg/golinters/gosec/gosec.go +++ b/pkg/golinters/gosec/gosec.go @@ -62,7 +62,7 @@ func New(settings *config.GoSecSettings) *goanalysis.Linter { ).WithContextSetter(func(lintCtx *linter.Context) { analyzer.Run = func(pass *analysis.Pass) (any, error) { // The `gosecAnalyzer` is here because of concurrency issue. - gosecAnalyzer := gosec.NewAnalyzer(conf, true, settings.ExcludeGenerated, false, settings.Concurrency, logger) + gosecAnalyzer := gosec.NewAnalyzer(conf, true, false, false, settings.Concurrency, logger) gosecAnalyzer.LoadRules(ruleDefinitions.RulesInfo()) gosecAnalyzer.LoadAnalyzers(analyzerDefinitions.AnalyzersInfo()) diff --git a/pkg/golinters/gosmopolitan/gosmopolitan.go b/pkg/golinters/gosmopolitan/gosmopolitan.go index bf9b19f1292b..0b91515d5282 100644 --- a/pkg/golinters/gosmopolitan/gosmopolitan.go +++ b/pkg/golinters/gosmopolitan/gosmopolitan.go @@ -18,8 +18,10 @@ func New(settings *config.GosmopolitanSettings) *goanalysis.Linter { cfg[a.Name] = map[string]any{ "allowtimelocal": settings.AllowTimeLocal, "escapehatches": strings.Join(settings.EscapeHatches, ","), - "lookattests": !settings.IgnoreTests, "watchforscripts": strings.Join(settings.WatchForScripts, ","), + + // Should be managed with `linters.exclusions.rules`. + "lookattests": true, } } diff --git a/pkg/golinters/gosmopolitan/testdata/gosmopolitan_dont_ignore_test.go b/pkg/golinters/gosmopolitan/testdata/gosmopolitan_dont_ignore_test.go index 5a347af10a33..2c25ba6e0a02 100644 --- a/pkg/golinters/gosmopolitan/testdata/gosmopolitan_dont_ignore_test.go +++ b/pkg/golinters/gosmopolitan/testdata/gosmopolitan_dont_ignore_test.go @@ -1,5 +1,4 @@ //golangcitest:args -Egosmopolitan -//golangcitest:config_path testdata/gosmopolitan_dont_ignore_tests.yml package testdata import ( @@ -8,5 +7,5 @@ import ( func main() { _ = "开启检查测试文件" // want `string literal contains rune in Han script` - _ = time.Local // want `usage of time.Local` + _ = time.Local // want `usage of time.Local` } diff --git a/pkg/golinters/gosmopolitan/testdata/gosmopolitan_dont_ignore_tests.yml b/pkg/golinters/gosmopolitan/testdata/gosmopolitan_dont_ignore_tests.yml deleted file mode 100644 index 26605e957b05..000000000000 --- a/pkg/golinters/gosmopolitan/testdata/gosmopolitan_dont_ignore_tests.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: "2" - -linters-settings: - gosmopolitan: - ignore-tests: false diff --git a/pkg/golinters/gosmopolitan/testdata/gosmopolitan_ignore_test.go b/pkg/golinters/gosmopolitan/testdata/gosmopolitan_ignore_test.go deleted file mode 100644 index 6972c1359335..000000000000 --- a/pkg/golinters/gosmopolitan/testdata/gosmopolitan_ignore_test.go +++ /dev/null @@ -1,12 +0,0 @@ -//golangcitest:args -Egosmopolitan -//golangcitest:expected_exitcode 0 -package testdata - -import ( - "time" -) - -func main() { - _ = "默认不检查测试文件" - _ = time.Local -} diff --git a/pkg/golinters/perfsprint/perfsprint.go b/pkg/golinters/perfsprint/perfsprint.go index c34f7e4c629a..c0ea235dcaee 100644 --- a/pkg/golinters/perfsprint/perfsprint.go +++ b/pkg/golinters/perfsprint/perfsprint.go @@ -16,6 +16,8 @@ func New(settings *config.PerfSprintSettings) *goanalysis.Linter { } if settings != nil { + // NOTE: The option `ignore-tests` is not handled because it should be managed with `linters.exclusions.rules` + cfg[a.Name]["integer-format"] = settings.IntegerFormat cfg[a.Name]["int-conversion"] = settings.IntConversion diff --git a/pkg/golinters/revive/revive.go b/pkg/golinters/revive/revive.go index 460281287fe6..1a6b44787a9b 100644 --- a/pkg/golinters/revive/revive.go +++ b/pkg/golinters/revive/revive.go @@ -248,12 +248,14 @@ func getConfig(cfg *config.ReviveSettings) (*lint.Config, error) { func createConfigMap(cfg *config.ReviveSettings) map[string]any { rawRoot := map[string]any{ - "ignoreGeneratedHeader": cfg.IgnoreGeneratedHeader, - "confidence": cfg.Confidence, - "severity": cfg.Severity, - "errorCode": cfg.ErrorCode, - "warningCode": cfg.WarningCode, - "enableAllRules": cfg.EnableAllRules, + "confidence": cfg.Confidence, + "severity": cfg.Severity, + "errorCode": cfg.ErrorCode, + "warningCode": cfg.WarningCode, + "enableAllRules": cfg.EnableAllRules, + + // Should be managed with `linters.exclusions.generated`. + "ignoreGeneratedHeader": false, } rawDirectives := map[string]map[string]any{} diff --git a/pkg/golinters/revive/testdata/revive-fix.yml b/pkg/golinters/revive/testdata/revive-fix.yml index 0bdce293d714..22e9b9c00d39 100644 --- a/pkg/golinters/revive/testdata/revive-fix.yml +++ b/pkg/golinters/revive/testdata/revive-fix.yml @@ -2,7 +2,6 @@ version: "2" linters-settings: revive: - ignore-generated-header: true severity: warning rules: - name: errorf diff --git a/pkg/golinters/revive/testdata/revive.yml b/pkg/golinters/revive/testdata/revive.yml index 0a901a6396a3..df281780ac08 100644 --- a/pkg/golinters/revive/testdata/revive.yml +++ b/pkg/golinters/revive/testdata/revive.yml @@ -2,7 +2,6 @@ version: "2" linters-settings: revive: - ignore-generated-header: true severity: warning rules: - name: exported diff --git a/pkg/result/processors/base_rule.go b/pkg/result/processors/base_rule.go index 72dc202847d4..6fb15597096b 100644 --- a/pkg/result/processors/base_rule.go +++ b/pkg/result/processors/base_rule.go @@ -9,8 +9,6 @@ import ( "github.com/golangci/golangci-lint/pkg/result" ) -const caseInsensitivePrefix = "(?i)" - type baseRule struct { text *regexp.Regexp source *regexp.Regexp diff --git a/pkg/result/processors/severity.go b/pkg/result/processors/severity.go index 2dacf663874d..4c9a978b055b 100644 --- a/pkg/result/processors/severity.go +++ b/pkg/result/processors/severity.go @@ -36,13 +36,7 @@ func NewSeverity(log logutils.Log, files *fsutils.Files, cfg *config.Severity) * defaultSeverity: cfg.Default, } - prefix := caseInsensitivePrefix - if cfg.CaseSensitive { - prefix = "" - p.name = "severity-rules-case-sensitive" - } - - p.rules = parseRules(cfg.Rules, prefix, newSeverityRule) + p.rules = parseRules(cfg.Rules, "", newSeverityRule) return p } diff --git a/pkg/result/processors/severity_test.go b/pkg/result/processors/severity_test.go index 54bafdd16b5c..b5c36700c76e 100644 --- a/pkg/result/processors/severity_test.go +++ b/pkg/result/processors/severity_test.go @@ -278,7 +278,6 @@ func TestSeverity_caseSensitive(t *testing.T) { }, }, }, - CaseSensitive: true, } p := NewSeverity(nil, files, opts)