Skip to content

Refactor SwerveDrive to use DriveConstants for kinematics and remove … #172

Refactor SwerveDrive to use DriveConstants for kinematics and remove …

Refactor SwerveDrive to use DriveConstants for kinematics and remove … #172

Triggered via push December 31, 2024 20:57
Status Failure
Total duration 1m 24s
Artifacts 1

build.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

1 error and 14 warnings
Check Format Java
Process completed with exit code 1.
Lint
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Use one line for each declaration, it enhances code readability.: src/main/java/frc/robot/commands/drive/DriveCommand.java#L15
Java allows the use of several variables declaration of the same type on one line. However, it can lead to quite messy code. This rule looks for several declarations on the same line. OneDeclarationPerLine (Priority: 4, Ruleset: Best Practices) https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_bestpractices.html#onedeclarationperline
Use one line for each declaration, it enhances code readability.: src/main/java/frc/robot/commands/drive/DriveCommand.java#L16
Java allows the use of several variables declaration of the same type on one line. However, it can lead to quite messy code. This rule looks for several declarations on the same line. OneDeclarationPerLine (Priority: 4, Ruleset: Best Practices) https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_bestpractices.html#onedeclarationperline
Perhaps 'angularSpeed' could be replaced by a local variable.: src/main/java/frc/robot/commands/drive/DriveCommand.java#L17
Reports fields which may be converted to a local variable. This is so because in every method where the field is used, it is assigned before it is first read. Hence, the value that the field had before the method call may not be observed, so it might as well not be stored in the enclosing object. Limitations: * We can only check private fields for now. * The rule is not aware of threading, so it may cause false positives in concurrent code. Such FPs are best handled by suppression (see also the `ignoredAnnotations` property). SingularField (Priority: 3, Ruleset: Design) https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_design.html#singularfield
Avoid using redundant field initializer for 'lastTimeStampSeconds': src/main/java/frc/robot/commands/drive/DriveCommandBase.java#L22
Java will initialize fields with known default values so any explicit initialization of those same defaults is redundant and results in a larger class file (approximately three additional bytecode instructions per field). RedundantFieldInitializer (Priority: 3, Ruleset: Performance) https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_performance.html#redundantfieldinitializer
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty(): src/main/java/frc/robot/extras/characterization/FeedForwardCharacterization.java#L78
The isEmpty() method on java.util.Collection is provided to determine if a collection has any elements. Comparing the value of size() to 0 does not convey intent as well as the isEmpty() method. UseCollectionIsEmpty (Priority: 3, Ruleset: Best Practices) https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_bestpractices.html#usecollectionisempty
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty(): src/main/java/frc/robot/extras/characterization/FeedForwardCharacterization.java#L78
The isEmpty() method on java.util.Collection is provided to determine if a collection has any elements. Comparing the value of size() to 0 does not convey intent as well as the isEmpty() method. UseCollectionIsEmpty (Priority: 3, Ruleset: Best Practices) https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_bestpractices.html#usecollectionisempty
Do not add empty strings: src/main/java/frc/robot/extras/characterization/FeedForwardCharacterization.java#L89
The conversion of literals to strings by concatenating them with empty strings is inefficient. It is much better to use one of the type-specific `toString()` methods instead or `String.valueOf()`. AddEmptyString (Priority: 3, Ruleset: Performance) https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_performance.html#addemptystring
Do not add empty strings: src/main/java/frc/robot/extras/characterization/FeedForwardCharacterization.java#L123
The conversion of literals to strings by concatenating them with empty strings is inefficient. It is much better to use one of the type-specific `toString()` methods instead or `String.valueOf()`. AddEmptyString (Priority: 3, Ruleset: Performance) https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_performance.html#addemptystring
Avoid unused private fields such as 'dataRowSize'.: src/main/java/frc/robot/extras/interpolators/BilinearInterpolator.java#L8
Detects when a private field is declared and/or assigned a value, but not used. Since PMD 6.50.0 private fields are ignored, if the fields are annotated with any annotation or the enclosing class has any annotation. Annotations often enable a framework (such as dependency injection, mocking or e.g. Lombok) which use the fields by reflection or other means. This usage can't be detected by static code analysis. Previously these frameworks where explicitly allowed by listing their annotations in the property "ignoredAnnotations", but that turned out to be prone of false positive for any not explicitly considered framework. UnusedPrivateField (Priority: 3, Ruleset: Best Practices) https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_bestpractices.html#unusedprivatefield
The user-supplied array 'lookupTable' is stored directly.: src/main/java/frc/robot/extras/interpolators/BilinearInterpolator.java#L17
Constructors and methods receiving arrays should clone objects and store the copy. This prevents future changes from the user from affecting the original array. ArrayIsStoredDirectly (Priority: 3, Ruleset: Best Practices) https://docs.pmd-code.org/pmd-doc-7.9.0/pmd_rules_java_bestpractices.html#arrayisstoreddirectly
Check Format Java
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Compile Java
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Test Java
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636

Artifacts

Produced during runtime
Name Size
PMD Report
11.3 KB