It happens that a pontential check I'll have to do in the future is to
program a check (a SquidCheck? An AstNodeVisitor?) for that.
Now, my language plugin makes use of basically what is
sonar-sslr-grappa (which I extracted from this package) so:
* I use a LexerfulGrammarBuilder, and
* my terminals are TokenTypes,
* which are produced by a (grappa) parser.
With the current infrastructure I have now, i could program a
SquidCheck visiting the class as a whole, then (painfully...)
extracting the nodes I want etc...
That doesn't look very practical, because if ever I have other checks
to make in the same vein I'll have to do that all over again.
What is the suggested plan here? It looks like I need to produce
"semantics over semantics", that is, a POJO for a whole source file
over the AST; or even "worse", a POJO for a whole project over the
AST, should I need to do "cross class checks", or even metrics.
Given the above, how can I achieve that? I see that the Java language
plugin has such checks but I just can't navigate its code to see how
it does that, and what is more it use a LexerlessGrammarBuilder, not a
Lexerful one :/
[sonar-dev] Re: LCOM4 for a language of yours; how do you achieve that and account for the future?
On Thu, Apr 2, 2015 at 1:27 PM, Francis Galiegue <[hidden email]> wrote:
> So, I think you already know about this but just for the sake of it,
> here is an URL about it:
> http://www.aivosto.com/project/help/pm-oo-cohesion.html >
> (search for LCOM4)
> It happens that a pontential check I'll have to do in the future is to
> program a check (a SquidCheck? An AstNodeVisitor?) for that.