mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
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:
@@ -19,7 +19,6 @@ import org.junit.jupiter.params.provider.MethodSource;
|
||||
class AddressableLEDBufferTest {
|
||||
@ParameterizedTest
|
||||
@MethodSource("hsvToRgbProvider")
|
||||
@SuppressWarnings("ParameterName")
|
||||
void hsvConvertTest(int h, int s, int v, int r, int g, int b) {
|
||||
var buffer = new AddressableLEDBuffer(1);
|
||||
buffer.setHSV(0, h, s, v);
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.junit.jupiter.params.provider.EnumSource;
|
||||
class PS4ControllerTest {
|
||||
@ParameterizedTest
|
||||
@EnumSource(value = PS4Controller.Button.class)
|
||||
@SuppressWarnings({"VariableDeclarationUsageDistance"})
|
||||
void testButtons(PS4Controller.Button button)
|
||||
throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
||||
HAL.initialize(500, 0);
|
||||
@@ -32,10 +31,10 @@ class PS4ControllerTest {
|
||||
String joyPressedMethodName = "get" + buttonName + "Pressed";
|
||||
String joyReleasedMethodName = "get" + buttonName + "Released";
|
||||
|
||||
Method simSetMethod = joysim.getClass().getMethod(simSetMethodName, boolean.class);
|
||||
Method joyGetMethod = joy.getClass().getMethod(joyGetMethodName);
|
||||
Method joyPressedMethod = joy.getClass().getMethod(joyPressedMethodName);
|
||||
Method joyReleasedMethod = joy.getClass().getMethod(joyReleasedMethodName);
|
||||
final Method simSetMethod = joysim.getClass().getMethod(simSetMethodName, boolean.class);
|
||||
final Method joyGetMethod = joy.getClass().getMethod(joyGetMethodName);
|
||||
final Method joyPressedMethod = joy.getClass().getMethod(joyPressedMethodName);
|
||||
final Method joyReleasedMethod = joy.getClass().getMethod(joyReleasedMethodName);
|
||||
|
||||
simSetMethod.invoke(joysim, false);
|
||||
joysim.notifyNewData();
|
||||
@@ -59,7 +58,6 @@ class PS4ControllerTest {
|
||||
|
||||
@ParameterizedTest
|
||||
@EnumSource(value = PS4Controller.Axis.class)
|
||||
@SuppressWarnings({"VariableDeclarationUsageDistance"})
|
||||
void testAxes(PS4Controller.Axis axis)
|
||||
throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
||||
HAL.initialize(500, 0);
|
||||
|
||||
@@ -18,7 +18,6 @@ import org.junit.jupiter.params.provider.EnumSource;
|
||||
class XboxControllerTest {
|
||||
@ParameterizedTest
|
||||
@EnumSource(value = XboxController.Button.class)
|
||||
@SuppressWarnings({"VariableDeclarationUsageDistance"})
|
||||
void testButtons(XboxController.Button button)
|
||||
throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
||||
HAL.initialize(500, 0);
|
||||
@@ -32,10 +31,10 @@ class XboxControllerTest {
|
||||
String joyPressedMethodName = "get" + buttonName + "Pressed";
|
||||
String joyReleasedMethodName = "get" + buttonName + "Released";
|
||||
|
||||
Method simSetMethod = joysim.getClass().getMethod(simSetMethodName, boolean.class);
|
||||
Method joyGetMethod = joy.getClass().getMethod(joyGetMethodName);
|
||||
Method joyPressedMethod = joy.getClass().getMethod(joyPressedMethodName);
|
||||
Method joyReleasedMethod = joy.getClass().getMethod(joyReleasedMethodName);
|
||||
final Method simSetMethod = joysim.getClass().getMethod(simSetMethodName, boolean.class);
|
||||
final Method joyGetMethod = joy.getClass().getMethod(joyGetMethodName);
|
||||
final Method joyPressedMethod = joy.getClass().getMethod(joyPressedMethodName);
|
||||
final Method joyReleasedMethod = joy.getClass().getMethod(joyReleasedMethodName);
|
||||
|
||||
simSetMethod.invoke(joysim, false);
|
||||
joysim.notifyNewData();
|
||||
@@ -59,7 +58,6 @@ class XboxControllerTest {
|
||||
|
||||
@ParameterizedTest
|
||||
@EnumSource(value = XboxController.Axis.class)
|
||||
@SuppressWarnings({"VariableDeclarationUsageDistance"})
|
||||
void testAxes(XboxController.Axis axis)
|
||||
throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
||||
HAL.initialize(500, 0);
|
||||
|
||||
@@ -18,7 +18,6 @@ import edu.wpi.first.wpilibj.simulation.testutils.BooleanCallback;
|
||||
import edu.wpi.first.wpilibj.simulation.testutils.DoubleCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
class CTREPCMSimTest {
|
||||
@Test
|
||||
void testInitialization() {
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
class ElevatorSimTest {
|
||||
@Test
|
||||
@SuppressWarnings({"LocalVariableName", "resource"})
|
||||
void testStateSpaceSimWithElevator() {
|
||||
RoboRioSim.resetData();
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import edu.wpi.first.wpilibj.simulation.testutils.DoubleCallback;
|
||||
import edu.wpi.first.wpilibj.simulation.testutils.EnumCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
class REVPHSimTest {
|
||||
@Test
|
||||
void testInitialization() {
|
||||
|
||||
Reference in New Issue
Block a user