Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 1.23 KB

README.md

File metadata and controls

26 lines (22 loc) · 1.23 KB

checker-framework-idea

There is no dedicated Checker Framework plugin for IntelliJ IDEA (yet), but there is a plugin that provides LSP support for IDEA, LSP Support, which makes it possible to integrate the Checker Framework Language Server.

After installing LSP Support and downloading the Checker Framework Language Server and Checker Framework to your system, go to Preferences - Languages & Frameworks - Language Server Protocol - Server Definitions, then choose “Raw command”, and add the extension java. A sample command that will run the Nullness Checker is:

java \
    -cp /path/to/languageserver.jar:/path/to/checker-framework/checker/dist/checker.jar \
    org.checkerframework.languageserver.ServerMain \
    --frameworkPath /path/to/checker-framework \
    --checkers org.checkerframework.checker.nullness.NullnessChecker

After this, red squiggle lines will be drawn under errors detected by the Nullness Checker. For other options, please refer to the documentation of the language server.