@@ -269,7 +269,7 @@ func safeTomlSlice(r []any) []any {
269269}
270270
271271// This element is not exported by revive, so we need copy the code.
272- // Extracted from https://github.com/mgechev/revive/blob/v1.10 .0/config/config.go#L16
272+ // Extracted from https://github.com/mgechev/revive/blob/v1.11 .0/config/config.go#L166
273273var defaultRules = []lint.Rule {
274274 & rule.VarDeclarationsRule {},
275275 & rule.PackageCommentsRule {},
@@ -320,6 +320,7 @@ var allRules = append([]lint.Rule{
320320 & rule.EnforceMapStyleRule {},
321321 & rule.EnforceRepeatedArgTypeStyleRule {},
322322 & rule.EnforceSliceStyleRule {},
323+ & rule.EnforceSwitchStyleRule {},
323324 & rule.FileHeaderRule {},
324325 & rule.FileLengthLimitRule {},
325326 & rule.FilenameFormatRule {},
@@ -366,7 +367,7 @@ var allRules = append([]lint.Rule{
366367const defaultConfidence = 0.8
367368
368369// This element is not exported by revive, so we need copy the code.
369- // Extracted from https://github.com/mgechev/revive/blob/v1.5 .0/config/config.go#L183
370+ // Extracted from https://github.com/mgechev/revive/blob/v1.11 .0/config/config.go#L198
370371func normalizeConfig (cfg * lint.Config ) {
371372 // NOTE(ldez): this custom section for golangci-lint should be kept.
372373 // ---
@@ -408,7 +409,7 @@ func normalizeConfig(cfg *lint.Config) {
408409}
409410
410411// This element is not exported by revive, so we need copy the code.
411- // Extracted from https://github.com/mgechev/revive/blob/v1.5 .0/config/config.go#L252
412+ // Extracted from https://github.com/mgechev/revive/blob/v1.11 .0/config/config.go#L266
412413func defaultConfig () * lint.Config {
413414 defaultConfig := lint.Config {
414415 Confidence : defaultConfidence ,
@@ -454,7 +455,7 @@ func extractRulesName(rules []lint.Rule) []string {
454455 return names
455456}
456457
457- // Extracted from https://github.com/mgechev/revive/blob/v1.7 .0/formatter/severity.go
458+ // Extracted from https://github.com/mgechev/revive/blob/v1.11 .0/formatter/severity.go
458459// Modified to use pointers (related to hugeParam rule).
459460func severity (cfg * lint.Config , failure * lint.Failure ) lint.Severity {
460461 if cfg , ok := cfg .Rules [failure .RuleName ]; ok && cfg .Severity == lint .SeverityError {
0 commit comments