Skip to content

WIP support deterministic cobertuna reports

ci.jenkins.io / PMD failed Sep 7, 2024 in 0s

3 new issues

Total New Outstanding Fixed Trend
3 3 0 0 👎

Reference build: Plugins » coverage-model » main #221

Details

Severity distribution of new issues

Error Warning High Warning Normal Warning Low
0 0 3 0

Annotations

Check warning on line 29 in src/main/java/edu/hm/hafner/coverage/parser/CoberturaParser.java

See this annotation in the file changed.

@ci-jenkins-io ci-jenkins-io / PMD

UnnecessaryImport

NORMAL:
Unused import 'edu.hm.hafner.util.TreeString'.
Raw output
Reports import statements that can be removed. They are either unused, duplicated, or the members they import are already implicitly in scope, because they're in java.lang, or the current package. If some imports cannot be resolved, for instance because you run PMD with an incomplete auxiliary classpath, some imports may be conservatively marked as used even if they're not to avoid false positives. <pre> <code> import java.io.File; // not used, can be removed import java.util.Collections; // used below import java.util.*; // so this one is not used import java.lang.Object; // imports from java.lang, unnecessary import java.lang.Object; // duplicate, unnecessary public class Foo { static Object emptyList() { return Collections.emptyList(); } } </code> </pre> <a href="https://docs.pmd-code.org/pmd-doc-7.3.0/pmd_rules_java_codestyle.html#unnecessaryimport"> See PMD documentation. </a>

Check warning on line 154 in src/main/java/edu/hm/hafner/coverage/parser/CoberturaParser.java

See this annotation in the file changed.

@ci-jenkins-io ci-jenkins-io / PMD

UnnecessaryLocalBeforeReturn

NORMAL:
Consider simply returning the value vs storing it in local variable 'actualFileName'.
Raw output
Avoid the creation of unnecessary local variables <pre> <code> public class Foo { public int foo() { int x = doSomething(); return x; // instead, just &#x27;return doSomething();&#x27; } } </code> </pre> <a href="https://docs.pmd-code.org/pmd-doc-7.3.0/pmd_rules_java_codestyle.html#unnecessarylocalbeforereturn"> See PMD documentation. </a>

Check warning on line 156 in src/main/java/edu/hm/hafner/coverage/parser/CoberturaParser.java

See this annotation in the file changed.

@ci-jenkins-io ci-jenkins-io / PMD

UselessParentheses

NORMAL:
Useless parentheses.
Raw output
Parenthesized expressions are used to override the default operator precedence rules. Parentheses whose removal would not change the relative nesting of operators are unnecessary, because they don't change the semantics of the enclosing expression. Some parentheses that strictly speaking are unnecessary, may still be considered useful for readability. This rule allows to ignore violations on two kinds of unnecessary parentheses: - "Clarifying" parentheses, which separate operators of difference precedence. While unnecessary, they make precedence rules explicit, which may be useful for rarely used operators. For example: ```java (a + b) & c // is equivalent to `a + b & c`, but probably clearer ``` Unset the property `ignoreClarifying` to report them. - "Balancing" parentheses, which are unnecessary but visually balance out another pair of parentheses around an equality operator. For example, those two expressions are equivalent: ```java (a == null) != (b == null) a == null != (b == null) ``` The parentheses on the right are required, and the parentheses on the left are just more visually pleasing. Unset the property `ignoreBalancing` to report them. <pre> <code> public class Foo { { int n = 0; n = (n); // here n = (n * 2) * 3; // and here n = n * (2 * 3); // and here } } </code> </pre> <a href="https://docs.pmd-code.org/pmd-doc-7.3.0/pmd_rules_java_codestyle.html#uselessparentheses"> See PMD documentation. </a>