mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Merge branch 'main' into 2027
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;
|
||||
|
||||
12
build.gradle
12
build.gradle
@@ -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.1.13' 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')
|
||||
@@ -82,7 +82,7 @@ task libraryBuild() {}
|
||||
build.dependsOn outputVersions
|
||||
|
||||
task copyAllOutputs(type: Copy) {
|
||||
destinationDir outputsFolder
|
||||
destinationDir = outputsFolder
|
||||
}
|
||||
|
||||
build.dependsOn copyAllOutputs
|
||||
@@ -171,5 +171,5 @@ ext.getCurrentArch = {
|
||||
}
|
||||
|
||||
wrapper {
|
||||
gradleVersion = '8.11'
|
||||
gradleVersion = '8.14.3'
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ repositories {
|
||||
url = 'https://frcmaven.wpi.edu/artifactory/ex-gradle'
|
||||
}
|
||||
mavenCentral()
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
url = "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -45,7 +45,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;
|
||||
@@ -65,7 +65,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);
|
||||
|
||||
@@ -31,7 +31,7 @@ model {
|
||||
|
||||
// Create the ZIP.
|
||||
def task = project.tasks.create("copyDataLogToolExecutable" + binary.targetPlatform.operatingSystem.name + binary.targetPlatform.architecture.name, Zip) {
|
||||
description("Copies the DataLogTool executable to the outputs directory.")
|
||||
description = "Copies the DataLogTool executable to the outputs directory."
|
||||
destinationDirectory = outputsFolder
|
||||
|
||||
archiveBaseName = zipBaseName
|
||||
@@ -117,7 +117,7 @@ model {
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId = artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
@@ -167,7 +167,7 @@ doxygen {
|
||||
tasks.register("zipCppDocs", Zip) {
|
||||
archiveBaseName = zipBaseNameCpp
|
||||
destinationDirectory = outputsFolder
|
||||
dependsOn doxygen
|
||||
dependsOn doxygenDox
|
||||
from ("$buildDir/docs/doxygen/html")
|
||||
into '/'
|
||||
}
|
||||
@@ -175,7 +175,7 @@ tasks.register("zipCppDocs", Zip) {
|
||||
// Java
|
||||
configurations {
|
||||
javaSource {
|
||||
transitive false
|
||||
transitive = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,15 +263,15 @@ publishing {
|
||||
artifact zipJavaDocs
|
||||
|
||||
artifactId = "${baseArtifactIdJava}"
|
||||
groupId artifactGroupIdJava
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupIdJava
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
cpp(MavenPublication) {
|
||||
artifact zipCppDocs
|
||||
|
||||
artifactId = "${baseArtifactIdCpp}"
|
||||
groupId artifactGroupIdCpp
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupIdCpp
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<>();
|
||||
|
||||
@@ -63,8 +63,8 @@ model {
|
||||
artifact cppSourcesZip
|
||||
|
||||
artifactId = "${baseArtifactId}-cpp"
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ model {
|
||||
|
||||
// Create the ZIP.
|
||||
def task = project.tasks.create("copyGlassExecutable" + binary.targetPlatform.operatingSystem.name + binary.targetPlatform.architecture.name, Zip) {
|
||||
description("Copies the Glass executable to the outputs directory.")
|
||||
description = "Copies the Glass executable to the outputs directory."
|
||||
destinationDirectory = outputsFolder
|
||||
|
||||
archiveBaseName = zipBaseName
|
||||
@@ -175,7 +175,7 @@ model {
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId = artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
libglass(MavenPublication) {
|
||||
libGlassTaskList.each { artifact it }
|
||||
@@ -185,7 +185,7 @@ model {
|
||||
|
||||
artifactId = libBaseArtifactId
|
||||
groupId = libArtifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
libglassnt(MavenPublication) {
|
||||
libGlassntTaskList.each { artifact it }
|
||||
@@ -195,7 +195,7 @@ model {
|
||||
|
||||
artifactId = libntBaseArtifactId
|
||||
groupId = libntArtifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
9
gradlew
vendored
9
gradlew
vendored
@@ -86,8 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -115,7 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -206,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
@@ -214,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
4
gradlew.bat
vendored
4
gradlew.bat
vendored
@@ -70,11 +70,11 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
@@ -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!");
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import org.gradle.nativeplatform.toolchain.internal.msvcpp.VisualStudioLocator
|
||||
import org.gradle.internal.os.OperatingSystem
|
||||
import org.gradle.util.VersionNumber
|
||||
|
||||
plugins {
|
||||
id 'cpp'
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -137,8 +137,8 @@ model {
|
||||
artifact cppHeadersZip
|
||||
|
||||
artifactId = "${baseArtifactId}-cpp"
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ model {
|
||||
|
||||
// Create the ZIP.
|
||||
def task = project.tasks.create("copyOutlineViewerExecutable" + binary.targetPlatform.operatingSystem.name + binary.targetPlatform.architecture.name, Zip) {
|
||||
description("Copies the OutlineViewer executable to the outputs directory.")
|
||||
description = "Copies the OutlineViewer executable to the outputs directory."
|
||||
destinationDirectory = outputsFolder
|
||||
|
||||
archiveBaseName = zipBaseName
|
||||
@@ -117,7 +117,7 @@ model {
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId = artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ model {
|
||||
|
||||
// Create the ZIP.
|
||||
def task = project.tasks.create("copyprocessstarterExecutable" + binary.targetPlatform.architecture.name, Zip) {
|
||||
description("Copies the processstarter executable to the outputs directory.")
|
||||
description = "Copies the processstarter executable to the outputs directory."
|
||||
destinationDirectory = outputsFolder
|
||||
|
||||
archiveBaseName = zipBaseName
|
||||
@@ -60,7 +60,7 @@ model {
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId = artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,6 +122,7 @@ task checkSnippets(type: Task) {
|
||||
}
|
||||
|
||||
task checkCommands(type: Task) {
|
||||
def isCppCommands = project.isCppCommands;
|
||||
doLast {
|
||||
def parsedJson = new groovy.json.JsonSlurper().parseText(commandFile.text)
|
||||
fileCheck(parsedJson, commandDirectory)
|
||||
@@ -132,7 +133,7 @@ task checkCommands(type: Task) {
|
||||
assert it.foldername != null
|
||||
assert it.replacename != null
|
||||
assert it.commandversion != null
|
||||
if (project.isCppCommands) {
|
||||
if (isCppCommands) {
|
||||
assert it.headers != null
|
||||
assert !it.headers.isEmpty()
|
||||
assert it.source != null
|
||||
|
||||
@@ -65,18 +65,19 @@ publishing {
|
||||
artifact javadocJar
|
||||
|
||||
artifactId = "${baseArtifactId}-java"
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
jvmArgs '--enable-native-access=ALL-UNNAMED'
|
||||
useJUnitPlatform()
|
||||
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
|
||||
testLogging {
|
||||
events "failed"
|
||||
exceptionFormat "full"
|
||||
exceptionFormat = "full"
|
||||
}
|
||||
finalizedBy jacocoTestReport
|
||||
}
|
||||
@@ -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.26.1"
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,8 +70,8 @@ model {
|
||||
artifact cppSourcesZip
|
||||
|
||||
artifactId = "${baseArtifactId}-cpp"
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,8 +85,8 @@ model {
|
||||
artifact cppSourcesZip
|
||||
|
||||
artifactId = "${baseArtifactId}-cpp"
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,8 +118,8 @@ model {
|
||||
}
|
||||
|
||||
artifactId = "${baseArtifactId}-jnicvstatic"
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,8 +56,8 @@ model {
|
||||
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,14 @@
|
||||
|
||||
<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>.*/units/measure/.*\.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 +24,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 +52,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 +89,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_EXPOSE_REP" />
|
||||
@@ -45,42 +94,69 @@
|
||||
</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="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD" />
|
||||
@@ -125,35 +201,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="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.Coordinate\w+" />
|
||||
<Bug pattern="VA_FORMAT_STRING_USES_NEWLINE" />
|
||||
</Match>
|
||||
</FindBugsFilter>
|
||||
|
||||
@@ -31,7 +31,7 @@ model {
|
||||
|
||||
// Create the macOS bundle.
|
||||
def bundleTask = project.tasks.create("bundleSysIdOsxApp" + binary.targetPlatform.architecture.name, Copy) {
|
||||
description("Creates a macOS application bundle for SysId")
|
||||
description = "Creates a macOS application bundle for SysId"
|
||||
from(file("$project.projectDir/Info.plist"))
|
||||
into(file("$project.buildDir/outputs/bundles/$binary.targetPlatform.architecture.name/SysId.app/Contents"))
|
||||
into("MacOS") {
|
||||
@@ -74,7 +74,7 @@ model {
|
||||
|
||||
// Create the ZIP.
|
||||
def task = project.tasks.create("copySysIdExecutable" + binary.targetPlatform.architecture.name, Zip) {
|
||||
description("Copies the SysId executable to the outputs directory.")
|
||||
description = "Copies the SysId executable to the outputs directory."
|
||||
destinationDirectory = outputsFolder
|
||||
|
||||
archiveBaseName = zipBaseName
|
||||
@@ -118,7 +118,7 @@ model {
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId = artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
4
thirdparty/googletest/publish.gradle
vendored
4
thirdparty/googletest/publish.gradle
vendored
@@ -54,8 +54,8 @@ model {
|
||||
artifact cppSourcesZip
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
4
thirdparty/imgui_suite/publish.gradle
vendored
4
thirdparty/imgui_suite/publish.gradle
vendored
@@ -85,8 +85,8 @@ model {
|
||||
artifact cppSourcesZip
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ model {
|
||||
|
||||
// Create the ZIP.
|
||||
def task = project.tasks.create("copywpicalExecutable" + binary.targetPlatform.operatingSystem.name + binary.targetPlatform.architecture.name, Zip) {
|
||||
description("Copies the wpical executable to the outputs directory.")
|
||||
description = "Copies the wpical executable to the outputs directory."
|
||||
destinationDirectory = outputsFolder
|
||||
|
||||
archiveBaseName = zipBaseName
|
||||
@@ -121,7 +121,7 @@ model {
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId = artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,8 +63,8 @@ model {
|
||||
artifact cppSourcesZip
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -69,8 +69,8 @@ model {
|
||||
artifact cppSourcesZip
|
||||
|
||||
artifactId = baseArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,24 +76,24 @@ publishing {
|
||||
artifact cppExamplesZip
|
||||
|
||||
artifactId = baseExamplesArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
|
||||
templates(MavenPublication) {
|
||||
artifact cppTemplatesZip
|
||||
|
||||
artifactId = baseTemplatesArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
|
||||
commands(MavenPublication) {
|
||||
artifact cppCommandsZip
|
||||
|
||||
artifactId = baseCommandsArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -359,7 +359,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) {
|
||||
|
||||
@@ -71,7 +71,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) {
|
||||
|
||||
@@ -35,6 +35,7 @@ public class I2C implements AutoCloseable {
|
||||
|
||||
private final int m_port;
|
||||
private final int m_deviceAddress;
|
||||
private ByteBuffer m_readDataToSendBuffer;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
@@ -254,8 +255,6 @@ public class I2C implements AutoCloseable {
|
||||
return transaction(registerAddressArray, registerAddressArray.length, buffer, count);
|
||||
}
|
||||
|
||||
private ByteBuffer m_readDataToSendBuffer;
|
||||
|
||||
/**
|
||||
* Execute a read transaction with the device.
|
||||
*
|
||||
|
||||
@@ -27,7 +27,6 @@ public class AddressableLEDSim {
|
||||
*
|
||||
* @param addressableLED AddressableLED to simulate
|
||||
*/
|
||||
@SuppressWarnings("PMD.UnusedFormalParameter")
|
||||
public AddressableLEDSim(AddressableLED addressableLED) {
|
||||
m_channel = addressableLED.getChannel();
|
||||
}
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -28,7 +28,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 {
|
||||
@@ -160,7 +160,7 @@ model {
|
||||
|
||||
new groovy.json.JsonSlurper().parseText(exampleFile.text).each { entry ->
|
||||
project.tasks.create("run${entry.foldername}", JavaExec) { run ->
|
||||
run.group "run examples"
|
||||
run.group = "run examples"
|
||||
run.mainClass = "edu.wpi.first.wpilibj.examples." + entry.foldername + "." + entry.mainclass
|
||||
run.classpath = sourceSets.main.runtimeClasspath
|
||||
run.dependsOn it.tasks.install
|
||||
@@ -172,7 +172,7 @@ model {
|
||||
}
|
||||
}
|
||||
project.tasks.create("test${entry.foldername}", Test) { testTask ->
|
||||
testTask.group "verification"
|
||||
testTask.group = "verification"
|
||||
testTask.useJUnitPlatform()
|
||||
testTask.filter {
|
||||
includeTestsMatching("edu.wpi.first.wpilibj.examples.${entry.foldername}.*")
|
||||
@@ -193,7 +193,7 @@ model {
|
||||
testTask.systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
|
||||
testTask.testLogging {
|
||||
events "failed"
|
||||
exceptionFormat "full"
|
||||
exceptionFormat = "full"
|
||||
}
|
||||
testTask.systemProperty 'java.library.path', filePath
|
||||
|
||||
@@ -205,7 +205,7 @@ model {
|
||||
}
|
||||
new groovy.json.JsonSlurper().parseText(snippetsFile.text).each { entry ->
|
||||
project.tasks.create("runSnippet${entry.foldername}", JavaExec) { run ->
|
||||
run.group "run snippets"
|
||||
run.group = "run snippets"
|
||||
run.mainClass = "edu.wpi.first.wpilibj.snippets." + entry.foldername + "." + entry.mainclass
|
||||
run.classpath = sourceSets.main.runtimeClasspath
|
||||
run.dependsOn it.tasks.install
|
||||
@@ -217,7 +217,7 @@ model {
|
||||
}
|
||||
}
|
||||
project.tasks.create("testSnippet${entry.foldername}", Test) { testTask ->
|
||||
testTask.group "verification"
|
||||
testTask.group = "verification"
|
||||
testTask.useJUnitPlatform()
|
||||
testTask.filter {
|
||||
includeTestsMatching("edu.wpi.first.wpilibj.snippets.${entry.foldername}.*")
|
||||
@@ -234,7 +234,7 @@ model {
|
||||
testTask.systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
|
||||
testTask.testLogging {
|
||||
events "failed"
|
||||
exceptionFormat "full"
|
||||
exceptionFormat = "full"
|
||||
}
|
||||
testTask.systemProperty 'java.library.path', filePath
|
||||
|
||||
|
||||
@@ -76,24 +76,24 @@ publishing {
|
||||
artifact javaExamplesZip
|
||||
|
||||
artifactId = baseExamplesArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
|
||||
templates(MavenPublication) {
|
||||
artifact javaTemplatesZip
|
||||
|
||||
artifactId = baseTemplatesArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
|
||||
commands(MavenPublication) {
|
||||
artifact javaCommandsZip
|
||||
|
||||
artifactId = baseCommandsArtifactId
|
||||
groupId artifactGroupId
|
||||
version wpilibVersioning.version.get()
|
||||
groupId = artifactGroupId
|
||||
version = wpilibVersioning.version.get()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user