commit | 9f4b7d090895de6fb528b7a2e5032232215e7018 | [log] [tgz] |
---|---|---|
author | Liam Miller-Cushon <cushon@google.com> | Tue Jul 23 18:20:46 2024 |
committer | Error Prone Team <error-prone-team+copybara@google.com> | Tue Jul 23 18:22:26 2024 |
tree | 7f0aabff8bdbf4182d6f203eb6ebd69ccc01e260 | |
parent | f97736d1859267ba9ef9e299c98a1ed0dda74e41 [diff] |
Disable implicit annotation processing in some tests Fixes ``` Note: Annotation processing is enabled because one or more processors were found on the class path. A future release of javac may disable annotation processing unless at least one processor is specified by name (-processor), or a search path is specified (--processor-path, --processor-module-path), or annotation processing is enabled explicitly (-proc:only, -proc:full). Use -Xlint:-options to suppress this message. Use -proc:none to disable annotation processing. ``` PiperOrigin-RevId: 655236694
Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time.
public class ShortSet { public static void main (String[] args) { Set<Short> s = new HashSet<>(); for (short i = 0; i < 100; i++) { s.add(i); s.remove(i - 1); } System.out.println(s.size()); } }
error: [CollectionIncompatibleType] Argument 'i - 1' should not be passed to this method; its type int is not compatible with its collection's type argument Short s.remove(i - 1); ^ (see https://errorprone.info/bugpattern/CollectionIncompatibleType) 1 error
Our documentation is at errorprone.info.
Error Prone works with Bazel, Maven, Ant, and Gradle. See our installation instructions for details.
Developing and building Error Prone is documented on the wiki.