eclipseannotationschecker-framework

CheckerFramework Eclipse, run checks on auto build


I have installed the CheckerFramework (2.3.2) plugin for Eclipse Oxygen (4.7.2).

I am able to manually run checkers on a file or project and get the warning/error messages from CheckerFramework. But this gives messages from both Eclipse analysis and CheckerFramework.

My main question is: How can I configure Eclipse/CheckerFramework to replace the built-in Eclipse analysis and automatically run CheckerFramework checkers when Eclipse auto re-compiles files on save etc.?

I have tried configuring:

Java -> Compiler -> Errors/Warninigs -> Null Analysis -> Enable annotation based null analysis -> Configure Annotations for Null Specifications

and specifying the annotation classes as

org.checkerframework.checker.nullness.qual.Nullable

but this is just for the annotations. Is this, or is there a way for CheckerFramework to take the place of the Eclipse annotations and code analysis?

Do I need to turn off Eclipse Java -> Compiler -> Errors/Warninigs options, I think I don't want a mix of two analyzers. I want CheckerFramework to replace the built-in Eclipse stuff.

To auto run CheckerFramework checks on re-build do I need to make a Project -> Properties -> Builders -> New Ant Builder run CheckerFramework from that? (I'd prefer not to but can if needed I guess).

I was hoping the CheckerFramework plugin would give me these options and not have me manually check after every save but I can't find how to do what I want in the documentation.


Solution

  • You are right that the Checker Framework Eclipse plugin does not run as an incremental project builder. And you are right that the plugin would be more useful if it did so.

    The plugin used to do so, but the Eclipse plugin interface is complex, fragile, and subject to change, so the Checker Framework developers decided it was not worth their time to continue supporting this functionality.

    I expect the developers would welcome a code contribution that re-enabled the functionality.