Total Newbie

37 views
Skip to first unread message

Eric Kolotyluk

unread,
Jan 16, 2023, 11:06:10 AM1/16/23
to error-prone-discuss
Hi, forgive me, I am a total newbie to error-prone...

Is there any easy way to verify that error-prone is actually configured correctly and working?

I have updated my Gradle configuration to use error-prone, as well as InelliJ, but there does not seem to be any way I can verify things are actually using error-prone. Building with either Gradle or IntelliJ does not show error-prone being invoked.

Any help would be greatly appreciated.

- Eric

Liam Miller-Cushon

unread,
Jan 16, 2023, 12:39:13 PM1/16/23
to error-pro...@googlegroups.com
Hi,

One way to confirm that it's configured would be to modify the sources in the project to introduce something that Error Prone would report a diagnostic for, e.g. if you add a statement like `new AssertionError();` and rebuild you should see a diagnostic from this check.

--
Googlers: This an external list. Please be careful when posting.
---
You received this message because you are subscribed to the Google Groups "error-prone-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to error-prone-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/error-prone-discuss/41fb812a-704f-4e50-80fb-2b3d32833bd3n%40googlegroups.com.

Eric Kolotyluk

unread,
Jan 16, 2023, 8:41:00 PM1/16/23
to 'Liam Miller-Cushon' via error-prone-discuss

Okay, that did the trick... thanks so much.

eric.kolotyluk@Y2RCV7009N loom-laboratory % ./gradlew clean lesson1:build
Running gradle version: 8.0-milestone-3

> Task :lesson1:compileJava FAILED
warning: using incubating module(s): jdk.incubator.concurrent
/Users/eric.kolotyluk/git/autonomous-iam/poc/loom-laboratory/lesson1/src/main/java/com/forgerock/poc/loom/Application.java:76: error: [DeadException] Exception created but not thrown
            new AssertionError();
            ^
    (see https://errorprone.info/bugpattern/DeadException)
  Did you mean 'throw new AssertionError();'?
1 error
1 warning

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':lesson1:compileJava'.
> Compilation failed; see the compiler error output for details.

Cheers, Eric

Reply all
Reply to author
Forward
0 new messages