Skip to content

[CALCITE-2269] Add Error Prone code style verification#2182

Merged
vlsi merged 35 commits intoapache:masterfrom
vlsi:errorprone
Oct 6, 2020
Merged

[CALCITE-2269] Add Error Prone code style verification#2182
vlsi merged 35 commits intoapache:masterfrom
vlsi:errorprone

Conversation

@vlsi
Copy link
Copy Markdown
Contributor

@vlsi vlsi commented Sep 29, 2020

See https://errorprone.info/

It allows to capture errors like mising switch case branches,
missing override, non-static inner class, etc

@vlsi vlsi force-pushed the errorprone branch 3 times, most recently from 2cb52e5 to 84195a7 Compare September 30, 2020 08:10
@vlsi vlsi added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Sep 30, 2020
@vlsi vlsi force-pushed the errorprone branch 10 times, most recently from 6209289 to 25a3049 Compare September 30, 2020 16:08
@vlsi
Copy link
Copy Markdown
Contributor Author

vlsi commented Sep 30, 2020

Just in case, I've created #2185 that excludes @Override changes, so the diff is easier to see in GitHub in "all changes at once" mode.

@vlsi vlsi force-pushed the errorprone branch 3 times, most recently from ceefbb7 to 7627eae Compare October 6, 2020 20:51
vlsi added 10 commits October 7, 2020 00:42
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
vlsi added 25 commits October 7, 2020 00:43
…in converters

The new code should not use java.util.Date class, however,
converter classes can't avoid it.
@vlsi vlsi merged commit 1552765 into apache:master Oct 6, 2020
@vlsi vlsi deleted the errorprone branch October 10, 2020 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants