javachecker-framework

checker framework, is there any way to silence/disable type.anno.before.modifier warning?


I thought I'd give checker framework a go, but I'm getting a lot of this

/Users/calebcushing/IdeaProjects/ppm/scaf/src/main/java/com/xenoterracide/scaf/Config.java:22: warning: [type.anno.before.modifier] write type annotation @NonNull() immediately before type, after modifiers [abstract]
  abstract Map<String, SkeletonConfiguration> getTemplates();

for this code

  @Nullable
  abstract String getWorkdir();

it seems to be suggestion that I should write

  abstract @Nullable String getWorkdir();

but that goes against the JLS, is there anyway to disable this?


Solution

    1. You said, "that goes against the JLS", but it does not. It's legal Java, and it is better style.

    2. The Checker Framework Manual describes how to suppress warnings, for example via the @SuppressWarning("type.anno.before.modifier") annotation or the -AsuppressWarnings=type.anno.before.modifier command-line argument.