Disable error prone in bazel

拜拜、爱过 提交于 2019-12-12 18:43:08

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/47934782/disable-error-prone-in-bazel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!