Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dependency Injection Support for WorldGen Plugins #5212

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Merge branch 'develop' into develop

22d82f1
Select commit
Loading
Failed to load commit list.
Draft

Add Dependency Injection Support for WorldGen Plugins #5212

Merge branch 'develop' into develop
22d82f1
Select commit
Loading
Failed to load commit list.
Terasology Jenkins.io / PMD succeeded Dec 16, 2024 in 0s

2 new issues, 181 total

Total New Outstanding Fixed Trend
181 2 179 0 👎

Reference build: Terasology » engine » develop #3

Details

Severity distribution of new issues

Error Warning High Warning Normal Warning Low
0 0 2 0

Annotations

Check warning on line 21 in engine/src/main/java/org/terasology/engine/world/generator/plugin/WorldGeneratorPluginManager.java

See this annotation in the file changed.

@terasology-jenkins-io terasology-jenkins-io / PMD

UnusedPrivateField

NORMAL:
Avoid unused private fields such as 'logger'.
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://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unusedprivatefield"> See PMD documentation. </a>

Check warning on line 23 in engine/src/main/java/org/terasology/engine/world/generator/plugin/WorldGeneratorPluginManager.java

See this annotation in the file changed.

@terasology-jenkins-io terasology-jenkins-io / PMD

UnusedPrivateField

NORMAL:
Avoid unused private fields such as 'context'.
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://docs.pmd-code.org/pmd-doc-7.7.0/pmd_rules_java_bestpractices.html#unusedprivatefield"> See PMD documentation. </a>