[build] Globally Exclude PMD.TooManyMethods (#2793)

This was not a useful check, as every time we hit it, we simply excluded it.
This commit is contained in:
Austin Shalit
2020-10-22 23:53:48 -04:00
committed by GitHub
parent fb7b41793b
commit 6e7c7374fd
48 changed files with 28 additions and 61 deletions

View File

@@ -17,7 +17,7 @@ package edu.wpi.first.wpiutil.math;
*
* @param <T> The {@link Num} this represents.
*/
@SuppressWarnings({"MethodName", "unused", "PMD.TooManyMethods"})
@SuppressWarnings({"MethodName", "unused"})
public interface Nat<T extends Num> {
/**
* The number this interface represents.

View File

@@ -14,7 +14,7 @@ import edu.wpi.first.wpiutil.math.Nat;
import edu.wpi.first.wpiutil.math.Num;
import edu.wpi.first.wpiutil.math.Pair;
@SuppressWarnings({"PMD.TooManyMethods", "ParameterName", "MethodTypeParameterName"})
@SuppressWarnings({"ParameterName", "MethodTypeParameterName"})
public final class Discretization {
private Discretization() {
// Utility class

View File

@@ -21,7 +21,7 @@ import edu.wpi.first.wpiutil.math.VecBuilder;
import edu.wpi.first.wpiutil.math.numbers.N1;
import edu.wpi.first.wpiutil.math.numbers.N3;
@SuppressWarnings({"PMD.TooManyMethods", "ParameterName"})
@SuppressWarnings("ParameterName")
public final class StateSpaceUtil {
private StateSpaceUtil() {
// Utility class

View File

@@ -12,7 +12,7 @@ import edu.wpi.first.wpiutil.math.Matrix;
import edu.wpi.first.wpiutil.math.Num;
import edu.wpi.first.wpiutil.math.numbers.N1;
@SuppressWarnings({"PMD.TooManyMethods", "ClassTypeParameterName"})
@SuppressWarnings("ClassTypeParameterName")
public class LinearSystem<States extends Num, Inputs extends Num,
Outputs extends Num> {

View File

@@ -29,7 +29,7 @@ import edu.wpi.first.wpiutil.math.numbers.N1;
* @param <R> The number of rows in this matrix.
* @param <C> The number of columns in this matrix.
*/
@SuppressWarnings({"PMD.TooManyMethods", "PMD.ExcessivePublicCount"})
@SuppressWarnings("PMD.ExcessivePublicCount")
public class Matrix<R extends Num, C extends Num> {
protected final SimpleMatrix m_storage;

View File

@@ -18,7 +18,6 @@ import org.ejml.simple.SimpleMatrix;
import edu.wpi.first.math.WPIMathJNI;
@SuppressWarnings("PMD.TooManyMethods")
public final class SimpleMatrixUtils {
private SimpleMatrixUtils() {
}

View File

@@ -25,7 +25,6 @@ import edu.wpi.first.wpiutil.math.numbers.N9;
*
* @param <N> The dimension of the vector to be constructed.
*/
@SuppressWarnings("PMD.TooManyMethods")
public class VecBuilder<N extends Num> extends MatBuilder<N, N1> {
public VecBuilder(Nat<N> rows) {
super(rows, Nat.N1());

View File

@@ -13,7 +13,6 @@ import static org.junit.jupiter.api.Assertions.assertAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
@SuppressWarnings("PMD.TooManyMethods")
class Translation2dTest {
private static final double kEpsilon = 1E-9;

View File

@@ -14,7 +14,6 @@ import edu.wpi.first.wpilibj.geometry.Translation2d;
import static org.junit.jupiter.api.Assertions.assertAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
@SuppressWarnings("PMD.TooManyMethods")
class MecanumDriveKinematicsTest {
private static final double kEpsilon = 1E-9;

View File

@@ -15,7 +15,6 @@ import edu.wpi.first.wpilibj.geometry.Translation2d;
import static org.junit.jupiter.api.Assertions.assertAll;
import static org.junit.jupiter.api.Assertions.assertEquals;
@SuppressWarnings("PMD.TooManyMethods")
class SwerveDriveKinematicsTest {
private static final double kEpsilon = 1E-9;

View File

@@ -27,7 +27,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
@SuppressWarnings("PMD.TooManyMethods")
public class StateSpaceUtilTest {
@Test
public void testCostArray() {

View File

@@ -13,7 +13,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
@SuppressWarnings({"PMD.TooManyMethods", "PMD.AvoidInstantiatingObjectsInLoops"})
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
class TrapezoidProfileTest {
private static final double kDt = 0.01;