Closed jakhog closed 7 years ago
Not that you can use @SuppressWarnings annotation on configuration to disable specific checks. I can probably allow this annotation on functions, states, etc. I will go for @SuppressWarnings rather than something exotic as you propose as it is e.g. the annotation used by Java
e.g. use @SuppressWarnings "Call" on function
Also, feel free to add filters in the existing rules using somethings like if (!AnnotatedElementHelper.isDefined(f, "SuppressWarnings", "Call")) {...
It would be nice if it was possible to disable specific warnings and notices from the compiler, where "unconventional" behaviour is intentional and known by the developer. In the current situation, the compiler spits out a lot of warnings and notices that is irrelevant, and potentially hides imporant messages. Three specific examples come to mind:
Functions that are never called from ThingML code, but is called from native code. E.g. the following code
leads to the following error
[WARNING] ThingML: Function catch_sigint of Thing ExitHandler is never called. (in catch_sigint)
I suggest an annotation that could disable this warning for this very specific function. Something like:
[NOTICE] ThingML: Sink state Waiting in Thing ExitHandler. (in Waiting)
I suggest the following annotation to hide this notice: