[sonar-dev] LCOM4 for a language of yours; how do you achieve that and account for the future?

classic Classic list List threaded Threaded
4 messages Options
fge
Reply | Threaded
Open this post in threaded view
|

[sonar-dev] LCOM4 for a language of yours; how do you achieve that and account for the future?

fge
Hello,

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.

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 :/

Regards,
--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


fge
Reply | Threaded
Open this post in threaded view
|

[sonar-dev] Re: LCOM4 for a language of yours; how do you achieve that and account for the future?

fge
On Thu, Apr 2, 2015 at 1:27 PM, Francis Galiegue <[hidden email]> wrote:

> Hello,
>
> 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.
>
[etc etc]

So, any guidance?

Regards,
--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


fge
Reply | Threaded
Open this post in threaded view
|

[sonar-dev] Re: LCOM4 for a language of yours; how do you achieve that and account for the future?

fge
On Tue, Apr 7, 2015 at 3:13 PM, Francis Galiegue <[hidden email]> wrote:
[...]
>
> So, any guidance?
>

Ping?

Regards,
--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


fge
Reply | Threaded
Open this post in threaded view
|

[sonar-dev] Re: LCOM4 for a language of yours; how do you achieve that and account for the future?

fge
Hello,

On Thu, Apr 16, 2015 at 3:01 PM, Francis Galiegue <[hidden email]> wrote:
> On Tue, Apr 7, 2015 at 3:13 PM, Francis Galiegue <[hidden email]> wrote:
> [...]
>>
>> So, any guidance?
>>
>
> Ping?
>

I'd really like some guidance here... Looking at the source code of
existing language plugins is no help at all.

Regards,
--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email