Sonarqube: Squid Rules customization/suppression -


I have spent a day migrating all PMD and checkstall rules to new squaw laws, as indicated by the PMD / checkstyle

However, some fine tuning options I've used with PMD / CS are not present in Squid.

As a result, Sonar is full of thousands of issues which do not tell anything about the real value.

Example 1

Rule: BadConstantName_S00115_Check / S00115

All of our enums are applied with the camelcase instead of CONSTANT_NAME, example:

  public enum classification {Purnimus (1), poor (2), porplus (3 ), Easy to read from Normal (4), Normal (5),   

:

  public enum classification {POOR_MINUS (1), poverty (2 ), POOR_PLUS (3),   

This is a Otherwise referred to when readability code is done (using constant imports)

Therefore, what I see is a way of suppressing this rule for enums, Because we want to keep the rules for the "real" constant.

Example 2

Rules: Legitimate amalgamation

After migrating this rule, the complexity report for all equality and hashcode methods. (Excluded CS rule was easy to suppress these methods)

It does not make any sense to measure the complexity of the eclipse (at least for us) which are automatically generated by eclipses / intelligences.

It is important to measure the complexity on the "Business Logic" part of the code

Here we actually want to suppress the rules of these / specific methods

example 3

Rules: Unspecified API

I want to make sure to have JavaScript (including class and methods) and class classes (not methods / fields) on javascript. As it is now, it is not possible. Again, I would like to disable checking of methods and fields

challenge

Do anyone know how to get rid of these kinds of suppression? I have seen the settings / exclusions on the Sonrakub, however, it seems very difficult or impossible to achieve with the exclusion settings

to make the rules even more flexible, what we really need It is to be able to make changes in the rules to prevent the investigation of certain types and methods, ideally it should be implemented as general facilities, which is easy It can be applied to the rules where it is understood.

For now, I have to disable these rules (and most likely other), because the configuration of the rules is not correct.

Where can I submit this as a feature request?

I have examined the source from Github, so currently looking at the problem of fixing programmatic issues on these issues. This is not a viable long term solution.

The scars are correct, these rules do not have any configuration. After internal discussion on sonar source, configuratons are not going to be added.

The best idea for your situation would be to apply custom rules in Java as discussed.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -