@@ -395,15 +395,6 @@ func TestFilterEnabledPatterns(t *testing.T) {
395395 assert .Equal (t , "max-line-length" , enabledPatterns [0 ].Parameters [0 ].Name )
396396 assert .Equal (t , "145" , enabledPatterns [0 ].Parameters [0 ].Value )
397397
398- groupedParams := pylint .GroupParametersBySection (enabledPatterns )
399-
400- // Get and log the keys
401- keys := make ([]string , 0 , len (groupedParams ))
402- for k := range groupedParams {
403- keys = append (keys , k )
404- }
405- t .Logf ("Grouped Parameters Keys: %v" , keys )
406- t .Logf ("Grouped Parameters: %+v" , groupedParams )
407398}
408399
409400func TestGeneratePylintRC (t * testing.T ) {
@@ -419,7 +410,6 @@ func TestGeneratePylintRC(t *testing.T) {
419410
420411 // Finally generate the pylintrc content
421412 rcContentNonEmptyParameters := pylint .GeneratePylintRC (enabledPatterns )
422- t .Logf ("Generated pylintrc content:\n %s" , rcContentNonEmptyParameters )
423413
424414 // Verify the pylintrc content matches the expected format
425415 expectedContent := `[MASTER]
@@ -445,6 +435,7 @@ inlinevar-rgx=[A-Za-z0-9_]*$
445435method-rgx=[a-z_][a-z0-9_]{2,30}$
446436module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
447437variable-rgx=[a-z_][a-z0-9_]{2,30}$
438+
448439`
449440 assert .Equal (t , expectedContent , rcContentNonEmptyParameters )
450441
@@ -457,7 +448,6 @@ variable-rgx=[a-z_][a-z0-9_]{2,30}$
457448 },
458449 }
459450 rcContentEmptyParameters := pylint .GeneratePylintRC (emptyPatterns )
460- t .Logf ("Generated pylintrc content:\n %s" , rcContentEmptyParameters )
461451 assert .Contains (t , rcContentEmptyParameters , "enable=C0209" ) // Single line with all enabled patterns
462452 assert .NotContains (t , rcContentEmptyParameters , "max-line-length" ) // Should not include any parameters
463453}
@@ -475,24 +465,23 @@ func TestComplexPatternSet(t *testing.T) {
475465 // Generate pylintrc content
476466 rcContent := pylint .GeneratePylintRC (enabledPatterns )
477467
478- // Print the generated content
479468 t .Logf ("Generated pylintrc content:\n %s" , rcContent )
480469
481470 // Verify all enabled patterns are present in a single line
482471 expectedEnableLine := "enable=C0301,C0209,R0903,C0111,R0904,R0912,R0916,C0103,C0114,C0117,C0302,C0303,C0304,C0305,C0306"
483472 assert .Contains (t , rcContent , expectedEnableLine )
484473
485474 // Verify parameters for patterns with user-defined values
486- assert .Contains (t , rcContent , "max-line-length=145" ) // C0301
487- assert .Contains (t , rcContent , "max-doc-length=80" ) // C0111
488- assert .Contains (t , rcContent , "max-branches=15" ) // R0912
489- assert .Contains (t , rcContent , "method-naming-style=snake_case" ) // C0103
490- assert .Contains (t , rcContent , "docstring-min-length=20" ) // C0114
491- assert .Contains (t , rcContent , "max-module-lines=2000" ) // C0302
475+ assert .Contains (t , rcContent , "max-line-length=145" ) // C0301
476+ assert .NotContains (t , rcContent , "max-doc-length=80" ) //C0111- should not be there since it's not mapped to any section
477+ assert .Contains (t , rcContent , "max-branches=15" ) // R0912
478+ assert .NotContains (t , rcContent , "method-naming-style=snake_case" ) // C0103- should not be there since it's not mapped to any section
479+ assert .Contains (t , rcContent , "docstring-min-length=20" ) // C0114
480+ assert .Contains (t , rcContent , "max-module-lines=2000" ) // C0302
492481
493482 // Verify parameters for patterns with only default values
494- assert .Contains (t , rcContent , "max-args=5" ) // R0903
495- assert .Contains (t , rcContent , "trailing-whitespace=0" ) // C0303
483+ assert .Contains (t , rcContent , "max-args=5" ) // R0903
484+ assert .NotContains (t , rcContent , "trailing-whitespace=0" ) // C0303- should not be there since it's not mapped to any section
496485
497486 // Verify patterns without parameters don't have any parameter settings
498487 assert .NotContains (t , rcContent , "C0209=" )
0 commit comments