You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Brian Hulette (Jira)" <ji...@apache.org> on 2021/12/14 17:44:00 UTC
[jira] [Commented] (BEAM-11936) Fix errorprone 2.3.4 ignored warnings
[ https://issues.apache.org/jira/browse/BEAM-11936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17459358#comment-17459358 ]
Brian Hulette commented on BEAM-11936:
--------------------------------------
As part of working on 2.10.0 upgrade for BEAM-13271, it was helpful to get a count of which warnings are raised the most throughout Beam. To do this I modified BeamModulePlugin.groovy by commenting out all the lines that disable errorprone checks (except for those that raise errors, like the Slf4j checks), then running the following commands
{code}
$ ./gradlew compileJava --no-build-cache --rerun-tasks &> /tmp/log
$ cat /tmp/log | grep 'warning:' | sed -E 's/^.*\[(\w+)\].*$/\1/' | sort | uniq -c | sort -n
{code}
The output of this after upgrading to errorprone 2.10.0 is:
{code}
1 AutoValueSubclassLeaked
1 EqualsUnsafeCast
1 UnsafeReflectiveConstructionCast
2 InlineFormatString
2 InvalidBlockTag
3 BigDecimalEquals
3 MalformedInlineTag
3 ProtectedMembersInFinalClass
3 UnnecessaryMethodReference
4 EscapedEntity
5 InvalidThrows
5 MutablePublicArray
6 EmptyCatch
6 InvalidParam
6 UnnecessaryLambda
8 InlineMeSuggester
8 InvalidInlineTag
9 ThreadPriorityCheck
14 MixedMutabilityReturnType
14 UnnecessaryParentheses
15 InvalidLink
18 BadImport
22 BadInstanceof
23 JavaUtilDate
28 UndefinedEquals
29 NonCanonicalType
33 JodaConstructors
39 UnrecognisedJavadocTag
47 UnescapedEntity
116 EmptyBlockTag
128 AutoValueImmutableFields
178 EqualsGetClass
204 MissingSummary
{code}
> Fix errorprone 2.3.4 ignored warnings
> -------------------------------------
>
> Key: BEAM-11936
> URL: https://issues.apache.org/jira/browse/BEAM-11936
> Project: Beam
> Issue Type: Task
> Components: build-system, runner-core, sdk-java-core, sdk-java-harness
> Reporter: Brian Hulette
> Priority: P3
> Time Spent: 62h 10m
> Remaining Estimate: 0h
>
> Upgrading to errorprone 2.3.4 (https://github.com/apache/beam/pull/14148) required ignoring a lot of new warnings. We should fix the offending code and re-enable these warnings.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)