Files
allwpilib/styleguide/spotbugs-exclude.xml
Tyler Veness 9bd9656871 [wpimath] Replace Speeds with Velocities (#8479)
I left "free speed" alone since that's the technical term for it. In
general, velocity is a vector quantity, and speed is a magnitude (i.e.,
a strictly positive value).

This PR also replaces the speed verbiage in MotorController with duty
cycle.

Fixes #8423.
2026-03-06 14:19:15 -08:00

172 lines
6.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
<Match>
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE" />
<Class name="org.wpilib.system.Watchdog" />
</Match>
<Match>
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
<Or>
<Class name="org.wpilib.driverstation.DriverStation" />
<Class name="org.wpilib.driverstation.GenericHID" />
<Class name="org.wpilib.command2.CommandScheduler" />
</Or>
</Match>
<Match>
<Bug pattern="CT_CONSTRUCTOR_THROW" />
</Match>
<Match>
<Bug pattern="DE_MIGHT_IGNORE" />
<Class name="org.wpilib.smartdashboard.SendableBuilderImpl$Property" />
</Match>
<Match>
<Bug pattern="DM_DEFAULT_ENCODING" />
<Or>
<Class name="org.wpilib.epilogue.processor.EpilogueGenerator" />
<Class name="org.wpilib.examples.i2ccommunication.I2CCommunicationTest" />
<Class name="org.wpilib.command2.PrintCommandTest" />
</Or>
</Match>
<Match>
<Bug pattern="DM_EXIT" />
<Class name="org.wpilib.framework.OpModeRobot" />
</Match>
<Match>
<Bug pattern="DMI_HARDCODED_ABSOLUTE_FILENAME" />
<Or>
<Class name="org.wpilib.system.DataLogManager" />
<Class name="org.wpilib.system.Filesystem" />
<Class name="org.wpilib.util.runtime.RuntimeLoader" />
</Or>
</Match>
<Match>
<!--
These are false positives where the Random instance is used multiple times in a loop. Futhermore, high randomness is not a
high priority because these are tests- In fact, the odometry tests seed the Random instance to guarantee repeatability.
-->
<Bug pattern="DMI_RANDOM_USED_ONLY_ONCE" />
<Or>
<Class name="org.wpilib.math.kinematics.SwerveDriveOdometry3dTest" />
<Class name="org.wpilib.math.kinematics.SwerveDriveOdometryTest" />
<Class name="org.wpilib.math.filter.LinearFilterTest" />
</Or>
</Match>
<Match>
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<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" />
<Or>
<Class name="org.wpilib.math.controller.DifferentialDriveAccelerationLimiterTest" />
<Class name="org.wpilib.math.controller.ImplicitModelFollowerTest" />
<Class name="org.wpilib.math.controller.LinearSystemLoopTest" />
<Class name="~org\.wpilib\.math\.estimator\.[^.]*PoseEstimator(3d)?Test" />
<Class name="org.wpilib.math.filter.LinearFilterTest" />
<Class name="org.wpilib.math.kinematics.ChassisVelocitiesTest" />
<Class name="org.wpilib.hardware.led.LEDPatternTest" />
<Class name="org.wpilib.simulation.AnalogInputSimTest" />
</Or>
</Match>
<Match>
<Bug pattern="IS2_INCONSISTENT_SYNC" />
<Class name="org.wpilib.smartdashboard.MechanismLigament2d" />
</Match>
<Match>
<Bug pattern="MS_EXPOSE_REP" />
</Match>
<Match>
<Bug pattern="MS_MUTABLE_ARRAY" />
</Match>
<Match>
<!--
This seems to be a false positive from the &= used by these command compositions to determine runsWhenDisabled
-->
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
<Or>
<Class name="org.wpilib.command2.ParallelCommandGroup" />
<Class name="org.wpilib.command2.ParallelDeadlineGroup" />
<Class name="org.wpilib.command2.ParallelRaceGroup" />
<Class name="org.wpilib.command2.SequentialCommandGroup" />
<Class name="org.wpilib.command2.SelectCommand" />
</Or>
</Match>
<Match>
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE" />
</Match>
<Match>
<Bug pattern="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED" />
<Class name="org.wpilib.networktables.NetworkTableInstance" />
</Match>
<Match>
<Bug pattern="SC_START_IN_CTOR" />
<Class name="org.wpilib.hardware.motor.MotorSafety" />
</Match>
<Match>
<Bug pattern="SF_SWITCH_FALLTHROUGH" />
<Class name="org.wpilib.vision.stream.CameraServer$PropertyPublisher" />
</Match>
<Match>
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
<Or>
<Class name="org.wpilib.command2.CommandScheduler" />
<Class name="org.wpilib.math.geometry.CoordinateAxis" />
<Class name="org.wpilib.math.geometry.CoordinateSystem" />
</Or>
</Match>
<Match>
<!--
Many false positives from instance reporting.
-->
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
</Match>
<Match>
<!--
False positives because the users are supposed to fill in the code.
-->
<Bug pattern="UC_USELESS_VOID_METHOD" />
<Or>
<Class name="org.wpilib.templates.romitimed.Robot" />
<Class name="org.wpilib.templates.xrptimed.Robot" />
<Class name="org.wpilib.templates.timed.Robot" />
<Class name="org.wpilib.templates.timeslice.Robot" />
</Or>
</Match>
<Match>
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" />
</Match>
<Match>
<Bug pattern="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD" />
<Class name="org.wpilib.epilogue.EpilogueConfiguration" />
</Match>
<Match>
<!-- PMD will skip variables named `ignore`, but spotbugs isn't as smart -->
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
<Class name="org.wpilib.command3.StagedCommandBuilderTest" />
</Match>
<Match>
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE" />
<Or>
<Class name="org.wpilib.epilogue.processor.LoggableHandler" />
<Class name="org.wpilib.util.runtime.MsvcRuntimeException" />
<Class name="org.wpilib.util.runtime.RuntimeLoader" />
<Class name="org.wpilib.system.Tracer" />
<Class name="org.wpilib.system.Watchdog" />
<Class name="org.wpilib.math.system.LinearSystem" />
<Class name="org.wpilib.math.trajectory.Trajectory" />
<Class name="org.wpilib.command3.SchedulerTelemetryTests" />
</Or>
</Match>
</FindBugsFilter>