Commands are run synchronously from the main robot loop; no multithreading is used, unless * specified explicitly from the command implementation. */ -@SuppressWarnings("PMD.TooManyMethods") public interface Command { /** diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/CommandScheduler.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/CommandScheduler.java index 1f9866134b..60488d29ea 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/CommandScheduler.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/CommandScheduler.java @@ -38,7 +38,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SendableRegistry; * {@link CommandScheduler#registerSubsystem(Subsystem...)} in order for their {@link * Subsystem#periodic()} methods to be called and for their default commands to be scheduled. */ -@SuppressWarnings({"PMD.GodClass", "PMD.TooManyMethods", "PMD.TooManyFields"}) +@SuppressWarnings({"PMD.GodClass", "PMD.TooManyFields"}) public final class CommandScheduler implements Sendable, AutoCloseable { /** * The Singleton Instance. diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Button.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Button.java index 0d8ae592f3..d672a382ec 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Button.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Button.java @@ -22,7 +22,6 @@ import edu.wpi.first.wpilibj2.command.Subsystem; * operator interface as a common use case of the more generalized Trigger objects. This is a simple * wrapper around Trigger with the method names renamed to fit the Button object use. */ -@SuppressWarnings("PMD.TooManyMethods") public class Button extends Trigger { /** * Default constructor; creates a button that is never pressed (unless {@link Button#get()} is diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java index 5167e4ae4f..e5e17639cc 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/button/Trigger.java @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -27,7 +27,6 @@ import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam; * reading a certain sensor input). For this, they only have to write the {@link Trigger#get()} * method to get the full functionality of the Trigger class. */ -@SuppressWarnings("PMD.TooManyMethods") public class Trigger { private final BooleanSupplier m_isActive; diff --git a/wpilibNewCommands/src/test/java/edu/wpi/first/wpilibj2/command/CommandRequirementsTest.java b/wpilibNewCommands/src/test/java/edu/wpi/first/wpilibj2/command/CommandRequirementsTest.java index 5a356e4d0f..d19331b8d2 100644 --- a/wpilibNewCommands/src/test/java/edu/wpi/first/wpilibj2/command/CommandRequirementsTest.java +++ b/wpilibNewCommands/src/test/java/edu/wpi/first/wpilibj2/command/CommandRequirementsTest.java @@ -14,7 +14,6 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.verify; -@SuppressWarnings("PMD.TooManyMethods") class CommandRequirementsTest extends CommandTestBase { @Test void requirementInterruptTest() { diff --git a/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/Command.java b/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/Command.java index 76a1618b06..6233a43daa 100644 --- a/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/Command.java +++ b/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/Command.java @@ -40,7 +40,6 @@ import edu.wpi.first.wpilibj.smartdashboard.SendableRegistry; * @see CommandGroup * @see IllegalUseOfCommandException */ -@SuppressWarnings("PMD.TooManyMethods") public abstract class Command implements Sendable, AutoCloseable { /** * The time since this command was initialized. diff --git a/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/CommandGroup.java b/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/CommandGroup.java index 525e681ae2..ef4f353245 100644 --- a/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/CommandGroup.java +++ b/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/CommandGroup.java @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -31,7 +31,6 @@ import static java.util.Objects.requireNonNull; * @see Subsystem * @see IllegalUseOfCommandException */ -@SuppressWarnings("PMD.TooManyMethods") public class CommandGroup extends Command { /** * The commands in this group (stored in entries). diff --git a/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/Scheduler.java b/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/Scheduler.java index 40ceaf1dda..c48f604a87 100644 --- a/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/Scheduler.java +++ b/wpilibOldCommands/src/main/java/edu/wpi/first/wpilibj/command/Scheduler.java @@ -33,7 +33,6 @@ import edu.wpi.first.wpilibj.smartdashboard.SendableRegistry; * * @see Command */ -@SuppressWarnings("PMD.TooManyMethods") public final class Scheduler implements Sendable, AutoCloseable { /** * The Singleton Instance. diff --git a/wpilibOldCommands/src/test/java/edu/wpi/first/wpilibj/shuffleboard/ShuffleboardTabTest.java b/wpilibOldCommands/src/test/java/edu/wpi/first/wpilibj/shuffleboard/ShuffleboardTabTest.java index 16f088f18d..8e304ebead 100644 --- a/wpilibOldCommands/src/test/java/edu/wpi/first/wpilibj/shuffleboard/ShuffleboardTabTest.java +++ b/wpilibOldCommands/src/test/java/edu/wpi/first/wpilibj/shuffleboard/ShuffleboardTabTest.java @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2018-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -25,7 +25,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; -@SuppressWarnings({"PMD.TooManyMethods"}) public class ShuffleboardTabTest { private NetworkTableInstance m_ntInstance; private ShuffleboardTab m_tab; diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/CAN.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/CAN.java index d24fcc23a9..2dde3ab3b0 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/CAN.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/CAN.java @@ -25,7 +25,6 @@ import edu.wpi.first.hal.HAL; * read methods and the byte[] passed into the write methods need to not * be modified for the duration of their respective calls. */ -@SuppressWarnings("PMD.TooManyMethods") public class CAN implements Closeable { public static final int kTeamManufacturer = 8; public static final int kTeamDeviceType = 10; diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/CameraServer.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/CameraServer.java index 178d5ee998..c8948b91ed 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/CameraServer.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/CameraServer.java @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -39,7 +39,6 @@ import edu.wpi.first.networktables.NetworkTableInstance; * * @deprecated Replaced with edu.wpi.first.cameraserver.CameraServer */ -@SuppressWarnings("PMD.TooManyMethods") @Deprecated public final class CameraServer { public static final int kBasePort = 1181; diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java index bd8a44bab3..80693a425c 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/DriverStation.java @@ -25,8 +25,7 @@ import edu.wpi.first.networktables.NetworkTableInstance; * Provide access to the network communication data to / from the Driver Station. */ @SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.ExcessiveClassLength", - "PMD.ExcessivePublicCount", "PMD.GodClass", "PMD.TooManyFields", - "PMD.TooManyMethods"}) + "PMD.ExcessivePublicCount", "PMD.GodClass", "PMD.TooManyFields"}) public class DriverStation { /** * Number of Joystick Ports. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/I2C.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/I2C.java index ca8374a2a3..58b96aa8a7 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/I2C.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/I2C.java @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -22,7 +22,7 @@ import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam; *
This class is intended to be used by sensor (and other I2C device) drivers. It probably should * not be used directly. */ -@SuppressWarnings({"PMD.GodClass", "PMD.TooManyMethods"}) +@SuppressWarnings("PMD.GodClass") public class I2C implements AutoCloseable { public enum Port { kOnboard(0), kMXP(1); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/InterruptableSensorBase.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/InterruptableSensorBase.java index bd21d24b0e..8fb734b53b 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/InterruptableSensorBase.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/InterruptableSensorBase.java @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -16,7 +16,6 @@ import edu.wpi.first.hal.util.AllocationException; /** * Base for sensors to be used with interrupts. */ -@SuppressWarnings("PMD.TooManyMethods") public abstract class InterruptableSensorBase implements AutoCloseable { @SuppressWarnings("JavadocMethod") public enum WaitResult { diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/IterativeRobotBase.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/IterativeRobotBase.java index 974c529534..daa5bdba5e 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/IterativeRobotBase.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/IterativeRobotBase.java @@ -42,7 +42,6 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; * - teleopPeriodic() * - testPeriodic() */ -@SuppressWarnings("PMD.TooManyMethods") public abstract class IterativeRobotBase extends RobotBase { protected double m_period; diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Preferences.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Preferences.java index a45b6de276..0edbbf3c85 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Preferences.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Preferences.java @@ -31,7 +31,6 @@ import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam; *
This will also interact with {@link NetworkTable} by creating a table called "Preferences" * with all the key-value pairs.
*/ -@SuppressWarnings("PMD.TooManyMethods") public final class Preferences { /** * The Preferences table name. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotDrive.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotDrive.java index 104fb26c60..f79d74af4d 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotDrive.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotDrive.java @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -25,7 +25,7 @@ import static edu.wpi.first.wpilibj.util.ErrorMessages.requireNonNullParam; * or {@link edu.wpi.first.wpilibj.drive.MecanumDrive} classes instead. */ @Deprecated -@SuppressWarnings({"PMD.GodClass", "PMD.TooManyMethods"}) +@SuppressWarnings("PMD.GodClass") public class RobotDrive extends MotorSafety implements AutoCloseable { /** * The location of a motor on the robot for the purpose of driving. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java index 9dcdc65ceb..aa3c67998a 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SPI.java @@ -19,7 +19,7 @@ import edu.wpi.first.hal.SPIJNI; /** * Represents a SPI bus port. */ -@SuppressWarnings({"PMD.CyclomaticComplexity", "PMD.TooManyMethods"}) +@SuppressWarnings("PMD.CyclomaticComplexity") public class SPI implements AutoCloseable { public enum Port { kOnboardCS0(0), kOnboardCS1(1), kOnboardCS2(2), kOnboardCS3(3), kMXP(4); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java index 86bd941da8..0f509c7f45 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/SerialPort.java @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */ +/* Copyright (c) 2008-2020 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -16,7 +16,6 @@ import edu.wpi.first.hal.SerialPortJNI; /** * Driver for the serial ports (USB, MXP, Onboard) on the roboRIO. */ -@SuppressWarnings("PMD.TooManyMethods") public class SerialPort implements AutoCloseable { private int m_portHandle; diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Watchdog.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Watchdog.java index 8287f66665..aaf56711cf 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Watchdog.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Watchdog.java @@ -21,7 +21,6 @@ import edu.wpi.first.hal.NotifierJNI; * *The watchdog is initialized disabled, so the user needs to call enable() before use.
*/
-@SuppressWarnings("PMD.TooManyMethods")
public class Watchdog implements Closeable, Comparable When a value is put into the SmartDashboard here, it pops up on the SmartDashboard on the
* laptop. Users can put values into and get values from the SmartDashboard.
*/
-@SuppressWarnings({"PMD.GodClass", "PMD.TooManyMethods"})
+@SuppressWarnings("PMD.GodClass")
public final class SmartDashboard {
/**
* The {@link NetworkTable} used by {@link SmartDashboard}.
diff --git a/wpilibj/src/test/java/edu/wpi/first/wpilibj/TimedRobotTest.java b/wpilibj/src/test/java/edu/wpi/first/wpilibj/TimedRobotTest.java
index 84b1edc0bb..6942ca0df4 100644
--- a/wpilibj/src/test/java/edu/wpi/first/wpilibj/TimedRobotTest.java
+++ b/wpilibj/src/test/java/edu/wpi/first/wpilibj/TimedRobotTest.java
@@ -20,7 +20,6 @@ import edu.wpi.first.wpilibj.simulation.SimHooks;
import static org.junit.jupiter.api.Assertions.assertEquals;
class TimedRobotTest {
- @SuppressWarnings("PMD.TooManyMethods")
class MockRobot extends TimedRobot {
public final AtomicInteger m_robotInitCount = new AtomicInteger(0);
public final AtomicInteger m_simulationInitCount = new AtomicInteger(0);
diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/pacgoat/subsystems/Shooter.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/pacgoat/subsystems/Shooter.java
index 5c70e71f00..6fa7e680d0 100644
--- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/pacgoat/subsystems/Shooter.java
+++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/pacgoat/subsystems/Shooter.java
@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
-/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
+/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -22,7 +22,6 @@ import edu.wpi.first.wpilibj.command.Subsystem;
* NOTE: Simulation currently approximates this as as single pneumatic
* cylinder and ignores the latch.
*/
-@SuppressWarnings("PMD.TooManyMethods")
public class Shooter extends Subsystem {
// Devices
DoubleSolenoid m_piston1 = new DoubleSolenoid(1, 3, 4);
diff --git a/wpimath/src/generate/Nat.java.in b/wpimath/src/generate/Nat.java.in
index 8c471f6f47..666bd1c32a 100644
--- a/wpimath/src/generate/Nat.java.in
+++ b/wpimath/src/generate/Nat.java.in
@@ -17,7 +17,7 @@ package edu.wpi.first.wpiutil.math;
*
* @param