Java – How do I make error-prone source code ignored?

How do I make error-prone source code ignored?… here is a solution to the problem.

How do I make error-prone source code ignored?

I recently discovered Error Prone and use > Gradle plugin integrated it into my Android build linked on their page.

Since our project uses Icepick (and some other code generation comment processors), we’ve generated the source code, and it’s compiled into it. Unfortunately, some of the generated code triggers a warning in Error Prone and I want to filter the sound that is somehow emitted.

The generated code is displayed in the app/build/generated/source/apt/debug directory. How can I save this code from Error Prone Iron Eyes?

Solution

Use the flag -XepDisableWarningsInGeneratedCode

Check out this issue on GitHub

Related Problems and Solutions