Skip to content

Add support for Opencover format based on opencover plugin

ci.jenkins.io / PMD failed Nov 18, 2023 in 0s

13 new issues

Total New Outstanding Fixed Trend
13 13 0 0 👎

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

Details

Severity distribution of new issues

Error Warning High Warning Normal Warning Low
0 0 13 0

Annotations

Check warning on line 39 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedPrivateField

NORMAL:
Avoid unused private fields such as 'METHOD'.
Raw output
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. <pre> <code> public class Something { private static int FOO = 2; // Unused private int i = 5; // Unused private int j = 6; public int addOne() { return j++; } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedprivatefield"> See PMD documentation. </a>

Check warning on line 41 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedPrivateField

NORMAL:
Avoid unused private fields such as 'METHOD_NAME'.
Raw output
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. <pre> <code> public class Something { private static int FOO = 2; // Unused private int i = 5; // Unused private int j = 6; public int addOne() { return j++; } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedprivatefield"> See PMD documentation. </a>

Check warning on line 47 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedPrivateField

NORMAL:
Avoid unused private fields such as 'CLASS_COMPLEXITY'.
Raw output
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. <pre> <code> public class Something { private static int FOO = 2; // Unused private int i = 5; // Unused private int j = 6; public int addOne() { return j++; } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedprivatefield"> See PMD documentation. </a>

Check warning on line 48 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedPrivateField

NORMAL:
Avoid unused private fields such as 'METHOD_COMPLEXITY'.
Raw output
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. <pre> <code> public class Something { private static int FOO = 2; // Unused private int i = 5; // Unused private int j = 6; public int addOne() { return j++; } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedprivatefield"> See PMD documentation. </a>

Check warning on line 78 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedFormalParameter

NORMAL:
Avoid unused method parameters such as 'currentStartElement'.
Raw output
Reports parameters of methods and constructors that are not referenced them in the method body. Parameters whose name starts with `ignored` or `unused` are filtered out. Removing unused formal parameters from public methods could cause a ripple effect through the code base. Hence, by default, this rule only considers private methods. To include non-private methods, set the `checkAll` property to `true`. <pre> <code> public class Foo { private void bar(String howdy) { // howdy is not used } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedformalparameter"> See PMD documentation. </a>

Check warning on line 110 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedFormalParameter

NORMAL:
Avoid unused method parameters such as 'currentStartElement'.
Raw output
Reports parameters of methods and constructors that are not referenced them in the method body. Parameters whose name starts with `ignored` or `unused` are filtered out. Removing unused formal parameters from public methods could cause a ripple effect through the code base. Hence, by default, this rule only considers private methods. To include non-private methods, set the `checkAll` property to `true`. <pre> <code> public class Foo { private void bar(String howdy) { // howdy is not used } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedformalparameter"> See PMD documentation. </a>

Check warning on line 112 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedLocalVariable

NORMAL:
Avoid unused local variables such as 'packageNode'.
Raw output
Detects when a local variable is declared and/or assigned, but not used. Variables whose name starts with `ignored` or `unused` are filtered out. <pre> <code> public class Foo { public void doSomething() { int i = 5; // Unused } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedlocalvariable"> See PMD documentation. </a>

Check warning on line 112 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedAssignment

NORMAL:
The initializer for variable 'packageNode' is never used (overwritten on line 122).
Raw output
Reports assignments to variables that are never used before the variable is overwritten, or goes out of scope. Unused assignments are those for which 1. The variable is never read after the assignment, or 2. The assigned value is always overwritten by other assignments before the next read of the variable. The rule doesn't consider assignments to fields except for those of `this` in a constructor, or static fields of the current class in static initializers. The rule may be suppressed with the standard `@SuppressWarnings("unused")` tag. The rule subsumes {% rule "UnusedLocalVariable" %}, and {% rule "UnusedFormalParameter" %}. Those violations are filtered out by default, in case you already have enabled those rules, but may be enabled with the property `reportUnusedVariables`. Variables whose name starts with `ignored` or `unused` are filtered out, as is standard practice for exceptions. Limitations: * The rule currently cannot know which method calls throw exceptions, or which exceptions they throw. In the body of a try block, every method or constructor call is assumed to throw. This may cause false-negatives. The only other language construct that is assumed to throw is the `throw` statement, in particular, things like `assert` statements, or NullPointerExceptions on dereference are ignored. * The rule cannot resolve assignments across constructors, when they're called with the special `this(...)` syntax. This may cause false-negatives. Both of those limitations may be partly relaxed in PMD 7. <pre> <code> class A { // this field initializer is redundant, // it is always overwritten in the constructor int f = 1; A(int f) { this.f = f; } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedassignment"> See PMD documentation. </a>

Check warning on line 122 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedAssignment

NORMAL:
The value assigned to variable 'packageNode' is never used (reassigned every iteration).
Raw output
Reports assignments to variables that are never used before the variable is overwritten, or goes out of scope. Unused assignments are those for which 1. The variable is never read after the assignment, or 2. The assigned value is always overwritten by other assignments before the next read of the variable. The rule doesn't consider assignments to fields except for those of `this` in a constructor, or static fields of the current class in static initializers. The rule may be suppressed with the standard `@SuppressWarnings("unused")` tag. The rule subsumes {% rule "UnusedLocalVariable" %}, and {% rule "UnusedFormalParameter" %}. Those violations are filtered out by default, in case you already have enabled those rules, but may be enabled with the property `reportUnusedVariables`. Variables whose name starts with `ignored` or `unused` are filtered out, as is standard practice for exceptions. Limitations: * The rule currently cannot know which method calls throw exceptions, or which exceptions they throw. In the body of a try block, every method or constructor call is assumed to throw. This may cause false-negatives. The only other language construct that is assumed to throw is the `throw` statement, in particular, things like `assert` statements, or NullPointerExceptions on dereference are ignored. * The rule cannot resolve assignments across constructors, when they're called with the special `this(...)` syntax. This may cause false-negatives. Both of those limitations may be partly relaxed in PMD 7. <pre> <code> class A { // this field initializer is redundant, // it is always overwritten in the constructor int f = 1; A(int f) { this.f = f; } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedassignment"> See PMD documentation. </a>

Check warning on line 128 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedFormalParameter

NORMAL:
Avoid unused method parameters such as 'log'.
Raw output
Reports parameters of methods and constructors that are not referenced them in the method body. Parameters whose name starts with `ignored` or `unused` are filtered out. Removing unused formal parameters from public methods could cause a ripple effect through the code base. Hence, by default, this rule only considers private methods. To include non-private methods, set the `checkAll` property to `true`. <pre> <code> public class Foo { private void bar(String howdy) { // howdy is not used } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedformalparameter"> See PMD documentation. </a>

Check warning on line 128 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedFormalParameter

NORMAL:
Avoid unused method parameters such as 'parentElement'.
Raw output
Reports parameters of methods and constructors that are not referenced them in the method body. Parameters whose name starts with `ignored` or `unused` are filtered out. Removing unused formal parameters from public methods could cause a ripple effect through the code base. Hence, by default, this rule only considers private methods. To include non-private methods, set the `checkAll` property to `true`. <pre> <code> public class Foo { private void bar(String howdy) { // howdy is not used } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedformalparameter"> See PMD documentation. </a>

Check warning on line 134 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedLocalVariable

NORMAL:
Avoid unused local variables such as 'className'.
Raw output
Detects when a local variable is declared and/or assigned, but not used. Variables whose name starts with `ignored` or `unused` are filtered out. <pre> <code> public class Foo { public void doSomething() { int i = 5; // Unused } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedlocalvariable"> See PMD documentation. </a>

Check warning on line 149 in src/main/java/edu/hm/hafner/coverage/parser/OpenCoverParser.java

See this annotation in the file changed.

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

UnusedFormalParameter

NORMAL:
Avoid unused method parameters such as 'parentElement'.
Raw output
Reports parameters of methods and constructors that are not referenced them in the method body. Parameters whose name starts with `ignored` or `unused` are filtered out. Removing unused formal parameters from public methods could cause a ripple effect through the code base. Hence, by default, this rule only considers private methods. To include non-private methods, set the `checkAll` property to `true`. <pre> <code> public class Foo { private void bar(String howdy) { // howdy is not used } } </code> </pre> <a href="https://pmd.github.io/pmd-6.55.0/pmd_rules_java_bestpractices.html#unusedformalparameter"> See PMD documentation. </a>