climb pivot + algae flywheel #35
Open
Annotations
6 errors and 10 warnings
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/sim/simController/ClosedLoop.java#L46
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.10.0/pmd_rules_java_design.html#classwithonlyprivateconstructorsshouldbefinal
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/sim/simController/UnitSafeControl.java#L742
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.10.0/pmd_rules_java_design.html#classwithonlyprivateconstructorsshouldbefinal
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/sim/simField/SimArena.java#L107
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/sim/simField/SimGamePiece.java#L249
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.10.0/pmd_rules_java_design.html#classwithonlyprivateconstructorsshouldbefinal
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/sim/simField/SimGamePiece.java#L302
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/sim/simMechanism/simSwerve/SimSwerve.java#L72
Whenever using a log level, one should check if it is actually enabled, or
otherwise skip the associate String creation and manipulation, as well as any method calls.
An alternative to checking the log level are substituting parameters, formatters or lazy logging
with lambdas. The available alternatives depend on the actual logging framework.
GuardLogStatement (Priority: 2, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/Autos.java#L33
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.10.0/pmd_rules_java_bestpractices.html#unusedlocalvariable
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/Autos.java#L34
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.10.0/pmd_rules_java_bestpractices.html#unusedlocalvariable
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/Autos.java#L35
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.10.0/pmd_rules_java_bestpractices.html#unusedlocalvariable
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/Robot.java#L67
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.10.0/pmd_rules_java_bestpractices.html#unusedprivatefield
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/Robot.java#L68
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.10.0/pmd_rules_java_bestpractices.html#unusedprivatefield
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/commands/autodrive/AutoAlign.java#L20
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.10.0/pmd_rules_java_bestpractices.html#unusedprivatefield
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/commands/autodrive/AutoAlign.java#L22
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.10.0/pmd_rules_java_design.html#immutablefield
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/commands/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.10.0/pmd_rules_java_bestpractices.html#usecollectionisempty
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/commands/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.10.0/pmd_rules_java_bestpractices.html#usecollectionisempty
|
Run pmd/pmd-github-action@v2:
src/main/java/frc/robot/commands/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.10.0/pmd_rules_java_performance.html#addemptystring
|
Loading