Description of the problem / feature request:
Built-in error-prone cannot generate a patch to fix the problem it had found.
Feature requests: what underlying problem are you trying to solve with this feature?
Correct errors found by error-prone easier
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
$ cat > BUILD << EOF
java_binary(
name="main",
srcs=["Main.java"],
main_class='com.example.Main'
)
EOF
$ cat > Main.java << EOF
package com.example;
public class Main {
public static void main(String[] args) {
new Exception();
}
}
EOF
$ touch WORKSPACE
$ bazel build --javacopt="-XepPatchChecks:DeadException -XepPatchLocation:`pwd`" //:main
INFO: Analysed target //:main (1 packages loaded).
INFO: Found 1 target...
ERROR: /Users/vmax/work/AppStory/tmptmp/BUILD:1:1: Building main.jar (1 source file) failed (Exit 1)
Main.java:5: error: [DeadException] Exception created but not thrown
new Exception();
^
(see http://errorprone.info/bugpattern/DeadException)
Did you mean 'throw new Exception();'?
Target //:main failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.265s, Critical Path: 0.08s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
$ ls -1 | grep -v bazel-
BUILD
Main.java
WORKSPACE
# I expect `error-prone.patch` to be there
What operating system are you running Bazel on?
macOS High Sierra 10.13.6
What's the output of bazel info release?
release 0.14.1
Description of the problem / feature request:
Built-in
error-pronecannot generate a patch to fix the problem it had found.Feature requests: what underlying problem are you trying to solve with this feature?
Correct errors found by
error-proneeasierBugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What operating system are you running Bazel on?
macOS High Sierra 10.13.6What's the output of
bazel info release?release 0.14.1