typetools / typetools/checker-framework

Compiler Message Key Checker should use the Value Checker

Open
#1,337 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Rather than suppressing this warning:

        String msgKey = methodReference ? "methodref" : "override";

        @SuppressWarnings("CompilerMessages")
        /*@CompilerMessageKey*/ String postmsg =
                "contracts.postcondition." + msgKey + ".invalid";

The Message Key Checker should run the Value Checker. There are only two possible values for msgKey and if the Message Key Checker relies on Value Checker annotations, it should be able to determine that postmsg has type @CompilerMessageKey.

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 by locating the Message Key Checker and Value Checker implementations and tracing how annotations are currently consulted. Verify the two possible msgKey values in the reported example are recognized so postmsg is inferred as @CompilerMessageKey, then run the relevant checker tests or add coverage for this case.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.