Go : "Functions should not have too many parameters" works on Methods

Hi.
I am using SonarQube 8.1
Go rule Functions should not have too many parameters
When I use this rule, it works on methods and produce an unexpected error.
With a maximum number of 5 parameters:

func (l *HighQualityDataMonitorLogic) GetMediaNoSame(ctx context.Context,
record *offline_data.MediaRightsHighquaPubdataShow, mediaHighRightsIDs map[int64]map[int64]int, moreType string, intMediaID int64) {…}

ERROR: This function has 6 parameters, which is greater than the 5 authorized.
Is that a false alarm?

Hello @Yerik17170 and welcome to the community!

You’re right this is a false positive, thank you for your feedback!
I’ve created a ticket to fix it: SONARSLANG-528

Have a nice day,
Amélie

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.