I have a project with a lot of code. Some of this code doesn't pass error-prone inspections turned on by default in Bazel. I want to disable error-prone in bazel. Is it possible to do it without adding a command line argument via the WORKSPACE file?
P.S. Disabling via command line works well
As Xiao Liang mentioned, you can add --javacopt="-XepDisableAllChecks"
to your bazelrc
, or you can also add it to tools/bazel.rc
inside your workspace so that it can be checked in with the source code. Note though that this will disable error prone for all java builds in the workspace. You can instead use java_binary.javacopts or java_library.javacopts to disable error prone for specific binaries or libraries, which would allow error prone to run on other parts of the build.