@@ -269,7 +269,7 @@ func safeTomlSlice(r []any) []any {
269
269
}
270
270
271
271
// 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
273
273
var defaultRules = []lint.Rule {
274
274
& rule.VarDeclarationsRule {},
275
275
& rule.PackageCommentsRule {},
@@ -320,6 +320,7 @@ var allRules = append([]lint.Rule{
320
320
& rule.EnforceMapStyleRule {},
321
321
& rule.EnforceRepeatedArgTypeStyleRule {},
322
322
& rule.EnforceSliceStyleRule {},
323
+ & rule.EnforceSwitchStyleRule {},
323
324
& rule.FileHeaderRule {},
324
325
& rule.FileLengthLimitRule {},
325
326
& rule.FilenameFormatRule {},
@@ -366,7 +367,7 @@ var allRules = append([]lint.Rule{
366
367
const defaultConfidence = 0.8
367
368
368
369
// 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
370
371
func normalizeConfig (cfg * lint.Config ) {
371
372
// NOTE(ldez): this custom section for golangci-lint should be kept.
372
373
// ---
@@ -408,7 +409,7 @@ func normalizeConfig(cfg *lint.Config) {
408
409
}
409
410
410
411
// 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
412
413
func defaultConfig () * lint.Config {
413
414
defaultConfig := lint.Config {
414
415
Confidence : defaultConfidence ,
@@ -454,7 +455,7 @@ func extractRulesName(rules []lint.Rule) []string {
454
455
return names
455
456
}
456
457
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
458
459
// Modified to use pointers (related to hugeParam rule).
459
460
func severity (cfg * lint.Config , failure * lint.Failure ) lint.Severity {
460
461
if cfg , ok := cfg .Rules [failure .RuleName ]; ok && cfg .Severity == lint .SeverityError {
0 commit comments