Skip to content

Commit

Permalink
exclude "by design" warnings from reports
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Sep 16, 2021
1 parent d96c5c9 commit 2972e00
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .lgtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ path_classifiers:
- "license.html"
- "readme.html"

#########################################################################################
# Use the `queries` block to change the default display of query results. #
#########################################################################################

queries:
- include: "*"
# "by design" - synch is being removed intentionally
- exclude: java/non-sync-override

extraction:
java:
index:
Expand Down
79 changes: 79 additions & 0 deletions src/main/resources/spotbugs-exclude-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,83 @@
-->

<FindBugsFilter>

<!-- Cloneable warnings -->
<Match>
<Or>
<!-- clones by constructor -->
<Class name="org.eclipse.persistence.descriptors.PessimisticLockingPolicy"/>
<Class name="org.eclipse.persistence.internal.helper.NonSynchronizedProperties"/>
<Class name="org.eclipse.persistence.internal.helper.NonSynchronizedVector"/>
<Class name="org.eclipse.persistence.internal.jpa.CMP3Policy"/>
<Class name="org.eclipse.persistence.internal.oxm.XMLUnmarshaller"/>
<Class name="org.eclipse.persistence.internal.sessions.EmptyRecord"/>
<Class name="org.eclipse.persistence.oxm.XMLMarshaller"/>
<Class name="org.eclipse.persistence.oxm.XMLUnmarshaller"/>
<Class name="org.eclipse.persistence.sdo.helper.ListWrapper"/>
<Class name="org.eclipse.persistence.sessions.interceptors.CacheKeyInterceptor"/>
<!-- optimized cloning -->
<Class name="org.eclipse.persistence.core.queries.CoreAttributeGroup"/>
</Or>
<Bug pattern="CN_IDIOM_NO_SUPER_CALL"/>
</Match>

<Match>
<Or>
<!-- clones by constructor -->
<Class name="org.eclipse.persistence.internal.jpa.metadata.mappings.AccessMethodsMetadata"/>
</Or>
<Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE"/>
</Match>
<!-- End of Cloneable warnings -->


<!--
JPQL (Hermes) Parser "by design" warnings
-->
<Match>
<Package name="~org.eclipse.persistence.jpa.jpql.*" />
<Bug pattern="ES_COMPARING_STRINGS_WITH_EQ"/>
</Match>

<Match>
<!-- defined in javadoc -->
<Class name="org.eclipse.persistence.jpa.jpql.WordParser"/>
<Method name="startsWithDigit"/>
<Bug pattern="NP_BOOLEAN_RETURN_NULL"/>
</Match>

<Match>
<!-- works with WordParser.startsWithDigit -->
<Class name="org.eclipse.persistence.jpa.jpql.parser.ArithmeticExpressionFactory"/>
<Method name="buildExpression"/>
<Bug pattern="RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN"/>
</Match>

<Match>
<!-- defined in javadoc -->
<Class name="org.eclipse.persistence.jpa.jpql.AbstractSemanticValidator"/>
<Method name="validateThirdPartyStateFieldPathExpression"/>
<Bug pattern="NP_BOOLEAN_RETURN_NULL"/>
</Match>

<Match>
<Class name="org.eclipse.persistence.jpa.jpql.tools.AbstractContentAssistVisitor"/>
<Method name="isCompoundFunction"/>
<Bug pattern="ES_COMPARING_PARAMETER_STRING_WITH_EQ"/>
</Match>

<Match>
<Class name="org.eclipse.persistence.jpa.jpql.tools.resolver.DeclarationResolver"/>
<Method name="isCollectionIdentificationVariableImp"/>
<Or>
<!-- false positive: case statement does not contain 'break;' -->
<Bug pattern="SF_SWITCH_NO_DEFAULT"/>
<!-- check for return value from the method
which can be overwridden in a subclass -->
<Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE"/>
</Or>
</Match>
<!-- End of JPQL (Hermes) Parser warnings -->

</FindBugsFilter>

0 comments on commit 2972e00

Please sign in to comment.