typetools / typetools/checker-framework

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

Open
#6,258 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked IntelliJ external-annotations documentation and the java/lang/annotations.xml example, then trace how the checker framework currently consumes stubs. Done means the sample annotation.xml format is accepted and its annotations are available to the checker, with coverage for the supported format.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.