Minor: Address Error prone warnings#749
Merged
regisd merged 21 commits intojflex-de:masterfrom Mar 28, 2020
Merged
Conversation
```
jflex/src/main/java/jflex/generator/Emitter.java:1173: error: [UnnecessaryParentheses] Unnecessary use of grouping parentheses
println(" case " + (++last) + ": break;");
^
(see https://errorprone.info/bugpattern/UnnecessaryParentheses)
Did you mean 'println(" case " + ++last + ": break;");'?
```
Nothing to fix
Bump DefaultCharset to error https://errorprone.info/bugpattern/DefaultCharset LexScan was already fixed in jflex-de#470
Follow-up of jflex-de#734
Suppress warnings on WIP ucd_generator https://errorprone.info/bugpattern/Unused
Fix violations when possible SuppressWarnings otherwise
it's quite controversial and there are tons of violations. https://errorprone.info/bugpattern/Var
Do not use C-style array declaration.
regisd
pushed a commit
that referenced
this pull request
Mar 28, 2020
commit 48787cf Author: Régis Décamps <regisd@google.com> AuthorDate: Sat Mar 28 21:50:42 2020 +0100 Commit: GitHub <noreply@github.com> CommitDate: Sat Mar 28 21:50:42 2020 +0100 Minor: Address Error prone warnings (#749) * Exclude all generated code from error-prone. * Remove cup from the XepExcludedPaths Follow-up of #734 * Make fields final. https://errorprone.info/bugpattern/FieldCanBeFinal * Remove reference equality https://errorprone.info/bugpattern/ReferenceEquality * Keep UnnecessaryParentheses disabled ``` jflex/src/main/java/jflex/generator/Emitter.java:1173: error: [UnnecessaryParentheses] Unnecessary use of grouping parentheses println(" case " + (++last) + ": break;"); ^ (see https://errorprone.info/bugpattern/UnnecessaryParentheses) Did you mean 'println(" case " + ++last + ": break;");'? ``` https://errorprone.info/bugpattern/UnnecessaryParentheses * Reenable CatchAndPrintStackTrace Nothing to fix * Fix DefaultCharset Also Replace guava Charsets by java StandardCharsets https://errorprone.info/bugpattern/DefaultCharset LexScan was already fixed in #470 * Fix ConstructorInvokesOverridable make methods final. https://errorprone.info/bugpattern/ConstructorInvokesOverridable SuppressWarnings for OptionsDialog.java * Add default case to switch statements https://errorprone.info/bugpattern/MissingDefault * Enable Unused at ERROR Suppress warnings on WIP ucd_generator https://errorprone.info/bugpattern/Unused * Enable UnusedException as ERROR Fix violations when possible SuppressWarnings otherwise https://errorprone.info/bugpattern/UnusedException * Keep Var OFF it's quite controversial and there are tons of violations. https://errorprone.info/bugpattern/Var * Fix MixedArrayDimensions Rewrite C-style array declaration. https://errorprone.info/bugpattern/MixedArrayDimensions * Fix MethodCanBeStatic https://errorprone.info/bugpattern/MixedArrayDimensions * Fix WildcardImport List imports explicitly https://errorprone.info/bugpattern/WildcardImport Updated from target/jflex-parent-1.9.0-SNAPSHOT-sources.jar
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.
Generated code has been excluded from error-prone
These have been fixed and raised to ERROR
These have been tried and intentionally left OFF