@@ -20,10 +20,6 @@ import (
2020func TestThriftFieldIdsAreWithinAllowedRange (t * testing.T ) {
2121 const maxAllowedFieldID = 3329
2222
23- allowedExceptions := map [int ]bool {
24- 3353 : true ,
25- }
26-
2723 // Get the directory of this test file
2824 _ , filename , _ , ok := runtime .Caller (0 )
2925 if ! ok {
@@ -34,7 +30,7 @@ func TestThriftFieldIdsAreWithinAllowedRange(t *testing.T) {
3430 testDir := filepath .Dir (filename )
3531 cliServicePath := filepath .Join (testDir , "cli_service.go" )
3632
37- violations , err := validateThriftFieldIDs (cliServicePath , maxAllowedFieldID , allowedExceptions )
33+ violations , err := validateThriftFieldIDs (cliServicePath , maxAllowedFieldID )
3834 if err != nil {
3935 t .Fatalf ("Failed to validate thrift field IDs: %v" , err )
4036 }
@@ -55,9 +51,8 @@ func TestThriftFieldIdsAreWithinAllowedRange(t *testing.T) {
5551}
5652
5753// validateThriftFieldIDs parses the cli_service.go file and extracts all thrift field IDs
58- // to validate they are within the allowed range. Field IDs listed in allowedExceptions
59- // are permitted even if they exceed the maximum.
60- func validateThriftFieldIDs (filePath string , maxAllowedFieldID int , allowedExceptions map [int ]bool ) ([]string , error ) {
54+ // to validate they are within the allowed range.
55+ func validateThriftFieldIDs (filePath string , maxAllowedFieldID int ) ([]string , error ) {
6156 file , err := os .Open (filePath ) //nolint:gosec // G304: path is a test fixture, not user-controlled
6257 if err != nil {
6358 return nil , fmt .Errorf ("failed to open file %s: %w" , filePath , err )
@@ -89,7 +84,7 @@ func validateThriftFieldIDs(filePath string, maxAllowedFieldID int, allowedExcep
8984 continue
9085 }
9186
92- if fieldID >= maxAllowedFieldID && ! allowedExceptions [ fieldID ] {
87+ if fieldID >= maxAllowedFieldID {
9388 // Extract struct/field context from the line
9489 context := extractFieldContext (line )
9590 violation := fmt .Sprintf (
0 commit comments