mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Disable frivolous PMD warnings and enable PMD in ntcore (#3419)
Some valid warnings like throwing NullPointerException or using a for loop instead of System.arraycopy() were fixed. Abstract classes marked with PMD.AbstractClassWithoutAbstractMethod were made concrete because they already had protected constructors. Fixes #1697.
This commit is contained in:
@@ -13,8 +13,9 @@ import java.util.Set;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
||||
/** Basic setup for all {@link Command tests}." */
|
||||
@SuppressWarnings("PMD.AbstractClassWithoutAbstractMethod")
|
||||
public abstract class CommandTestBase {
|
||||
protected CommandTestBase() {}
|
||||
|
||||
@BeforeEach
|
||||
void commandSetup() {
|
||||
CommandScheduler.getInstance().cancelAll();
|
||||
|
||||
@@ -87,7 +87,6 @@ class MecanumControllerCommandTest {
|
||||
|
||||
@Test
|
||||
@ResourceLock("timing")
|
||||
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
|
||||
void testReachesReference() {
|
||||
final var subsystem = new Subsystem() {};
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ class SwerveControllerCommandTest {
|
||||
|
||||
@Test
|
||||
@ResourceLock("timing")
|
||||
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
|
||||
void testReachesReference() {
|
||||
final var subsystem = new Subsystem() {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user