mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Merge branch 'main' into 2027
This commit is contained in:
@@ -6,8 +6,14 @@
|
||||
|
||||
<description>PMD Ruleset for WPILib</description>
|
||||
|
||||
<exclude-pattern>.*/*JNI.*</exclude-pattern>
|
||||
<!-- Generated files -->
|
||||
<exclude-pattern>.*/*EntryImpl\.java</exclude-pattern>
|
||||
<exclude-pattern>.*/*Subscriber\.java</exclude-pattern>
|
||||
<exclude-pattern>.*/Timestamped.*\.java</exclude-pattern>
|
||||
<exclude-pattern>.*/units/measure/.*\.java</exclude-pattern>
|
||||
|
||||
<exclude-pattern>.*/*IntegrationTests.*</exclude-pattern>
|
||||
<exclude-pattern>.*/*JNI.*</exclude-pattern>
|
||||
<exclude-pattern>.*/math/proto.*</exclude-pattern>
|
||||
|
||||
<rule ref="category/java/bestpractices.xml">
|
||||
@@ -18,18 +24,19 @@
|
||||
<exclude name="AvoidReassigningParameters" />
|
||||
<exclude name="AvoidUsingHardCodedIP" />
|
||||
<exclude name="ConstantsInInterface" />
|
||||
<exclude name="JUnitAssertionsShouldIncludeMessage" />
|
||||
<exclude name="JUnitTestContainsTooManyAsserts" />
|
||||
<exclude name="JUnitTestsShouldIncludeAssert" />
|
||||
<exclude name="JUnit4TestShouldUseAfterAnnotation" />
|
||||
<exclude name="JUnit4TestShouldUseBeforeAnnotation" />
|
||||
<exclude name="JUnit4TestShouldUseTestAnnotation" />
|
||||
<exclude name="ExhaustiveSwitchHasDefault" />
|
||||
<exclude name="LooseCoupling" />
|
||||
<exclude name="NonExhaustiveSwitch" />
|
||||
<exclude name="PreserveStackTrace" />
|
||||
<exclude name="ReplaceHashtableWithMap" />
|
||||
<exclude name="ReplaceVectorWithList" />
|
||||
<exclude name="SwitchStmtsShouldHaveDefault" />
|
||||
<exclude name="SystemPrintln" />
|
||||
<exclude name="UnitTestAssertionsShouldIncludeMessage" />
|
||||
<exclude name="UnitTestContainsTooManyAsserts" />
|
||||
<exclude name="UnitTestShouldIncludeAssert" />
|
||||
<exclude name="UnitTestShouldUseAfterAnnotation" />
|
||||
<exclude name="UnitTestShouldUseBeforeAnnotation" />
|
||||
<exclude name="UnitTestShouldUseTestAnnotation" />
|
||||
<exclude name="UseVarargs" />
|
||||
</rule>
|
||||
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod">
|
||||
@@ -45,8 +52,8 @@
|
||||
</rule>
|
||||
|
||||
<rule ref="category/java/design.xml">
|
||||
<exclude name="AvoidThrowingRawExceptionTypes" />
|
||||
<exclude name="AvoidThrowingNewInstanceOfSameException" />
|
||||
<exclude name="AvoidThrowingRawExceptionTypes" />
|
||||
<exclude name="CognitiveComplexity" />
|
||||
<exclude name="CouplingBetweenObjects" />
|
||||
<exclude name="CyclomaticComplexity" />
|
||||
@@ -82,6 +89,7 @@
|
||||
|
||||
<rule ref="category/java/multithreading.xml">
|
||||
<exclude name="AvoidSynchronizedAtMethodLevel" />
|
||||
<exclude name="AvoidSynchronizedStatement" />
|
||||
<exclude name="AvoidUsingVolatile" />
|
||||
<exclude name="DoNotUseThreads" />
|
||||
<exclude name="UseConcurrentHashMap" />
|
||||
|
||||
@@ -1,5 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FindBugsFilter>
|
||||
<Match>
|
||||
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.DriverStation" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.Ultrasonic" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.Watchdog" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16448_IMU" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16470_IMU" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.DriverStation" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.GenericHID" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.Ultrasonic" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.motorcontrol.NidecBrushless" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.CommandScheduler" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="CT_CONSTRUCTOR_THROW" />
|
||||
</Match>
|
||||
@@ -30,12 +70,21 @@
|
||||
<Match>
|
||||
<Bug pattern="EI_EXPOSE_REP2" />
|
||||
</Match>
|
||||
<!--
|
||||
Strict reading of Object.equals() contract means that whenever equals() behaviour is defined, all implementations
|
||||
need to adhere to it. The only reason to override the method (assuming correct API design, of course) is to provide
|
||||
a more efficient implementation. This rule would be forcing a @SuppressFBWarnings on perfectly compliant classes.
|
||||
More information at https://github.com/spotbugs/spotbugs/issues/511
|
||||
-->
|
||||
<Match>
|
||||
<Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="FL_FLOATS_AS_LOOP_COUNTERS" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
<Source name="MechanismLigament2d.java" />
|
||||
<Class name="edu.wpi.first.wpilibj.smartdashboard.MechanismLigament2d" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="MS_EXPOSE_REP" />
|
||||
@@ -45,42 +94,69 @@
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="ParallelCommandGroup.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelCommandGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="ParallelDeadlineGroup.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelDeadlineGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="ParallelRaceGroup.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelRaceGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="ProxyScheduleCommand.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ProxyScheduleCommand" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="SequentialCommandGroup.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.SequentialCommandGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="SelectCommand.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.SelectCommand" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
|
||||
<Source name="AntJunitLauncher.java" />
|
||||
<Class name="edu.wpi.first.wpilibj.test.AntJunitLauncher" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
|
||||
<Source name="CombinedRuntimeLoader.java" />
|
||||
<Class name="edu.wpi.first.util.CombinedRuntimeLoader" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED" />
|
||||
<Class name="edu.wpi.first.networktables.NetworkTableInstance" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SC_START_IN_CTOR" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SF_SWITCH_FALLTHROUGH" />
|
||||
<Source name="CameraServer.java" />
|
||||
<Class name="edu.wpi.first.cameraserver.CameraServer$PropertyPublisher" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_GETTER_NOT_SYNCHRONIZED" />
|
||||
<Class name="edu.wpi.first.wpilibj.test.TestSuite" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.wpilibj.test.TestSuite" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.CommandScheduler" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.math.geometry.CoordinateAxis" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.math.geometry.CoordinateSystem" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
|
||||
@@ -125,35 +201,11 @@
|
||||
<Match>
|
||||
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SC_START_IN_CTOR" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED" />
|
||||
<Class name="edu.wpi.first.networktables.NetworkTableInstance" />
|
||||
</Match>
|
||||
<!--
|
||||
Strict reading of Object.equals() contract means that whenever equals() behaviour is defined, all implementations
|
||||
need to adhere to it. The only reason to override the method (assuming correct API design, of course) is to provide
|
||||
a more efficient implementation. This rule would be forcing a @SuppressFBWarnings on perfectly compliant classes.
|
||||
More information at https://github.com/spotbugs/spotbugs/issues/511
|
||||
-->
|
||||
<Match>
|
||||
<Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD" />
|
||||
<Class name="edu.wpi.first.epilogue.EpilogueConfiguration" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.CommandScheduler" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="~edu.wpi.first.math.geometry.Coordinate\w+" />
|
||||
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE" />
|
||||
</Match>
|
||||
</FindBugsFilter>
|
||||
|
||||
Reference in New Issue
Block a user