-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider supporting JSR 305 annotations #44
Comments
Original comment posted by eaftan@google.com on 2013-02-11 at 09:33 PM We added a check for @CheckReturnValue. Consider adding support for this subset: Status: Accepted |
See also vaguely related #891, which proposes opening up null related annotations. |
FYI, there's an Error Prone plugin, NullAway, that covers the stuff I most care about ( https://github.com/uber/NullAway/wiki/Error-Messages It's a bit of a hassle to hook it up with Bazel; I have a sample repository here that shows how to do it. https://github.com/dfabulich/bazel-checker-framework-bug/ WORKSPACE: maven_jar(
name='jsr305',
artifact='com.google.code.findbugs:jsr305:3.0.2',
)
maven_jar(
name="nullaway",
artifact="com.uber.nullaway:nullaway:0.3.2"
)
maven_jar(
name="guava",
artifact="com.google.guava:guava:22.0",
) BUILD: java_library(
name='x',
srcs=['X.java'],
deps=['@jsr305//jar'],
plugins=['nullaway'],
javacopts=[
'-Xep:NullAway:ERROR',
'-XepOpt:NullAway:AnnotatedPackages=com.example',
],
)
java_plugin(
name='nullaway',
deps=[
'@nullaway//jar',
'@guava//jar',
],
)
|
Another alternative is the Checker Framework, if you want an exhaustive null-checking type system. (AFAIK, NullAway only checks certain common cases with regards to incorrect |
Original issue created by aftandilian on 2012-09-20 at 05:44 PM
JSR 305 is abandoned but proposes several new annotations to help static analysis tools. Presumably anyone using these annotations would like to have a tool check for correctness. FindBugs and IntelliJ already do this.
http://jsr-305.googlecode.com/svn/trunk/javadoc/javax/annotation/package-summary.html
The text was updated successfully, but these errors were encountered: