upgrade to guava 20 cause bunch of violations in code by IntelijIdea
See original GitHub issuehere is example of how our project tried to upgrade to guava 20 from 19 (simple version bump) - https://github.com/checkstyle/checkstyle/pull/3527.
it result in violations by IntelijIdea: https://teamcity.jetbrains.com/viewLog.html?buildId=917921&tab=Inspection&buildTypeId=Checkstyle_IdeaInspectionsPullRequest
All is that only due to commit: https://github.com/google/guava/commit/f6da31136af15dd324d56d253bc17c5b9afe9759#diff-7ed40f507101a8625df970c98abcbc55
It is used jdk class javax.annotation.CheckReturnValue
to trigger validation and google custom class com.google.errorprone.annotations.CanIgnoreReturnValue
to suppress violation.
yes it works for google, but now for others. I think it is not accurate to use different markers for triggering and suppressions. If you want to use errorprones’s CanIgnoreReturnValue
please use smth like com.google.errorprone.annotations.CheckReturnValue
(non existing class).
but usage of jdk marker/annotation trigger validation process of other tools. Extra dependencies are also not desirable.
It would be better to use CheckReturnValue
on certain methods as show at - http://errorprone.info/bugpattern/CheckReturnValue.
or to use some friendly(common for all) approaches that other tools can use and ignore that methods.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
You are quite demanding for someone who is using great software free of charge. 😃
@michaelhixson , thank you ! I had big doubts that they consider such update, so came to guava team first.
I think we can close the issue and just wait for IntelijIdea 2016.3 release.