Clean up Java warning suppressions (#4433)

Checkstyle naming conventions were changed to allow most of what's in
wpimath. Naming rules were disabled completely in wpimath since almost
all suppressions are for math notation.
This commit is contained in:
Tyler Veness
2022-09-24 00:13:55 -07:00
committed by GitHub
parent 17f504f548
commit a791470de7
233 changed files with 282 additions and 881 deletions

View File

@@ -98,7 +98,6 @@ public class Drivetrain {
* @param xSpeed Linear velocity in m/s.
* @param rot Angular velocity in rad/s.
*/
@SuppressWarnings("ParameterName")
public void drive(double xSpeed, double rot) {
var wheelSpeeds = m_kinematics.toWheelSpeeds(new ChassisSpeeds(xSpeed, 0.0, rot));
setSpeeds(wheelSpeeds);

View File

@@ -108,7 +108,6 @@ public class Drivetrain {
* @param xSpeed Linear velocity in m/s.
* @param rot Angular velocity in rad/s.
*/
@SuppressWarnings("ParameterName")
public void drive(double xSpeed, double rot) {
var wheelSpeeds = m_kinematics.toWheelSpeeds(new ChassisSpeeds(xSpeed, 0.0, rot));
setSpeeds(wheelSpeeds);

View File

@@ -8,7 +8,6 @@ import edu.wpi.first.wpilibj.DutyCycleEncoder;
import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
@SuppressWarnings("PMD.SingularField")
public class Robot extends TimedRobot {
private DutyCycleEncoder m_dutyCycleEncoder;

View File

@@ -9,15 +9,12 @@ import edu.wpi.first.wpilibj.DutyCycle;
import edu.wpi.first.wpilibj.TimedRobot;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
@SuppressWarnings("PMD.SingularField")
public class Robot extends TimedRobot {
private DigitalInput m_input;
private DutyCycle m_dutyCycle;
@Override
public void robotInit() {
m_input = new DigitalInput(0);
m_dutyCycle = new DutyCycle(m_input);
m_dutyCycle = new DutyCycle(new DigitalInput(0));
}
@Override

View File

@@ -114,7 +114,6 @@ public class Drivetrain {
* @param rot Angular rate of the robot.
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
*/
@SuppressWarnings("ParameterName")
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
var mecanumDriveWheelSpeeds =
m_kinematics.toWheelSpeeds(

View File

@@ -113,7 +113,6 @@ public class DriveSubsystem extends SubsystemBase {
* @param rot Angular rate of the robot.
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
*/
@SuppressWarnings("ParameterName")
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
if (fieldRelative) {
m_drive.driveCartesian(ySpeed, xSpeed, rot, -m_gyro.getAngle());

View File

@@ -126,7 +126,6 @@ public class Drivetrain {
* @param rot Angular rate of the robot.
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
*/
@SuppressWarnings("ParameterName")
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
var mecanumDriveWheelSpeeds =
m_kinematics.toWheelSpeeds(

View File

@@ -99,7 +99,6 @@ public class Drivetrain {
* @param xSpeed Linear velocity in m/s.
* @param rot Angular velocity in rad/s.
*/
@SuppressWarnings("ParameterName")
public void drive(double xSpeed, double rot) {
var wheelSpeeds = m_kinematics.toWheelSpeeds(new ChassisSpeeds(xSpeed, 0.0, rot));
setSpeeds(wheelSpeeds);

View File

@@ -113,7 +113,6 @@ public class Drivetrain {
* @param xSpeed the speed for the x axis
* @param rot the rotation
*/
@SuppressWarnings("ParameterName")
public void drive(double xSpeed, double rot) {
setSpeeds(m_kinematics.toWheelSpeeds(new ChassisSpeeds(xSpeed, 0, rot)));
}

View File

@@ -65,7 +65,6 @@ public class Robot extends TimedRobot {
}
@Override
@SuppressWarnings("LocalVariableName")
public void teleopPeriodic() {
// Get the x speed. We are inverting this because Xbox controllers return
// negative values when we push forward.

View File

@@ -46,7 +46,6 @@ public class Drivetrain {
* @param rot Angular rate of the robot.
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
*/
@SuppressWarnings("ParameterName")
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
var swerveModuleStates =
m_kinematics.toSwerveModuleStates(

View File

@@ -99,7 +99,6 @@ public class DriveSubsystem extends SubsystemBase {
* @param rot Angular rate of the robot.
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
*/
@SuppressWarnings("ParameterName")
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
var swerveModuleStates =
DriveConstants.kDriveKinematics.toSwerveModuleStates(

View File

@@ -58,7 +58,6 @@ public class Drivetrain {
* @param rot Angular rate of the robot.
* @param fieldRelative Whether the provided x and y speeds are relative to the field.
*/
@SuppressWarnings("ParameterName")
public void drive(double xSpeed, double ySpeed, double rot, boolean fieldRelative) {
var swerveModuleStates =
m_kinematics.toSwerveModuleStates(