mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[build] Upgrade Gradle plugins (#8166)
I upgraded all plugins I could see except org.ysb33r.doxygen. 2.0 made breaking changes, and I couldn't figure out how to migrate. Most of the changes are for suppressing new linter purification rites.
This commit is contained in:
@@ -152,9 +152,10 @@ public class AprilTagFieldLayout {
|
||||
var pose =
|
||||
switch (origin) {
|
||||
case kBlueAllianceWallRightSide -> Pose3d.kZero;
|
||||
case kRedAllianceWallRightSide -> new Pose3d(
|
||||
new Translation3d(m_fieldDimensions.fieldLength, m_fieldDimensions.fieldWidth, 0),
|
||||
new Rotation3d(0, 0, Math.PI));
|
||||
case kRedAllianceWallRightSide ->
|
||||
new Pose3d(
|
||||
new Translation3d(m_fieldDimensions.fieldLength, m_fieldDimensions.fieldWidth, 0),
|
||||
new Rotation3d(0, 0, Math.PI));
|
||||
};
|
||||
setOrigin(pose);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import org.opencv.core.Mat;
|
||||
import org.opencv.imgcodecs.Imgcodecs;
|
||||
import org.opencv.imgproc.Imgproc;
|
||||
|
||||
@SuppressWarnings("PMD.MutableStaticState")
|
||||
class AprilTagDetectorTest {
|
||||
@SuppressWarnings("MemberName")
|
||||
AprilTagDetector detector;
|
||||
|
||||
@@ -17,10 +17,10 @@ plugins {
|
||||
id 'edu.wpi.first.GradleVsCode'
|
||||
id 'idea'
|
||||
id 'visual-studio'
|
||||
id 'net.ltgt.errorprone' version '3.1.0' apply false
|
||||
id 'com.gradleup.shadow' version '8.3.4' apply false
|
||||
id 'com.diffplug.spotless' version '6.20.0' apply false
|
||||
id 'com.github.spotbugs' version '6.0.2' apply false
|
||||
id 'net.ltgt.errorprone' version '4.3.0' apply false
|
||||
id 'com.gradleup.shadow' version '9.0.0' apply false
|
||||
id 'com.diffplug.spotless' version '7.2.1' apply false
|
||||
id 'com.github.spotbugs' version '6.2.3' apply false
|
||||
}
|
||||
|
||||
wpilibVersioning.buildServerMode = project.hasProperty('buildServer')
|
||||
|
||||
@@ -31,7 +31,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
implementation 'com.google.code.gson:gson:2.13.1'
|
||||
|
||||
implementation project(':wpiutil')
|
||||
implementation project(':wpinet')
|
||||
|
||||
@@ -46,7 +46,7 @@ public final class CameraServer {
|
||||
private static final String kPublishName = "/CameraPublisher";
|
||||
|
||||
private static final class PropertyPublisher implements AutoCloseable {
|
||||
@SuppressWarnings({"PMD.MissingBreakInSwitch", "PMD.ImplicitSwitchFallThrough", "fallthrough"})
|
||||
@SuppressWarnings("fallthrough")
|
||||
PropertyPublisher(NetworkTable table, VideoEvent event) {
|
||||
String name;
|
||||
String infoName;
|
||||
@@ -66,7 +66,7 @@ public final class CameraServer {
|
||||
break;
|
||||
case kEnum:
|
||||
m_choicesTopic = table.getStringArrayTopic(infoName + "/choices");
|
||||
// fall through
|
||||
// fallthrough
|
||||
case kInteger:
|
||||
m_integerValueEntry = table.getIntegerTopic(name).getEntry(0);
|
||||
m_minPublisher = table.getIntegerTopic(infoName + "/min").publish();
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.opencv.core.Mat;
|
||||
* @see VisionRunner
|
||||
* @see VisionThread
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface VisionPipeline {
|
||||
/**
|
||||
* Processes the image input and sets the result objects. Implementations should make these
|
||||
|
||||
@@ -68,8 +68,9 @@ public class CvSource extends ImageSource {
|
||||
case 2 -> PixelFormat.kYUYV; // 2 channels is assumed YUYV
|
||||
case 3 -> PixelFormat.kBGR; // 3 channels is assumed BGR
|
||||
case 4 -> PixelFormat.kBGRA; // 4 channels is assumed BGRA
|
||||
default -> throw new VideoException(
|
||||
"Unable to get pixel format for " + channels + " channels");
|
||||
default ->
|
||||
throw new VideoException(
|
||||
"Unable to get pixel format for " + channels + " channels");
|
||||
};
|
||||
|
||||
putFrame(finalImage, format, true);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id "org.ysb33r.doxygen" version "1.0.4"
|
||||
id "org.ysb33r.doxygen" version "2.0.0"
|
||||
}
|
||||
|
||||
evaluationDependsOn(':apriltag')
|
||||
@@ -62,12 +62,12 @@ doxygen {
|
||||
}
|
||||
}
|
||||
|
||||
doxygen {
|
||||
template 'Doxyfile'
|
||||
doxygen.sourceSets.main {
|
||||
template = 'Doxyfile'
|
||||
|
||||
cppProjectZips.each {
|
||||
dependsOn it
|
||||
source it.source
|
||||
doxygenDox.dependsOn it
|
||||
sources it.source
|
||||
it.ext.includeDirs.each {
|
||||
cppIncludeRoots.add(it.absolutePath)
|
||||
}
|
||||
@@ -169,7 +169,7 @@ doxygen {
|
||||
tasks.register("zipCppDocs", Zip) {
|
||||
archiveBaseName = zipBaseNameCpp
|
||||
destinationDirectory = outputsFolder
|
||||
dependsOn doxygen
|
||||
dependsOn doxygenDox
|
||||
from ("$buildDir/docs/doxygen/html")
|
||||
into '/'
|
||||
}
|
||||
|
||||
@@ -2536,7 +2536,8 @@ class AnnotationProcessorTest {
|
||||
class Example {}
|
||||
""";
|
||||
|
||||
String packageInfo = """
|
||||
String packageInfo =
|
||||
"""
|
||||
package example;
|
||||
""";
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.util.function.LongSupplier;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** A sendable builder implementation that sends data to a {@link EpilogueBackend}. */
|
||||
@SuppressWarnings("PMD.CouplingBetweenObjects") // most methods simply delegate to the backend
|
||||
public class LogBackedSendableBuilder implements SendableBuilder {
|
||||
private final EpilogueBackend m_backend;
|
||||
private final Collection<Runnable> m_updates = new ArrayList<>();
|
||||
|
||||
@@ -15,19 +15,19 @@ package edu.wpi.first.hal;
|
||||
public class AnalogJNI extends JNIWrapper {
|
||||
/**
|
||||
* <i>native declaration : AthenaJava\target\native\include\HAL\Analog.h:58</i><br>
|
||||
* enum values
|
||||
* enum values.
|
||||
*/
|
||||
public interface AnalogTriggerType {
|
||||
/** <i>native declaration : AthenaJava\target\native\include\HAL\Analog.h:54</i> */
|
||||
/** <i>native declaration : AthenaJava\target\native\include\HAL\Analog.h:54</i>. */
|
||||
int kInWindow = 0;
|
||||
|
||||
/** <i>native declaration : AthenaJava\target\native\include\HAL\Analog.h:55</i> */
|
||||
/** <i>native declaration : AthenaJava\target\native\include\HAL\Analog.h:55</i>. */
|
||||
int kState = 1;
|
||||
|
||||
/** <i>native declaration : AthenaJava\target\native\include\HAL\Analog.h:56</i> */
|
||||
/** <i>native declaration : AthenaJava\target\native\include\HAL\Analog.h:56</i>. */
|
||||
int kRisingPulse = 2;
|
||||
|
||||
/** <i>native declaration : AthenaJava\target\native\include\HAL\Analog.h:57</i> */
|
||||
/** <i>native declaration : AthenaJava\target\native\include\HAL\Analog.h:57</i>. */
|
||||
int kFallingPulse = 3;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public final class CANAPITypes {
|
||||
kFirmwareUpdate(31);
|
||||
|
||||
/** The device type ID. */
|
||||
@SuppressWarnings("PMD.MemberName")
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int id;
|
||||
|
||||
CANDeviceType(int id) {
|
||||
@@ -108,7 +108,7 @@ public final class CANAPITypes {
|
||||
kVividHosting(16);
|
||||
|
||||
/** The manufacturer ID. */
|
||||
@SuppressWarnings("PMD.MemberName")
|
||||
@SuppressWarnings("MemberName")
|
||||
public final int id;
|
||||
|
||||
CANManufacturer(int id) {
|
||||
|
||||
@@ -125,8 +125,8 @@ public class PowerDistributionFaults {
|
||||
case 21 -> Channel21BreakerFault;
|
||||
case 22 -> Channel22BreakerFault;
|
||||
case 23 -> Channel23BreakerFault;
|
||||
default -> throw new IndexOutOfBoundsException(
|
||||
"Power distribution fault channel out of bounds!");
|
||||
default ->
|
||||
throw new IndexOutOfBoundsException("Power distribution fault channel out of bounds!");
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -134,8 +134,8 @@ public class PowerDistributionStickyFaults {
|
||||
case 21 -> Channel21BreakerFault;
|
||||
case 22 -> Channel22BreakerFault;
|
||||
case 23 -> Channel23BreakerFault;
|
||||
default -> throw new IndexOutOfBoundsException(
|
||||
"Power distribution fault channel out of bounds!");
|
||||
default ->
|
||||
throw new IndexOutOfBoundsException("Power distribution fault channel out of bounds!");
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -32,15 +32,14 @@ public final class CANExceptionFactory {
|
||||
case NIRioStatus.kRioStatusSuccess -> {
|
||||
// Everything is ok... don't throw.
|
||||
}
|
||||
case ERR_CANSessionMux_InvalidBuffer,
|
||||
NIRioStatus.kRIOStatusBufferInvalidSize -> throw new CANInvalidBufferException();
|
||||
case ERR_CANSessionMux_MessageNotFound,
|
||||
NIRioStatus.kRIOStatusOperationTimedOut -> throw new CANMessageNotFoundException();
|
||||
case ERR_CANSessionMux_NotAllowed,
|
||||
NIRioStatus.kRIOStatusFeatureNotSupported -> throw new CANMessageNotAllowedException(
|
||||
"MessageID = " + messageID);
|
||||
case ERR_CANSessionMux_NotInitialized,
|
||||
NIRioStatus.kRIOStatusResourceNotInitialized -> throw new CANNotInitializedException();
|
||||
case ERR_CANSessionMux_InvalidBuffer, NIRioStatus.kRIOStatusBufferInvalidSize ->
|
||||
throw new CANInvalidBufferException();
|
||||
case ERR_CANSessionMux_MessageNotFound, NIRioStatus.kRIOStatusOperationTimedOut ->
|
||||
throw new CANMessageNotFoundException();
|
||||
case ERR_CANSessionMux_NotAllowed, NIRioStatus.kRIOStatusFeatureNotSupported ->
|
||||
throw new CANMessageNotAllowedException("MessageID = " + messageID);
|
||||
case ERR_CANSessionMux_NotInitialized, NIRioStatus.kRIOStatusResourceNotInitialized ->
|
||||
throw new CANNotInitializedException();
|
||||
default -> throw new UncleanStatusException("Fatal status code detected: " + status);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
package edu.wpi.first.hal.simulation;
|
||||
|
||||
/** Interface for simulation buffer callbacks. */
|
||||
@FunctionalInterface
|
||||
public interface BufferCallback {
|
||||
/**
|
||||
* Simulation buffer callback function.
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
package edu.wpi.first.hal.simulation;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface ConstBufferCallback {
|
||||
void callback(String name, byte[] buffer, int count);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ package edu.wpi.first.hal.simulation;
|
||||
|
||||
import edu.wpi.first.hal.HALValue;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface NotifyCallback {
|
||||
void callback(String name, HALValue value);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
package edu.wpi.first.hal.simulation;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface SpiReadAutoReceiveBufferCallback {
|
||||
int callback(String name, int[] buffer, int numToRead);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.nio.ByteBuffer;
|
||||
{% endif %}
|
||||
/** NetworkTables {{ TypeName }} implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class {{ TypeName }}EntryImpl extends EntryBase implements {{ TypeName }}Entry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** NetworkTables generic subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface GenericSubscriber extends Subscriber, Supplier<NetworkTableValue> {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -9,7 +9,7 @@ package edu.wpi.first.networktables;
|
||||
import java.util.Objects;
|
||||
|
||||
/** A network table entry value. */
|
||||
@SuppressWarnings({"UnnecessaryParentheses", "PMD.MethodReturnsInternalArray"})
|
||||
@SuppressWarnings("UnnecessaryParentheses")
|
||||
public final class NetworkTableValue {
|
||||
NetworkTableValue(NetworkTableType type, Object value, long time, long serverTime) {
|
||||
m_type = type;
|
||||
@@ -176,7 +176,6 @@ public final class NetworkTableValue {
|
||||
return out;
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.AvoidArrayLoops")
|
||||
static double[] toNativeDoubleArray(Number[] arr) {
|
||||
double[] out = new double[arr.length];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
@@ -185,7 +184,6 @@ public final class NetworkTableValue {
|
||||
return out;
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.AvoidArrayLoops")
|
||||
static long[] toNativeIntegerArray(Number[] arr) {
|
||||
long[] out = new long[arr.length];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
@@ -194,7 +192,6 @@ public final class NetworkTableValue {
|
||||
return out;
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.AvoidArrayLoops")
|
||||
static float[] toNativeFloatArray(Number[] arr) {
|
||||
float[] out = new float[arr.length];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import {{ java.SupplierFunctionPackage|default('java.util.function') }}.{{ java.FunctionTypePrefix }}Supplier;
|
||||
|
||||
/** NetworkTables {{ TypeName }} subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface {{ TypeName }}Subscriber extends Subscriber, {{ java.FunctionTypePrefix }}Supplier{{ java.FunctionTypeSuffix }} {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped {{ TypeName }}. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class Timestamped{{ TypeName }} {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables BooleanArray implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class BooleanArrayEntryImpl extends EntryBase implements BooleanArrayEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** NetworkTables BooleanArray subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface BooleanArraySubscriber extends Subscriber, Supplier<boolean[]> {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables Boolean implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class BooleanEntryImpl extends EntryBase implements BooleanEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.BooleanSupplier;
|
||||
|
||||
/** NetworkTables Boolean subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface BooleanSubscriber extends Subscriber, BooleanSupplier {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables DoubleArray implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class DoubleArrayEntryImpl extends EntryBase implements DoubleArrayEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** NetworkTables DoubleArray subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface DoubleArraySubscriber extends Subscriber, Supplier<double[]> {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables Double implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class DoubleEntryImpl extends EntryBase implements DoubleEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.DoubleSupplier;
|
||||
|
||||
/** NetworkTables Double subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface DoubleSubscriber extends Subscriber, DoubleSupplier {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables FloatArray implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class FloatArrayEntryImpl extends EntryBase implements FloatArrayEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** NetworkTables FloatArray subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface FloatArraySubscriber extends Subscriber, Supplier<float[]> {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables Float implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class FloatEntryImpl extends EntryBase implements FloatEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import edu.wpi.first.util.function.FloatSupplier;
|
||||
|
||||
/** NetworkTables Float subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface FloatSubscriber extends Subscriber, FloatSupplier {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** NetworkTables generic subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface GenericSubscriber extends Subscriber, Supplier<NetworkTableValue> {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables IntegerArray implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class IntegerArrayEntryImpl extends EntryBase implements IntegerArrayEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** NetworkTables IntegerArray subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface IntegerArraySubscriber extends Subscriber, Supplier<long[]> {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables Integer implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class IntegerEntryImpl extends EntryBase implements IntegerEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.LongSupplier;
|
||||
|
||||
/** NetworkTables Integer subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface IntegerSubscriber extends Subscriber, LongSupplier {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -9,7 +9,7 @@ package edu.wpi.first.networktables;
|
||||
import java.util.Objects;
|
||||
|
||||
/** A network table entry value. */
|
||||
@SuppressWarnings({"UnnecessaryParentheses", "PMD.MethodReturnsInternalArray"})
|
||||
@SuppressWarnings("UnnecessaryParentheses")
|
||||
public final class NetworkTableValue {
|
||||
NetworkTableValue(NetworkTableType type, Object value, long time, long serverTime) {
|
||||
m_type = type;
|
||||
@@ -668,7 +668,6 @@ public final class NetworkTableValue {
|
||||
return out;
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.AvoidArrayLoops")
|
||||
static double[] toNativeDoubleArray(Number[] arr) {
|
||||
double[] out = new double[arr.length];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
@@ -677,7 +676,6 @@ public final class NetworkTableValue {
|
||||
return out;
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.AvoidArrayLoops")
|
||||
static long[] toNativeIntegerArray(Number[] arr) {
|
||||
long[] out = new long[arr.length];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
@@ -686,7 +684,6 @@ public final class NetworkTableValue {
|
||||
return out;
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.AvoidArrayLoops")
|
||||
static float[] toNativeFloatArray(Number[] arr) {
|
||||
float[] out = new float[arr.length];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/** NetworkTables Raw implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class RawEntryImpl extends EntryBase implements RawEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** NetworkTables Raw subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface RawSubscriber extends Subscriber, Supplier<byte[]> {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables StringArray implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class StringArrayEntryImpl extends EntryBase implements StringArrayEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** NetworkTables StringArray subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface StringArraySubscriber extends Subscriber, Supplier<String[]> {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables String implementation. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
final class StringEntryImpl extends EntryBase implements StringEntry {
|
||||
/**
|
||||
* Constructor.
|
||||
|
||||
@@ -9,7 +9,6 @@ package edu.wpi.first.networktables;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** NetworkTables String subscriber. */
|
||||
@SuppressWarnings("PMD.MissingOverride")
|
||||
public interface StringSubscriber extends Subscriber, Supplier<String> {
|
||||
/**
|
||||
* Get the corresponding topic.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped Boolean. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedBoolean {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped BooleanArray. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedBooleanArray {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped Double. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedDouble {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped DoubleArray. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedDoubleArray {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped Float. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedFloat {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped FloatArray. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedFloatArray {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped Integer. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedInteger {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped IntegerArray. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedIntegerArray {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped Raw. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedRaw {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped String. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedString {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
package edu.wpi.first.networktables;
|
||||
|
||||
/** NetworkTables timestamped StringArray. */
|
||||
@SuppressWarnings("PMD.ArrayIsStoredDirectly")
|
||||
public final class TimestampedStringArray {
|
||||
/**
|
||||
* Create a timestamped value.
|
||||
|
||||
@@ -8,6 +8,7 @@ import edu.wpi.first.util.sendable.Sendable;
|
||||
import edu.wpi.first.util.sendable.SendableBuilder;
|
||||
|
||||
/** Interface for NetworkTable Sendable objects. */
|
||||
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
|
||||
public interface NTSendable extends Sendable {
|
||||
/**
|
||||
* Initializes this {@link Sendable} object.
|
||||
|
||||
@@ -12,7 +12,6 @@ import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@SuppressWarnings("PMD.SimplifiableTestAssertion")
|
||||
class RawTest {
|
||||
private NetworkTableInstance m_inst;
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@ publishing {
|
||||
}
|
||||
|
||||
test {
|
||||
jvmArgs '--enable-native-access=ALL-UNNAMED'
|
||||
useJUnitPlatform()
|
||||
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
|
||||
testLogging {
|
||||
@@ -118,7 +119,7 @@ tasks.withType(JavaCompile).configureEach {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
|
||||
devImplementation sourceSets.main.output
|
||||
@@ -133,7 +134,7 @@ task run(type: JavaExec) {
|
||||
build.dependsOn devClasses
|
||||
|
||||
jacoco {
|
||||
toolVersion = "0.8.10"
|
||||
toolVersion = "0.8.13"
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
|
||||
@@ -5,7 +5,7 @@ if (project.hasProperty('skipJavaFormat')) {
|
||||
apply plugin: 'checkstyle'
|
||||
|
||||
checkstyle {
|
||||
toolVersion = "10.12.2"
|
||||
toolVersion = "11.0.0"
|
||||
configDirectory = file("${project.rootDir}/styleguide")
|
||||
config = resources.text.fromFile(new File(configDirectory.get().getAsFile(), "checkstyle.xml"))
|
||||
}
|
||||
@@ -13,7 +13,7 @@ checkstyle {
|
||||
apply plugin: 'pmd'
|
||||
|
||||
pmd {
|
||||
toolVersion = '7.2.0'
|
||||
toolVersion = '7.16.0'
|
||||
consoleOutput = true
|
||||
reportsDir = file("$project.buildDir/reports/pmd")
|
||||
ruleSetFiles = files(new File(rootDir, "styleguide/pmd-ruleset.xml"))
|
||||
@@ -40,7 +40,7 @@ spotless {
|
||||
exclude '**/build/**', '**/build-*/**', '**/bin/**'
|
||||
}
|
||||
greclipse()
|
||||
indentWithSpaces(4)
|
||||
leadingTabsToSpaces(4)
|
||||
trimTrailingWhitespace()
|
||||
endWithNewline()
|
||||
}
|
||||
@@ -60,7 +60,7 @@ spotless {
|
||||
}
|
||||
eclipseWtp('xml')
|
||||
trimTrailingWhitespace()
|
||||
indentWithSpaces(2)
|
||||
leadingTabsToSpaces(2)
|
||||
endWithNewline()
|
||||
}
|
||||
format 'misc', {
|
||||
@@ -69,7 +69,7 @@ spotless {
|
||||
exclude '**/build/**', '**/build-*/**', '**/bin/**'
|
||||
}
|
||||
trimTrailingWhitespace()
|
||||
indentWithSpaces(2)
|
||||
leadingTabsToSpaces(2)
|
||||
endWithNewline()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,13 @@
|
||||
|
||||
<description>PMD Ruleset for WPILib</description>
|
||||
|
||||
<exclude-pattern>.*/*JNI.*</exclude-pattern>
|
||||
<!-- Generated files -->
|
||||
<exclude-pattern>.*/*EntryImpl\.java</exclude-pattern>
|
||||
<exclude-pattern>.*/*Subscriber\.java</exclude-pattern>
|
||||
<exclude-pattern>.*/Timestamped.*\.java</exclude-pattern>
|
||||
|
||||
<exclude-pattern>.*/*IntegrationTests.*</exclude-pattern>
|
||||
<exclude-pattern>.*/*JNI.*</exclude-pattern>
|
||||
<exclude-pattern>.*/math/proto.*</exclude-pattern>
|
||||
|
||||
<rule ref="category/java/bestpractices.xml">
|
||||
@@ -18,18 +23,19 @@
|
||||
<exclude name="AvoidReassigningParameters" />
|
||||
<exclude name="AvoidUsingHardCodedIP" />
|
||||
<exclude name="ConstantsInInterface" />
|
||||
<exclude name="JUnitAssertionsShouldIncludeMessage" />
|
||||
<exclude name="JUnitTestContainsTooManyAsserts" />
|
||||
<exclude name="JUnitTestsShouldIncludeAssert" />
|
||||
<exclude name="JUnit4TestShouldUseAfterAnnotation" />
|
||||
<exclude name="JUnit4TestShouldUseBeforeAnnotation" />
|
||||
<exclude name="JUnit4TestShouldUseTestAnnotation" />
|
||||
<exclude name="ExhaustiveSwitchHasDefault" />
|
||||
<exclude name="LooseCoupling" />
|
||||
<exclude name="NonExhaustiveSwitch" />
|
||||
<exclude name="PreserveStackTrace" />
|
||||
<exclude name="ReplaceHashtableWithMap" />
|
||||
<exclude name="ReplaceVectorWithList" />
|
||||
<exclude name="SwitchStmtsShouldHaveDefault" />
|
||||
<exclude name="SystemPrintln" />
|
||||
<exclude name="UnitTestAssertionsShouldIncludeMessage" />
|
||||
<exclude name="UnitTestContainsTooManyAsserts" />
|
||||
<exclude name="UnitTestShouldIncludeAssert" />
|
||||
<exclude name="UnitTestShouldUseAfterAnnotation" />
|
||||
<exclude name="UnitTestShouldUseBeforeAnnotation" />
|
||||
<exclude name="UnitTestShouldUseTestAnnotation" />
|
||||
<exclude name="UseVarargs" />
|
||||
</rule>
|
||||
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod">
|
||||
@@ -45,8 +51,8 @@
|
||||
</rule>
|
||||
|
||||
<rule ref="category/java/design.xml">
|
||||
<exclude name="AvoidThrowingRawExceptionTypes" />
|
||||
<exclude name="AvoidThrowingNewInstanceOfSameException" />
|
||||
<exclude name="AvoidThrowingRawExceptionTypes" />
|
||||
<exclude name="CognitiveComplexity" />
|
||||
<exclude name="CouplingBetweenObjects" />
|
||||
<exclude name="CyclomaticComplexity" />
|
||||
@@ -82,6 +88,7 @@
|
||||
|
||||
<rule ref="category/java/multithreading.xml">
|
||||
<exclude name="AvoidSynchronizedAtMethodLevel" />
|
||||
<exclude name="AvoidSynchronizedStatement" />
|
||||
<exclude name="AvoidUsingVolatile" />
|
||||
<exclude name="DoNotUseThreads" />
|
||||
<exclude name="UseConcurrentHashMap" />
|
||||
|
||||
@@ -1,5 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<FindBugsFilter>
|
||||
<Match>
|
||||
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.DriverStation" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.Ultrasonic" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_NONATOMIC_64BIT_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.Watchdog" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16448_IMU" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.ADIS16470_IMU" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.DriverStation" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.GenericHID" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.Ultrasonic" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj.motorcontrol.NidecBrushless" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="AT_STALE_THREAD_WRITE_OF_PRIMITIVE" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.CommandScheduler" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="CT_CONSTRUCTOR_THROW" />
|
||||
</Match>
|
||||
@@ -30,12 +70,21 @@
|
||||
<Match>
|
||||
<Bug pattern="EI_EXPOSE_REP2" />
|
||||
</Match>
|
||||
<!--
|
||||
Strict reading of Object.equals() contract means that whenever equals() behaviour is defined, all implementations
|
||||
need to adhere to it. The only reason to override the method (assuming correct API design, of course) is to provide
|
||||
a more efficient implementation. This rule would be forcing a @SuppressFBWarnings on perfectly compliant classes.
|
||||
More information at https://github.com/spotbugs/spotbugs/issues/511
|
||||
-->
|
||||
<Match>
|
||||
<Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="FL_FLOATS_AS_LOOP_COUNTERS" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="IS2_INCONSISTENT_SYNC" />
|
||||
<Source name="MechanismLigament2d.java" />
|
||||
<Class name="edu.wpi.first.wpilibj.smartdashboard.MechanismLigament2d" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="MS_CANNOT_BE_FINAL" />
|
||||
@@ -49,50 +98,81 @@
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NM_CLASS_NAMING_CONVENTION" />
|
||||
<Source name="FRCNetComm.java" />
|
||||
<Class name="edu.wpi.first.hal.FRCNetComm$tInstances" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NM_CLASS_NAMING_CONVENTION" />
|
||||
<Class name="edu.wpi.first.hal.FRCNetComm$tResourceType" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="ParallelCommandGroup.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelCommandGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="ParallelDeadlineGroup.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelDeadlineGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="ParallelRaceGroup.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ParallelRaceGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="ProxyScheduleCommand.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.ProxyScheduleCommand" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="SequentialCommandGroup.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.SequentialCommandGroup" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="NS_DANGEROUS_NON_SHORT_CIRCUIT" />
|
||||
<Source name="SelectCommand.java" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.SelectCommand" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="PA_PUBLIC_PRIMITIVE_ATTRIBUTE" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
|
||||
<Source name="AntJunitLauncher.java" />
|
||||
<Class name="edu.wpi.first.wpilibj.test.AntJunitLauncher" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
|
||||
<Source name="CombinedRuntimeLoader.java" />
|
||||
<Class name="edu.wpi.first.util.CombinedRuntimeLoader" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED" />
|
||||
<Class name="edu.wpi.first.networktables.NetworkTableInstance" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SC_START_IN_CTOR" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SF_SWITCH_FALLTHROUGH" />
|
||||
<Source name="CameraServer.java" />
|
||||
<Class name="edu.wpi.first.cameraserver.CameraServer$PropertyPublisher" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_GETTER_NOT_SYNCHRONIZED" />
|
||||
<Class name="edu.wpi.first.wpilibj.test.TestSuite" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.wpilibj.test.TestSuite" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.wpilibj2.command.CommandScheduler" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.math.geometry.CoordinateAxis" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SING_SINGLETON_HAS_NONPRIVATE_CONSTRUCTOR" />
|
||||
<Class name="edu.wpi.first.math.geometry.CoordinateSystem" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA" />
|
||||
<Source name="Ultrasonic.java" />
|
||||
<Class name="edu.wpi.first.wpilibj.Ultrasonic" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
|
||||
@@ -141,27 +221,11 @@
|
||||
<Match>
|
||||
<Bug pattern="URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SC_START_IN_CTOR" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED" />
|
||||
<Class name="edu.wpi.first.networktables.NetworkTableInstance" />
|
||||
</Match>
|
||||
<!--
|
||||
Strict reading of Object.equals() contract means that whenever equals() behaviour is defined, all implementations
|
||||
need to adhere to it. The only reason to override the method (assuming correct API design, of course) is to provide
|
||||
a more efficient implementation. This rule would be forcing a @SuppressFBWarnings on perfectly compliant classes.
|
||||
More information at https://github.com/spotbugs/spotbugs/issues/511
|
||||
-->
|
||||
<Match>
|
||||
<Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="UUF_UNUSED_PUBLIC_OR_PROTECTED_FIELD" />
|
||||
<Class name="edu.wpi.first.epilogue.EpilogueConfiguration" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE" />
|
||||
</Match>
|
||||
</FindBugsFilter>
|
||||
|
||||
@@ -42,7 +42,6 @@ public class ParallelRaceGroup extends Command {
|
||||
*
|
||||
* @param commands Commands to add to the group.
|
||||
*/
|
||||
@SuppressWarnings("PMD.UseArraysAsList")
|
||||
public final void addCommands(Command... commands) {
|
||||
if (!m_finished) {
|
||||
throw new IllegalStateException(
|
||||
|
||||
@@ -39,6 +39,7 @@ DigitalGlitchFilter::~DigitalGlitchFilter() {
|
||||
if (m_channelIndex >= 0) {
|
||||
std::scoped_lock lock(m_mutex);
|
||||
m_filterAllocated[m_channelIndex] = false;
|
||||
m_channelIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import edu.wpi.first.util.sendable.SendableBuilder;
|
||||
// CHECKSTYLE.OFF: EmptyCatchBlock
|
||||
|
||||
/** This class is for the ADIS16448 IMU that connects to the RoboRIO MXP port. */
|
||||
@SuppressWarnings({"PMD.RedundantFieldInitializer", "PMD.ImmutableField"})
|
||||
@SuppressWarnings({"PMD.RedundantFieldInitializer", "PMD.ImmutableField", "PMD.UnusedPrivateField"})
|
||||
public class ADIS16448_IMU implements AutoCloseable, Sendable {
|
||||
// ADIS16448 Register Map Declaration
|
||||
private static final int FLASH_CNT = 0x00; // Flash memory write count
|
||||
|
||||
@@ -20,7 +20,7 @@ import edu.wpi.first.util.sendable.SendableBuilder;
|
||||
// CHECKSTYLE.OFF: EmptyCatchBlock
|
||||
|
||||
/** This class is for the ADIS16470 IMU that connects to the RoboRIO SPI port. */
|
||||
@SuppressWarnings("PMD.RedundantFieldInitializer")
|
||||
@SuppressWarnings({"PMD.RedundantFieldInitializer", "PMD.UnusedPrivateField"})
|
||||
public class ADIS16470_IMU implements AutoCloseable, Sendable {
|
||||
/* ADIS16470 Register Map Declaration */
|
||||
private static final int FLASH_CNT = 0x00; // Flash memory write count
|
||||
|
||||
@@ -8,6 +8,7 @@ import edu.wpi.first.util.sendable.Sendable;
|
||||
import edu.wpi.first.util.sendable.SendableBuilder;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import java.util.Comparator;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -186,7 +187,7 @@ public class Alert implements AutoCloseable {
|
||||
private static final class SendableAlerts implements Sendable {
|
||||
private static final Map<String, SendableAlerts> groups = new HashMap<String, SendableAlerts>();
|
||||
|
||||
private final Map<AlertType, Set<PublishedAlert>> m_alerts = new HashMap<>();
|
||||
private final EnumMap<AlertType, Set<PublishedAlert>> m_alerts = new EnumMap<>(AlertType.class);
|
||||
|
||||
/**
|
||||
* Returns a reference to the set of active alerts for the given type.
|
||||
|
||||
@@ -38,11 +38,10 @@ public class DigitalGlitchFilter implements Sendable, AutoCloseable {
|
||||
m_mutex.lock();
|
||||
try {
|
||||
m_filterAllocated[m_channelIndex] = false;
|
||||
m_channelIndex = -1;
|
||||
} finally {
|
||||
m_mutex.unlock();
|
||||
}
|
||||
|
||||
m_channelIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -285,7 +285,6 @@ public final class DriverStation {
|
||||
System.arraycopy(axes.m_axes, 0, m_prevAxes.m_axes, 0, count);
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.AvoidArrayLoops")
|
||||
void appendPOVs(HALJoystickPOVs povs, long timestamp) {
|
||||
int count = povs.m_count;
|
||||
if (m_sizedPOVs == null || m_sizedPOVs.length != count) {
|
||||
|
||||
@@ -70,7 +70,6 @@ public class GenericHID {
|
||||
/** HIDType value. */
|
||||
public final int value;
|
||||
|
||||
@SuppressWarnings("PMD.UseConcurrentHashMap")
|
||||
private static final Map<Integer, HIDType> map = new HashMap<>();
|
||||
|
||||
HIDType(int value) {
|
||||
|
||||
@@ -40,6 +40,7 @@ public class I2C implements AutoCloseable {
|
||||
|
||||
private final int m_port;
|
||||
private final int m_deviceAddress;
|
||||
private ByteBuffer m_readDataToSendBuffer;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@@ -265,8 +266,6 @@ public class I2C implements AutoCloseable {
|
||||
return transaction(registerAddressArray, registerAddressArray.length, buffer, count);
|
||||
}
|
||||
|
||||
private ByteBuffer m_readDataToSendBuffer;
|
||||
|
||||
/**
|
||||
* Execute a read transaction with the device.
|
||||
*
|
||||
|
||||
@@ -96,29 +96,36 @@ public abstract class RobotBase implements AutoCloseable {
|
||||
@Override
|
||||
public void reportUsage(MathUsageId id, int count) {
|
||||
switch (id) {
|
||||
case kKinematics_DifferentialDrive -> HAL.report(
|
||||
tResourceType.kResourceType_Kinematics, tInstances.kKinematics_DifferentialDrive);
|
||||
case kKinematics_MecanumDrive -> HAL.report(
|
||||
tResourceType.kResourceType_Kinematics, tInstances.kKinematics_MecanumDrive);
|
||||
case kKinematics_SwerveDrive -> HAL.report(
|
||||
tResourceType.kResourceType_Kinematics, tInstances.kKinematics_SwerveDrive);
|
||||
case kTrajectory_TrapezoidProfile -> HAL.report(
|
||||
tResourceType.kResourceType_TrapezoidProfile, count);
|
||||
case kKinematics_DifferentialDrive ->
|
||||
HAL.report(
|
||||
tResourceType.kResourceType_Kinematics,
|
||||
tInstances.kKinematics_DifferentialDrive);
|
||||
case kKinematics_MecanumDrive ->
|
||||
HAL.report(
|
||||
tResourceType.kResourceType_Kinematics, tInstances.kKinematics_MecanumDrive);
|
||||
case kKinematics_SwerveDrive ->
|
||||
HAL.report(
|
||||
tResourceType.kResourceType_Kinematics, tInstances.kKinematics_SwerveDrive);
|
||||
case kTrajectory_TrapezoidProfile ->
|
||||
HAL.report(tResourceType.kResourceType_TrapezoidProfile, count);
|
||||
case kFilter_Linear -> HAL.report(tResourceType.kResourceType_LinearFilter, count);
|
||||
case kOdometry_DifferentialDrive -> HAL.report(
|
||||
tResourceType.kResourceType_Odometry, tInstances.kOdometry_DifferentialDrive);
|
||||
case kOdometry_SwerveDrive -> HAL.report(
|
||||
tResourceType.kResourceType_Odometry, tInstances.kOdometry_SwerveDrive);
|
||||
case kOdometry_MecanumDrive -> HAL.report(
|
||||
tResourceType.kResourceType_Odometry, tInstances.kOdometry_MecanumDrive);
|
||||
case kController_PIDController2 -> HAL.report(
|
||||
tResourceType.kResourceType_PIDController2, count);
|
||||
case kController_ProfiledPIDController -> HAL.report(
|
||||
tResourceType.kResourceType_ProfiledPIDController, count);
|
||||
case kController_BangBangController -> HAL.report(
|
||||
tResourceType.kResourceType_BangBangController, count);
|
||||
case kTrajectory_PathWeaver -> HAL.report(
|
||||
tResourceType.kResourceType_PathWeaverTrajectory, count);
|
||||
case kOdometry_DifferentialDrive ->
|
||||
HAL.report(
|
||||
tResourceType.kResourceType_Odometry, tInstances.kOdometry_DifferentialDrive);
|
||||
case kOdometry_SwerveDrive ->
|
||||
HAL.report(
|
||||
tResourceType.kResourceType_Odometry, tInstances.kOdometry_SwerveDrive);
|
||||
case kOdometry_MecanumDrive ->
|
||||
HAL.report(
|
||||
tResourceType.kResourceType_Odometry, tInstances.kOdometry_MecanumDrive);
|
||||
case kController_PIDController2 ->
|
||||
HAL.report(tResourceType.kResourceType_PIDController2, count);
|
||||
case kController_ProfiledPIDController ->
|
||||
HAL.report(tResourceType.kResourceType_ProfiledPIDController, count);
|
||||
case kController_BangBangController ->
|
||||
HAL.report(tResourceType.kResourceType_BangBangController, count);
|
||||
case kTrajectory_PathWeaver ->
|
||||
HAL.report(tResourceType.kResourceType_PathWeaverTrajectory, count);
|
||||
default -> {
|
||||
// NOP
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import edu.wpi.first.hal.InterruptJNI;
|
||||
* <p>Asynchronous interrupts are handled by the AsynchronousInterrupt class.
|
||||
*/
|
||||
public class SynchronousInterrupt implements AutoCloseable {
|
||||
@SuppressWarnings("PMD.SingularField")
|
||||
private final DigitalSource m_source;
|
||||
|
||||
private final int m_handle;
|
||||
|
||||
@@ -44,7 +44,6 @@ public class Ultrasonic implements Sendable, AutoCloseable {
|
||||
private static Thread m_task;
|
||||
private static int m_instances;
|
||||
|
||||
@SuppressWarnings("PMD.SingularField")
|
||||
private SimDevice m_simDevice;
|
||||
|
||||
private SimBoolean m_simRangeValid;
|
||||
|
||||
@@ -10,6 +10,7 @@ package edu.wpi.first.wpilibj.shuffleboard;
|
||||
*
|
||||
* @see BuiltInWidgets the built-in widget types
|
||||
*/
|
||||
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
|
||||
public interface LayoutType {
|
||||
/**
|
||||
* Gets the string type of the layout as defined by that layout in Shuffleboard.
|
||||
|
||||
@@ -10,6 +10,7 @@ package edu.wpi.first.wpilibj.shuffleboard;
|
||||
*
|
||||
* @see BuiltInWidgets the built-in widget types
|
||||
*/
|
||||
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
|
||||
public interface WidgetType {
|
||||
/**
|
||||
* Gets the string type of the widget as defined by that widget in Shuffleboard.
|
||||
|
||||
@@ -7,16 +7,19 @@ package edu.wpi.first.wpilibj.simulation;
|
||||
/** Manages simulation callbacks; each object is associated with a callback. */
|
||||
public class CallbackStore implements AutoCloseable {
|
||||
/** <b>Note: This interface is for simulation classes only. It should not be used by teams!</b> */
|
||||
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
|
||||
interface CancelCallbackFunc {
|
||||
void cancel(int index, int uid);
|
||||
}
|
||||
|
||||
/** <b>Note: This interface is for simulation classes only. It should not be used by teams!</b> */
|
||||
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
|
||||
interface CancelCallbackChannelFunc {
|
||||
void cancel(int index, int channel, int uid);
|
||||
}
|
||||
|
||||
/** <b>Note: This interface is for simulation classes only. It should not be used by teams!</b> */
|
||||
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
|
||||
interface CancelCallbackNoIndexFunc {
|
||||
void cancel(int uid);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ import java.util.function.LongSupplier;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/** Implementation detail for SendableBuilder. */
|
||||
@SuppressWarnings("PMD.CompareObjectsWithEquals")
|
||||
public class SendableBuilderImpl implements NTSendableBuilder {
|
||||
@FunctionalInterface
|
||||
private interface TimedConsumer<T> {
|
||||
|
||||
@@ -30,7 +30,6 @@ public final class SmartDashboard {
|
||||
/**
|
||||
* A table linking tables in the SmartDashboard to the {@link Sendable} objects they came from.
|
||||
*/
|
||||
@SuppressWarnings("PMD.UseConcurrentHashMap")
|
||||
private static final Map<String, Sendable> tablesToData = new HashMap<>();
|
||||
|
||||
/** The executor for listener tasks; calls listener tasks synchronously from main thread. */
|
||||
|
||||
@@ -103,18 +103,21 @@ class AddressableLEDBufferTest {
|
||||
buffer.forEach(
|
||||
(index, r, g, b) -> {
|
||||
switch (index) {
|
||||
case 0 -> assertAll(
|
||||
() -> assertEquals(1, r, "red at index 0"),
|
||||
() -> assertEquals(2, g, "green at index 0"),
|
||||
() -> assertEquals(3, b, "blue at index 0"));
|
||||
case 1 -> assertAll(
|
||||
() -> assertEquals(4, r, "red at index 1"),
|
||||
() -> assertEquals(5, g, "green at index 1"),
|
||||
() -> assertEquals(6, b, "blue at index 1"));
|
||||
case 2 -> assertAll(
|
||||
() -> assertEquals(7, r, "red at index 2"),
|
||||
() -> assertEquals(8, g, "green at index 2"),
|
||||
() -> assertEquals(9, b, "blue at index 2"));
|
||||
case 0 ->
|
||||
assertAll(
|
||||
() -> assertEquals(1, r, "red at index 0"),
|
||||
() -> assertEquals(2, g, "green at index 0"),
|
||||
() -> assertEquals(3, b, "blue at index 0"));
|
||||
case 1 ->
|
||||
assertAll(
|
||||
() -> assertEquals(4, r, "red at index 1"),
|
||||
() -> assertEquals(5, g, "green at index 1"),
|
||||
() -> assertEquals(6, b, "blue at index 1"));
|
||||
case 2 ->
|
||||
assertAll(
|
||||
() -> assertEquals(7, r, "red at index 2"),
|
||||
() -> assertEquals(8, g, "green at index 2"),
|
||||
() -> assertEquals(9, b, "blue at index 2"));
|
||||
default -> fail("Unexpected index " + index);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -27,12 +27,12 @@ dependencies {
|
||||
implementation project(':epilogue-runtime')
|
||||
annotationProcessor project(':epilogue-processor')
|
||||
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion = "0.8.10"
|
||||
toolVersion = "0.8.13"
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
|
||||
@@ -9,7 +9,7 @@ import edu.wpi.first.wpilibj2.command.Command;
|
||||
|
||||
/** An example command that uses an example subsystem. */
|
||||
public class ExampleCommand extends Command {
|
||||
@SuppressWarnings({"PMD.UnusedPrivateField", "PMD.SingularField"})
|
||||
@SuppressWarnings("PMD.UnusedPrivateField")
|
||||
private final ExampleSubsystem m_subsystem;
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,7 @@ import edu.wpi.first.wpilibj2.command.Command;
|
||||
|
||||
/** An example command that uses an example subsystem. */
|
||||
public class ExampleCommand extends Command {
|
||||
@SuppressWarnings({"PMD.UnusedPrivateField", "PMD.SingularField"})
|
||||
@SuppressWarnings("PMD.UnusedPrivateField")
|
||||
private final RomiDrivetrain m_subsystem;
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,7 +9,7 @@ import edu.wpi.first.wpilibj2.command.Command;
|
||||
|
||||
/** An example command that uses an example subsystem. */
|
||||
public class ExampleCommand extends Command {
|
||||
@SuppressWarnings({"PMD.UnusedPrivateField", "PMD.SingularField"})
|
||||
@SuppressWarnings("PMD.UnusedPrivateField")
|
||||
private final XRPDrivetrain m_subsystem;
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,7 @@ import edu.wpi.first.math.numbers.N{{ num }};
|
||||
*
|
||||
* @param <T> The {@link Num} this represents.
|
||||
*/
|
||||
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
|
||||
public interface Nat<T extends Num> {
|
||||
/**
|
||||
* The number this interface represents.
|
||||
|
||||
@@ -37,6 +37,7 @@ import edu.wpi.first.math.numbers.N20;
|
||||
*
|
||||
* @param <T> The {@link Num} this represents.
|
||||
*/
|
||||
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
|
||||
public interface Nat<T extends Num> {
|
||||
/**
|
||||
* The number this interface represents.
|
||||
|
||||
@@ -11,6 +11,7 @@ package edu.wpi.first.math.interpolation;
|
||||
*
|
||||
* @param <T> The class that is interpolatable.
|
||||
*/
|
||||
@SuppressWarnings("PMD.ImplicitFunctionalInterface")
|
||||
public interface Interpolatable<T> {
|
||||
/**
|
||||
* Return the interpolated value. This object is assumed to be the starting position, or lower
|
||||
|
||||
@@ -226,7 +226,7 @@ public final class SplineHelper {
|
||||
* @param splines An array of un-optimized quintic splines.
|
||||
* @return An array of optimized quintic splines.
|
||||
*/
|
||||
@SuppressWarnings({"LocalVariableName", "PMD.AvoidInstantiatingObjectsInLoops"})
|
||||
@SuppressWarnings("LocalVariableName")
|
||||
public static QuinticHermiteSpline[] optimizeCurvature(QuinticHermiteSpline[] splines) {
|
||||
// If there's only spline in the array, we can't optimize anything so just return that.
|
||||
if (splines.length < 2) {
|
||||
|
||||
@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
|
||||
import static edu.wpi.first.units.Units.*;
|
||||
import edu.wpi.first.units.*;
|
||||
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
|
||||
public record Immutable{{ helpers['type_decl'](name) }}(double magnitude, double baseUnitMagnitude, {{ helpers['mtou'](name) }} unit) implements {{ helpers['type_usage'](name) }} {
|
||||
@Override
|
||||
public {{ helpers['type_usage'](name) }} copy() {
|
||||
|
||||
@@ -10,7 +10,7 @@ import static edu.wpi.first.units.Units.*;
|
||||
import edu.wpi.first.units.*;
|
||||
import edu.wpi.first.units.mutable.MutableMeasureBase;
|
||||
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
|
||||
public final class Mut{{ helpers['type_decl'](name) }}
|
||||
extends MutableMeasureBase<{{ helpers['mtou'](name) }}, {{ helpers['type_usage'](name) }}, Mut{{ helpers['type_usage'](name) }}>
|
||||
implements {{ helpers['type_usage'](name) }} {
|
||||
|
||||
@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
|
||||
import static edu.wpi.first.units.Units.*;
|
||||
import edu.wpi.first.units.*;
|
||||
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
|
||||
public record ImmutableAcceleration<D extends Unit>(double magnitude, double baseUnitMagnitude, AccelerationUnit<D> unit) implements Acceleration<D> {
|
||||
@Override
|
||||
public Acceleration<D> copy() {
|
||||
|
||||
@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
|
||||
import static edu.wpi.first.units.Units.*;
|
||||
import edu.wpi.first.units.*;
|
||||
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
|
||||
public record ImmutableAngle(double magnitude, double baseUnitMagnitude, AngleUnit unit) implements Angle {
|
||||
@Override
|
||||
public Angle copy() {
|
||||
|
||||
@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
|
||||
import static edu.wpi.first.units.Units.*;
|
||||
import edu.wpi.first.units.*;
|
||||
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
|
||||
public record ImmutableAngularAcceleration(double magnitude, double baseUnitMagnitude, AngularAccelerationUnit unit) implements AngularAcceleration {
|
||||
@Override
|
||||
public AngularAcceleration copy() {
|
||||
|
||||
@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
|
||||
import static edu.wpi.first.units.Units.*;
|
||||
import edu.wpi.first.units.*;
|
||||
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
|
||||
public record ImmutableAngularMomentum(double magnitude, double baseUnitMagnitude, AngularMomentumUnit unit) implements AngularMomentum {
|
||||
@Override
|
||||
public AngularMomentum copy() {
|
||||
|
||||
@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
|
||||
import static edu.wpi.first.units.Units.*;
|
||||
import edu.wpi.first.units.*;
|
||||
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
|
||||
public record ImmutableAngularVelocity(double magnitude, double baseUnitMagnitude, AngularVelocityUnit unit) implements AngularVelocity {
|
||||
@Override
|
||||
public AngularVelocity copy() {
|
||||
|
||||
@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
|
||||
import static edu.wpi.first.units.Units.*;
|
||||
import edu.wpi.first.units.*;
|
||||
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
|
||||
public record ImmutableCurrent(double magnitude, double baseUnitMagnitude, CurrentUnit unit) implements Current {
|
||||
@Override
|
||||
public Current copy() {
|
||||
|
||||
@@ -9,7 +9,7 @@ package edu.wpi.first.units.measure;
|
||||
import static edu.wpi.first.units.Units.*;
|
||||
import edu.wpi.first.units.*;
|
||||
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle", "PMD"})
|
||||
@SuppressWarnings({"unchecked", "cast", "checkstyle"})
|
||||
public record ImmutableDimensionless(double magnitude, double baseUnitMagnitude, DimensionlessUnit unit) implements Dimensionless {
|
||||
@Override
|
||||
public Dimensionless copy() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user