sonar-openedge
sonar-openedge copied to clipboard
MethodHasTooManyParameters rule suppress issue directive
Hi,
The MethodHasTooManyParameters rule has no suppress issue preprocessor directive, at least in the documentation.
Thanks
It's {&_proparse_ prolint-nowarn(num_parameters)}
. Documentation will be updated.
Documentation updated.
Hello,
I reopen the issue because the suppress is not working for procedures, or maybe I did it incorrectly ?
I tried to add it at the very beginning of the file, at the beginning of the file just after the BLOCK-LEVEL..., just before the first parameter, just before the first "incorrect" parameter
PS : Our rule is modified and the limit is 14 parameters
Example:
{&_proparse_ prolint-nowarn(num_parameters)} /* Legacy code */
DEF INPUT PARAMETER PiMode AS I NO-UNDO.
DEF INPUT PARAMETER PiOrigine AS I NO-UNDO.
DEF INPUT PARAMETER PiDossier AS I NO-UNDO.
DEF INPUT PARAMETER PiDateArret AS DA NO-UNDO.
DEF INPUT PARAMETER Piseance AS I NO-UNDO.
DEF INPUT PARAMETER PiFrm AS C NO-UNDO.
DEF INPUT PARAMETER PiCide AS I NO-UNDO.
DEF INPUT PARAMETER Piparam1 AS I NO-UNDO.
DEF INPUT PARAMETER Piparam2 AS C NO-UNDO.
DEF INPUT PARAMETER Piparam3 AS C NO-UNDO.
DEF INPUT PARAMETER Piparam4 AS C NO-UNDO.
DEF INPUT PARAMETER Piparam5 AS C NO-UNDO.
DEF INPUT PARAMETER Piparam6 AS C NO-UNDO.
DEF INPUT PARAMETER Piparam7 AS C NO-UNDO.
DEF INPUT PARAMETER Piparam8 AS C NO-UNDO.
The preprocessor directive has to be before the PROCEDURE
statement
I meant the file procedure when the parameters are inside the .p file without PROCEDURE statement
Case doesn't seem to be handled correctly. I'll have a look and provide details. If a fix is needed, it will be included in 2.27 as 2.26 is already on its way to GitHub.
Fixed in develop. Preprocessor statement has to be before the first define parameter
statement.