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

@@ -19,7 +19,6 @@ public class CubicHermiteSpline extends Spline {
* @param yInitialControlVector The control vector for the initial point in the y dimension.
* @param yFinalControlVector The control vector for the final point in the y dimension.
*/
@SuppressWarnings("ParameterName")
public CubicHermiteSpline(
double[] xInitialControlVector,
double[] xFinalControlVector,

View File

@@ -7,7 +7,6 @@ package edu.wpi.first.math.spline;
import edu.wpi.first.math.geometry.Pose2d;
/** Represents a pair of a pose and a curvature. */
@SuppressWarnings("MemberName")
public class PoseWithCurvature {
// Represents the pose.
public Pose2d poseMeters;

View File

@@ -19,7 +19,6 @@ public class QuinticHermiteSpline extends Spline {
* @param yInitialControlVector The control vector for the initial point in the y dimension.
* @param yFinalControlVector The control vector for the final point in the y dimension.
*/
@SuppressWarnings("ParameterName")
public QuinticHermiteSpline(
double[] xInitialControlVector,
double[] xFinalControlVector,

View File

@@ -35,7 +35,6 @@ public abstract class Spline {
* @param t The point t
* @return The pose and curvature at that point.
*/
@SuppressWarnings("ParameterName")
public PoseWithCurvature getPoint(double t) {
SimpleMatrix polynomialBases = new SimpleMatrix(m_degree + 1, 1);
final var coefficients = getCoefficients();
@@ -85,7 +84,6 @@ public abstract class Spline {
* <p>Each element in each array represents the value of the derivative at the index. For example,
* the value of x[2] is the second derivative in the x dimension.
*/
@SuppressWarnings("MemberName")
public static class ControlVector {
public double[] x;
public double[] y;
@@ -96,7 +94,6 @@ public abstract class Spline {
* @param x The x dimension of the control vector.
* @param y The y dimension of the control vector.
*/
@SuppressWarnings("ParameterName")
public ControlVector(double[] x, double[] y) {
this.x = Arrays.copyOf(x, x.length);
this.y = Arrays.copyOf(y, y.length);

View File

@@ -78,7 +78,6 @@ public final class SplineHelper {
* @return A vector of cubic hermite splines that interpolate through the provided waypoints and
* control vectors.
*/
@SuppressWarnings("LocalVariableName")
public static CubicHermiteSpline[] getCubicSplinesFromControlVectors(
Spline.ControlVector start, Translation2d[] waypoints, Spline.ControlVector end) {
CubicHermiteSpline[] splines = new CubicHermiteSpline[waypoints.length + 1];
@@ -202,7 +201,6 @@ public final class SplineHelper {
* @param controlVectors The control vectors.
* @return A vector of quintic hermite splines that interpolate through the provided waypoints.
*/
@SuppressWarnings("LocalVariableName")
public static QuinticHermiteSpline[] getQuinticSplinesFromControlVectors(
Spline.ControlVector[] controlVectors) {
QuinticHermiteSpline[] splines = new QuinticHermiteSpline[controlVectors.length - 1];
@@ -228,7 +226,6 @@ public final class SplineHelper {
* @param d the vector on the rhs
* @param solutionVector the unknown (solution) vector, modified in-place
*/
@SuppressWarnings({"ParameterName", "LocalVariableName"})
private static void thomasAlgorithm(
double[] a, double[] b, double[] c, double[] d, double[] solutionVector) {
int N = d.length;

View File

@@ -46,7 +46,6 @@ public final class SplineParameterizer {
*/
private static final int kMaxIterations = 5000;
@SuppressWarnings("MemberName")
private static class StackContents {
final double t1;
final double t0;