button bindings and new thing #284
build.yml
on: push
Compile Java
1m 4s
Test Java
1m 15s
Check Format Java
47s
Lint
10s
Annotations
2 errors and 10 warnings
This class has only private constructors and may be final:
src/main/java/frc/robot/extras/debug/Alert.java#L101
Reports classes that may be made final because they cannot be extended from outside
their compilation unit anyway. This is because all their constructors are private,
so a subclass could not call the super constructor.
ClassWithOnlyPrivateConstructorsShouldBeFinal (Priority: 1, Ruleset: Design)
https://docs.pmd-code.org/pmd-doc-7.6.0/pmd_rules_java_design.html#classwithonlyprivateconstructorsshouldbefinal
|
Check Format Java
Process completed with exit code 1.
|
Avoid unused local variables such as 'driverRightDirectionPad'.:
src/main/java/frc/robot/RobotContainer.java#L129
Detects when a local variable is declared and/or assigned, but not used.
Variables whose name starts with `ignored` or `unused` are filtered out.
UnusedLocalVariable (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.6.0/pmd_rules_java_bestpractices.html#unusedlocalvariable
|
Avoid unused local variables such as 'driverDownDirectionPad'.:
src/main/java/frc/robot/RobotContainer.java#L130
Detects when a local variable is declared and/or assigned, but not used.
Variables whose name starts with `ignored` or `unused` are filtered out.
UnusedLocalVariable (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.6.0/pmd_rules_java_bestpractices.html#unusedlocalvariable
|
Avoid unused local variables such as 'driverLeftDirectionPad'.:
src/main/java/frc/robot/RobotContainer.java#L131
Detects when a local variable is declared and/or assigned, but not used.
Variables whose name starts with `ignored` or `unused` are filtered out.
UnusedLocalVariable (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.6.0/pmd_rules_java_bestpractices.html#unusedlocalvariable
|
Perhaps 'isRed' could be replaced by a local variable.:
src/main/java/frc/robot/commands/autodrive/AutoAlignWithAmp.java#L23
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.6.0/pmd_rules_java_design.html#singularfield
|
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.6.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.6.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.6.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.6.0/pmd_rules_java_performance.html#redundantfieldinitializer
|
Field 'speed' may be declared final:
src/main/java/frc/robot/commands/elevator/ManualElevator.java#L13
Reports non-final fields whose value never changes once object initialization ends,
and hence may be marked final.
Note that this rule does not enforce that the field value be deeply immutable itself.
An object can still have mutable state, even if all its member fields are declared final.
This is referred to as shallow immutability. For more information on mutability,
see *Effective Java, 3rd Edition, Item 17: Minimize mutability*.
Limitations: We can only check private fields for now.
ImmutableField (Priority: 3, Ruleset: Design)
https://docs.pmd-code.org/pmd-doc-7.6.0/pmd_rules_java_design.html#immutablefield
|
Field 'direction' may be declared final:
src/main/java/frc/robot/commands/intake/ManualIntake.java#L13
Reports non-final fields whose value never changes once object initialization ends,
and hence may be marked final.
Note that this rule does not enforce that the field value be deeply immutable itself.
An object can still have mutable state, even if all its member fields are declared final.
This is referred to as shallow immutability. For more information on mutability,
see *Effective Java, 3rd Edition, Item 17: Minimize mutability*.
Limitations: We can only check private fields for now.
ImmutableField (Priority: 3, Ruleset: Design)
https://docs.pmd-code.org/pmd-doc-7.6.0/pmd_rules_java_design.html#immutablefield
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
PMD Report
|
16.4 KB |
|