Support zoom in/out buttons on CSV charts (#125) #40
Annotations
10 errors and 11 warnings
Final parameter in abstract method:
src/main/java/com/github/thecoldwine/sigrun/common/ParseProgressListener.java#L7
Declaring a method parameter as final for an interface method is useless because the implementation may choose to not respect it.
FinalParameterInAbstractMethod (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_codestyle.html#finalparameterinabstractmethod
|
This class has only private constructors and may be final:
src/main/java/com/github/thecoldwine/sigrun/common/ext/BlockFile.java#L10
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.8.0/pmd_rules_java_design.html#classwithonlyprivateconstructorsshouldbefinal
|
Logger calls should be surrounded by log level guards.:
src/main/java/com/github/thecoldwine/sigrun/common/ext/CsvFile.java#L60
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.8.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
This class has only private constructors and may be final:
src/main/java/com/github/thecoldwine/sigrun/common/ext/GoogleCoordUtils.java#L6
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.8.0/pmd_rules_java_design.html#classwithonlyprivateconstructorsshouldbefinal
|
The instance method name 'load_old' doesn't match '[a-z][a-zA-Z0-9]*':
src/main/java/com/github/thecoldwine/sigrun/common/ext/PositionFile.java#L100
Configurable naming conventions for method declarations. This rule reports
method declarations which do not match the regex that applies to their
specific kind (e.g. JUnit test or native method). Each regex can be
configured through properties.
By default this rule uses the standard Java naming convention (Camel case).
MethodNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_codestyle.html#methodnamingconventions
|
The static method name 'Revision1' doesn't match '[a-z][a-zA-Z0-9]*':
src/main/java/com/github/thecoldwine/sigrun/formats/SEGYFormatFactory.java#L11
Configurable naming conventions for method declarations. This rule reports
method declarations which do not match the regex that applies to their
specific kind (e.g. JUnit test or native method). Each regex can be
configured through properties.
By default this rule uses the standard Java naming convention (Camel case).
MethodNamingConventions (Priority: 1, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_codestyle.html#methodnamingconventions
|
Logger calls should be surrounded by log level guards.:
src/main/java/com/github/thecoldwine/sigrun/formats/SEGYRevision1.java#L46
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.8.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Logger calls should be surrounded by log level guards.:
src/main/java/com/github/thecoldwine/sigrun/formats/SEGYRevision1.java#L48
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.8.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
Logger calls should be surrounded by log level guards.:
src/main/java/com/github/thecoldwine/sigrun/formats/SEGYRevision1.java#L50
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.8.0/pmd_rules_java_bestpractices.html#guardlogstatement
|
This class has only private constructors and may be final:
src/main/java/com/github/thecoldwine/sigrun/serialization/BinaryHeaderFormatBuilder.java#L4
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.8.0/pmd_rules_java_design.html#classwithonlyprivateconstructorsshouldbefinal
|
pmd-code-scan
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
This utility class has a non-private constructor:
src/main/java/com/github/thecoldwine/sigrun/common/ConverterFactory.java#L9
For classes that only have static methods, consider making them utility classes.
Note that this doesn't apply to abstract classes, since their subclasses may
well include non-static methods. Also, if you want this class to be a utility class,
remember to add a private constructor to prevent instantiation.
(Note, that this use was known before PMD 5.1.0 as UseSingleton).
UseUtilityClass (Priority: 3, Ruleset: Design)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_design.html#useutilityclass
|
Avoid unused private fields such as 'textHeaderReader'.:
src/main/java/com/github/thecoldwine/sigrun/common/Repack.java#L26
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.8.0/pmd_rules_java_bestpractices.html#unusedprivatefield
|
Ensure that resources like this FileOutputStream object are closed after use:
src/main/java/com/github/thecoldwine/sigrun/common/Repack.java#L71
Ensure that resources (like `java.sql.Connection`, `java.sql.Statement`, and `java.sql.ResultSet` objects
and any subtype of `java.lang.AutoCloseable`) are always closed after use.
Failing to do so might result in resource leaks.
Note: It suffices to configure the super type, e.g. `java.lang.AutoCloseable`, so that this rule automatically triggers
on any subtype (e.g. `java.io.FileInputStream`). Additionally specifying `java.sql.Connection` helps in detecting
the types, if the type resolution / auxclasspath is not correctly setup.
Note: Since PMD 6.16.0 the default value for the property `types` contains `java.lang.AutoCloseable` and detects
now cases where the standard `java.io.*Stream` classes are involved. In order to restore the old behaviour,
just remove "AutoCloseable" from the types.
CloseResource (Priority: 3, Ruleset: Error Prone)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_errorprone.html#closeresource
|
Ensure that resources like this FileChannel object are closed after use:
src/main/java/com/github/thecoldwine/sigrun/common/Repack.java#L72
Ensure that resources (like `java.sql.Connection`, `java.sql.Statement`, and `java.sql.ResultSet` objects
and any subtype of `java.lang.AutoCloseable`) are always closed after use.
Failing to do so might result in resource leaks.
Note: It suffices to configure the super type, e.g. `java.lang.AutoCloseable`, so that this rule automatically triggers
on any subtype (e.g. `java.io.FileInputStream`). Additionally specifying `java.sql.Connection` helps in detecting
the types, if the type resolution / auxclasspath is not correctly setup.
Note: Since PMD 6.16.0 the default value for the property `types` contains `java.lang.AutoCloseable` and detects
now cases where the standard `java.io.*Stream` classes are involved. In order to restore the old behaviour,
just remove "AutoCloseable" from the types.
CloseResource (Priority: 3, Ruleset: Error Prone)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_errorprone.html#closeresource
|
Avoid the use of value in annotations when its the only element:
src/main/java/com/github/thecoldwine/sigrun/common/TraceHeader.java#L7
Avoid the use of value in annotations when it's the only element.
UnnecessaryAnnotationValueElement (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_codestyle.html#unnecessaryannotationvalueelement
|
This statement should have braces:
src/main/java/com/github/thecoldwine/sigrun/common/TraceHeader.java#L1326
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else'
statements and loop statements, even if they are optional. This usually makes the code clearer, and
helps prepare the future when you need to add another statement. That said, this rule lets you control
which statements are required to have braces via properties.
From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces,
and IfElseStmtMustUseBraces.
ControlStatementBraces (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_codestyle.html#controlstatementbraces
|
This statement should have braces:
src/main/java/com/github/thecoldwine/sigrun/common/TraceHeader.java#L1327
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else'
statements and loop statements, even if they are optional. This usually makes the code clearer, and
helps prepare the future when you need to add another statement. That said, this rule lets you control
which statements are required to have braces via properties.
From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces,
and IfElseStmtMustUseBraces.
ControlStatementBraces (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_codestyle.html#controlstatementbraces
|
This statement should have braces:
src/main/java/com/github/thecoldwine/sigrun/common/TraceHeader.java#L1332
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else'
statements and loop statements, even if they are optional. This usually makes the code clearer, and
helps prepare the future when you need to add another statement. That said, this rule lets you control
which statements are required to have braces via properties.
From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces,
and IfElseStmtMustUseBraces.
ControlStatementBraces (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_codestyle.html#controlstatementbraces
|
This statement should have braces:
src/main/java/com/github/thecoldwine/sigrun/common/TraceHeader.java#L1334
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else'
statements and loop statements, even if they are optional. This usually makes the code clearer, and
helps prepare the future when you need to add another statement. That said, this rule lets you control
which statements are required to have braces via properties.
From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces,
and IfElseStmtMustUseBraces.
ControlStatementBraces (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_codestyle.html#controlstatementbraces
|
This statement should have braces:
src/main/java/com/github/thecoldwine/sigrun/common/TraceHeader.java#L1335
Enforce a policy for braces on control statements. It is recommended to use braces on 'if ... else'
statements and loop statements, even if they are optional. This usually makes the code clearer, and
helps prepare the future when you need to add another statement. That said, this rule lets you control
which statements are required to have braces via properties.
From 6.2.0 on, this rule supersedes WhileLoopMustUseBraces, ForLoopMustUseBraces, IfStmtMustUseBraces,
and IfElseStmtMustUseBraces.
ControlStatementBraces (Priority: 3, Ruleset: Code Style)
https://docs.pmd-code.org/pmd-doc-7.8.0/pmd_rules_java_codestyle.html#controlstatementbraces
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
PMD Report
|
38.8 KB |
|