How to implement "unused variable" warning?

Hi,

How does "unused variable" warning work in baseLanguage?

Or more generally, how can I add something similar to language which doesn't extend baseLanguage?

Thanks.

2 comments
Comment actions Permalink

It can be done using "non type system rule".

For example, like FieldIsNeverUsed in baseLanguage typesystem.

0
Comment actions Permalink

It depends.

To implement a simple "check" (e.g. reference existance), you use non-typesystem rules.

To use data flow analysis (actually unused variable), you need to integrate with our dataFlow aspect (see DataFlowManager class).


Regards,

Mihail

0

Please sign in to leave a comment.