[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:
Austin Shalit
2020-12-29 09:27:48 -08:00
committed by GitHub
parent 8c8ec5e63e
commit 6e1919414e
70 changed files with 224 additions and 285 deletions

View File

@@ -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;

View File

@@ -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++) {

View File

@@ -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);