Thanks @pynicolas and @Nicolas_Harraudeau for your inputs.
Yes, I do agree that our requirements are more specific as we have certain coding standards placed in application development and it should be strictly followed.
Reviewing the coding standards for each modules consume significant time for the master developers. Hence we are trying to automate those review process using sonarqube to validate the standards and raise issues if the standards are not met.
That is when we started thinking about the rule customisations. We have already developed and tested couple of custom rules using the java sonarqube plugin. But as @pynicolas mentioned it looks not an easy task for certain rules which we want to achieve in our application environment.
I hope it is worth here to share the challenges in one of the custom rule which we want to develop and get assistance from the community.
Our requirement is to scan and check if “All the variables declared in working storage section should be used at least once within procedure division and report issue if any unused variable declaration is found”.
But we get many false positives when COPYBOOKs are included in working storage section as it is not necessary to use all the copy variables in the procedure division. Hence we want to exclude the copybook variables from scan for this specific rule alone.
Any inputs to skip copybook variables from sonar scan for a specific rule would be much helpful.
P.S.: “NO SONAR” comment is not permissible/suggested practice in application code as per code development policy