[CALCITE-2269] Add Error Prone code style verification#2182
Merged
vlsi merged 35 commits intoapache:masterfrom Oct 6, 2020
Merged
[CALCITE-2269] Add Error Prone code style verification#2182vlsi merged 35 commits intoapache:masterfrom
vlsi merged 35 commits intoapache:masterfrom
Conversation
2cb52e5 to
84195a7
Compare
6209289 to
25a3049
Compare
Contributor
Author
|
Just in case, I've created #2185 that excludes |
ceefbb7 to
7627eae
Compare
See https://errorprone.info/ It allows to capture errors like mising switch case branches, missing override, non-static inner class, etc The verification can be run locally via ./gradlew -PenableErrorprone classes Note: Java 11+ is required
Type type field hides the same field in the superclass. For now the warning is suppressed to avoid making incompatible changes. see https://errorprone.info/bugpattern/HidingField
Note: the changes are mechanical. The intention is to keep the previous behavior and prevent adding new non exchaustive switch statements in the future. See https://errorprone.info/bugpattern/MissingCasesInEnumSwitch
SortedSet was replaced by NavigableSet in Java 6. See https://errorprone.info/bugpattern/JdkObsolete
@beta APIs should not be used in library code as they are subject to change See https://github.com/google/guava/wiki/PhilosophyExplained#beta-apis
It is very rare for LinkedList to out-perform ArrayList or ArrayDeque See https://errorprone.info/bugpattern/JdkObsolete
…in converters The new code should not use java.util.Date class, however, converter classes can't avoid it.
It should be replaced with Deque
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.
See https://errorprone.info/
It allows to capture errors like mising switch case branches,
missing override, non-static inner class, etc