Hi ,
I have custom plugin for Java(and other languages) that primarily deals with customizing cyclomatic complexity - by way of skipping switch cases.
The way to do that was to make changes to ComplexityVisitor class and skip CASE_LABEL nodes.
Since now with Sonarqube 5.6.3 - the primary way to write custom rules for a language plugin is by actually extending the language plugin -
as per this discussion, is there a way by which:
- I can access/override the ComplexityVisitor class from my custom rule plugin?
- Or would I have to make changes to the ComplexityVistitor class in the Java plugin and also have a custom rule plugin (Which is maintenance inconvenience)
Thanks,
Anand
P.S: I am aware of Cognitive Complexity and the work being done on that front, but I would still like to stick my aforementioned approach - as I have tooling that is already using it with older versions of SQ (4.5.6)