@@ -133,6 +133,7 @@ func (w *goCriticWrapper) buildEnabledCheckers(linterCtx *gocriticlinter.Context
133
133
if err != nil {
134
134
return nil , err
135
135
}
136
+
136
137
enabledCheckers = append (enabledCheckers , c )
137
138
}
138
139
@@ -294,6 +295,7 @@ func (s *settingsWrapper) InferEnabledChecks() {
294
295
s .debugChecksInitialState ()
295
296
296
297
enabledByDefaultChecks , disabledByDefaultChecks := s .buildEnabledAndDisabledByDefaultChecks ()
298
+
297
299
debugChecksListf (enabledByDefaultChecks , "Enabled by default" )
298
300
debugChecksListf (disabledByDefaultChecks , "Disabled by default" )
299
301
@@ -314,7 +316,7 @@ func (s *settingsWrapper) InferEnabledChecks() {
314
316
315
317
if len (s .EnabledTags ) != 0 {
316
318
enabledFromTags := s .expandTagsToChecks (s .EnabledTags )
317
- debugChecksListf (enabledFromTags , "Enabled by config tags %s" , sprintSortedStrings ( s .EnabledTags ) )
319
+ debugChecksListf (enabledFromTags , "Enabled by config tags %s" , s .EnabledTags )
318
320
319
321
for _ , check := range enabledFromTags {
320
322
enabledChecks [check ] = struct {}{}
@@ -335,7 +337,7 @@ func (s *settingsWrapper) InferEnabledChecks() {
335
337
336
338
if len (s .DisabledTags ) != 0 {
337
339
disabledFromTags := s .expandTagsToChecks (s .DisabledTags )
338
- debugChecksListf (disabledFromTags , "Disabled by config tags %s" , sprintSortedStrings ( s .DisabledTags ) )
340
+ debugChecksListf (disabledFromTags , "Disabled by config tags %s" , s .DisabledTags )
339
341
340
342
for _ , check := range disabledFromTags {
341
343
delete (enabledChecks , check )
@@ -549,10 +551,8 @@ func debugChecksListf(checks []string, format string, args ...any) {
549
551
return
550
552
}
551
553
552
- debugf ( "%s checks (%d): %s" , fmt . Sprintf ( format , args ... ), len ( checks ), sprintSortedStrings ( checks ) )
553
- }
554
+ v := slices . Clone ( checks )
555
+ slices . Sort ( v )
554
556
555
- func sprintSortedStrings (v []string ) string {
556
- sort .Strings (slices .Clone (v ))
557
- return fmt .Sprint (v )
557
+ debugf ("%s checks (%d): %s" , fmt .Sprintf (format , args ... ), len (checks ), strings .Join (v , ", " ))
558
558
}
0 commit comments