cushon | 58dc6b9 | 2017-07-06 17:04:27 -0400 | [diff] [blame] | 1 | --- |
| 2 | layout: posts |
| 3 | title: Checking your Java errors with Error Prone. |
| 4 | --- |
| 5 | |
Googler | 24e1409 | 2018-05-04 16:06:27 -0700 | [diff] [blame] | 6 | We recently open-sourced our support for [Error Prone](https://errorprone.info). |
| 7 | [Error Prone](https://errorprone.info) checks for common mistakes in Java code |
cushon | 58dc6b9 | 2017-07-06 17:04:27 -0400 | [diff] [blame] | 8 | that will not be caught by the compiler. |
| 9 | |
Googler | 24e1409 | 2018-05-04 16:06:27 -0700 | [diff] [blame] | 10 | We turned [Error Prone](https://errorprone.info) on by default but you can easily |
cushon | 58dc6b9 | 2017-07-06 17:04:27 -0400 | [diff] [blame] | 11 | turn it off by using the Javac option `-XepDisableAllChecks`. To do so, simply |
| 12 | specify `--javacopt='XepDisableAllChecks` to the list of Bazel's options. You |
| 13 | can also tune the checks error-prone will perform by using the [`-Xep:` |
Googler | 24e1409 | 2018-05-04 16:06:27 -0700 | [diff] [blame] | 14 | flags](https://errorprone.info/docs/flags). |
cushon | 58dc6b9 | 2017-07-06 17:04:27 -0400 | [diff] [blame] | 15 | |
Googler | 24e1409 | 2018-05-04 16:06:27 -0700 | [diff] [blame] | 16 | See the [documentation of Error Prone](https://errorprone.info/docs/installation) for more |
cushon | 58dc6b9 | 2017-07-06 17:04:27 -0400 | [diff] [blame] | 17 | on Error Prone. |