Better Identification of function parameters on separate lines to prevent duplicate code blocks

A feature request that I have not found yet is “better identification of function parameters on separate lines to prevent duplicate line/block detection”

I am running the following versions of SonarQube:

  • SonarQube Version: 8.4.1 Enterprise
  • SonarGO Version: 1.6

Variable 1 (Something) and variable 2 (somethingElse) are calling different functions, but both functions have the same parameters. It is the coding standard for our development team to separate each input parameter on its own line for readability.

The example below, Lines 2-4 and 6-8 are marked as duplicates even though they are part of different function calls.

something := conn.GetRow(user.Context(),
somethingElse := conn.GetNotaRow(user.Context(),
    who.Location) ```

Hello @jimgaspari,

The duplication detection for golang only relies on tokens, spread across a number of lines of code. By default, it is 100 tokens and 10 lines of code, the code you provided does not respect those conditions.
That being said, you can modify these values (did you?), but still, I’m surprised to see that 3 lines and about ten tokens triggers a duplication.

Am I missing something?