checker-framework icon indicating copy to clipboard operation
checker-framework copied to clipboard

Feature Request: Support the use of jetbrains "external annotations" annotation.xml format for stubbing.

Open sir-maniac opened this issue 1 year ago • 2 comments

ItelliJ Idea keeps track of external annotations using a simple xml format and directory tree.

The documentation can be found here .

Examples of the format can be found here in the intellij community source code

For example, to stub java.lang.String: File: java/lang/annotations.xml

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <item name="java.lang.String java.lang.String intern()">
    <annotation name="org.checkerframework.checker.interning.qual.Interned" />
  </item>
</root>

The xml format is simple so it should be easy to implement.

This would make it easier to work with the Check Framework for IntelliJ users, as they can easily add the information through the IDE and pass the information to the checker. It is also easy to share with others, and can be distributed like a source jar.

This is likely more performant than stubs as well.

EDIT: wrong link to intellij repository

sir-maniac avatar Oct 23 '23 19:10 sir-maniac