auto factories #256
build.yml
on: pull_request
Compile Java
1m 13s
Test Java
1m 28s
Check Format Java
38s
Lint
11s
Annotations
7 errors and 10 warnings
This class has only private constructors and may be final:
src/main/java/frc/robot/sim/simController/ClosedLoop.java#L33
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
|
This class has only private constructors and may be final:
src/main/java/frc/robot/sim/simController/UnitSafeControl.java#L423
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
|
Logger calls should be surrounded by log level guards.:
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
|
This class has only private constructors and may be final:
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
|
Logger calls should be surrounded by log level guards.:
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
|
Logger calls should be surrounded by log level guards.:
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
|
Check Format Java
Process completed with exit code 1.
|
Avoid unused local variables such as 'eToPickupTraj'.:
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
|
Avoid unused local variables such as 'cToPickupTraj'.:
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
|
Avoid unused local variables such as 'pickupToCTraj'.:
src/main/java/frc/robot/Autos.java#L36
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
|
Do not use non-final non-private static fields:
src/main/java/frc/robot/Constants.java#L154
Non-private static fields should be made constants (or immutable references) by
declaring them final.
Non-private non-final static fields break encapsulation and can lead to hard to find
bugs, since these fields can be modified from anywhere within the program.
Callers can trivially access and modify non-private non-final static fields. Neither
accesses nor modifications can be guarded against, and newly set values cannot
be validated.
If you are using this rule, then you don't need this
rule {% rule java/errorprone/AssignmentToNonFinalStatic %}.
MutableStaticState (Priority: 3, Ruleset: Design)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_design.html#mutablestaticstate
|
Do not use non-final non-private static fields:
src/main/java/frc/robot/Constants.java#L160
Non-private static fields should be made constants (or immutable references) by
declaring them final.
Non-private non-final static fields break encapsulation and can lead to hard to find
bugs, since these fields can be modified from anywhere within the program.
Callers can trivially access and modify non-private non-final static fields. Neither
accesses nor modifications can be guarded against, and newly set values cannot
be validated.
If you are using this rule, then you don't need this
rule {% rule java/errorprone/AssignmentToNonFinalStatic %}.
MutableStaticState (Priority: 3, Ruleset: Design)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_design.html#mutablestaticstate
|
Field 'robotContainer' may be declared final:
src/main/java/frc/robot/Robot.java#L19
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
|
Field 'simWorld' may be declared final:
src/main/java/frc/robot/Robot.java#L20
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
|
Switch statements or expressions should be exhaustive, add a default case (or missing enum branches):
src/main/java/frc/robot/Robot.java#L44
Switch statements should be exhaustive, to make their control flow
easier to follow. This can be achieved by adding a `default` case, or,
if the switch is on an enum type, by ensuring there is one switch branch
for each enum constant.
This rule doesn't consider Switch Statements, that use Pattern Matching, since for these the
compiler already ensures that all cases are covered. The same is true for Switch Expressions,
which are also not considered by this rule.
NonExhaustiveSwitch (Priority: 3, Ruleset: Best Practices)
https://docs.pmd-code.org/pmd-doc-7.10.0/pmd_rules_java_bestpractices.html#nonexhaustiveswitch
|
Avoid unused private fields such as 'visionSubsystem'.:
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
|
Field 'targetPose' may be declared final:
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
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
PMD Report
|
18 KB |
|