Closed
Conversation
Exclude ES_COMPARING_PARAMETER_STRING_WITH_EQ FindBugs warnings from StringUtils methods compare(String, String, boolean) and compareIgnoreCase(String, String, boolean). The usages of the == operator seem to be intentional optimizations similar to the usage in indexOfDifference. If this reasoning is ever overruled, this suppression should be removed.
FastDateParser#simpleQuote uses a switch case that actually has a default branch in it, but doesn't use break statements. SF_SWITCH_NO_DEFAULT unfortunately cannot recognize this pattern, and leave us with no choice but to suppress it.
FastDatePrinter#appendFullDigits uses a switch statement that intentionally falls through the cases. This patch adds a FindBugs suppression for it.
FastDatePrinter#appendFullDigits uses a switch case without break statements. SF_SWITCH_NO_DEFAULT unfortunately cannot recognize this pattern, and leave us with no choice but to suppress it.
This patch copies the FindBugs configuration in pom.xml from the reporting section to the build section so findbugs can be used as part of the build process (by using the maven goal findbugs:check). It then adds this goal to the Travis CI build so that FindBugs becomes part of the CI, and new patches would be prevented from introducing new FindBugs errors.
Contributor
|
Thanks! 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds FindBugs to Travis CI so it can be used to automatically evaluate new patches instead of having to do so retroactively.
It contains a series of patches that either fix existing FindBugs errors or excludes them (either because the violation is intentional or because FindBugs cannot properly assess the code) - individual commit messages explain individual decisions.
At the end of that series of patches is a patch that adds the
findbugs:checkgoal to Travis CI, so it would now be applied on any new PR.