mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[build] Bring naming checkstyle rules up to date with Google Style guide (#1781)
Also update Checkstyle to 8.38. Google changed their style guide from the last time we imported it. This PR brings in those naming changes. The change they made is allowing single letter member, parameter, and local variable names. They also added a lambda naming scheme and I thought it would be good to bring that in too.
This commit is contained in:
@@ -29,12 +29,10 @@ class LinearFilterTest {
|
||||
private static final double kHighPassExpectedOutput = 10.074717;
|
||||
private static final double kMovAvgExpectedOutput = -10.191644;
|
||||
|
||||
@SuppressWarnings("ParameterName")
|
||||
private static double getData(double t) {
|
||||
return 100.0 * Math.sin(2.0 * Math.PI * t) + 20.0 * Math.cos(50.0 * Math.PI * t);
|
||||
}
|
||||
|
||||
@SuppressWarnings("ParameterName")
|
||||
private static double getPulseData(double t) {
|
||||
if (Math.abs(t - 1.0) < 0.001) {
|
||||
return 1.0;
|
||||
|
||||
@@ -203,7 +203,7 @@ class SwerveDriveKinematicsTest {
|
||||
new SwerveModuleState(23.43, Rotation2d.fromDegrees(-39.81)),
|
||||
new SwerveModuleState(54.08, Rotation2d.fromDegrees(-109.44)),
|
||||
new SwerveModuleState(54.08, Rotation2d.fromDegrees(-70.56))
|
||||
};
|
||||
};
|
||||
var stateTolerance = new SwerveModuleState(0.1, Rotation2d.fromDegrees(0.1));
|
||||
|
||||
for (int i = 0; i < expectedStates.length; i++) {
|
||||
|
||||
@@ -33,7 +33,7 @@ class SwerveDriveOdometryTest {
|
||||
new SwerveModuleState(5, Rotation2d.fromDegrees(0)),
|
||||
new SwerveModuleState(5, Rotation2d.fromDegrees(0)),
|
||||
new SwerveModuleState(5, Rotation2d.fromDegrees(0))
|
||||
};
|
||||
};
|
||||
|
||||
m_odometry.updateWithTime(0.0, new Rotation2d(),
|
||||
new SwerveModuleState(), new SwerveModuleState(),
|
||||
@@ -60,7 +60,7 @@ class SwerveDriveOdometryTest {
|
||||
new SwerveModuleState(42.15, Rotation2d.fromDegrees(26.565)),
|
||||
new SwerveModuleState(18.85, Rotation2d.fromDegrees(-90)),
|
||||
new SwerveModuleState(42.15, Rotation2d.fromDegrees(-26.565))
|
||||
};
|
||||
};
|
||||
final var zero = new SwerveModuleState();
|
||||
|
||||
m_odometry.updateWithTime(0.0, new Rotation2d(), zero, zero, zero, zero);
|
||||
|
||||
Reference in New Issue
Block a user