diff --git a/.codacy.yml b/.codacy.yml new file mode 100644 index 0000000..467cf0c --- /dev/null +++ b/.codacy.yml @@ -0,0 +1,7 @@ +--- +exclude_paths: + - 'buildSrc/**' + - '*/test/**' + - '*/test-resources/**' + - 'misc/stylesheet.css' + diff --git a/README.md b/README.md index 2c841bf..263e92d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[![Java CI with Gradle](https://github.com/mnlipp/VM-Operator/actions/workflows/gradle.yml/badge.svg)](https://github.com/mnlipp/VM-Operator/actions/workflows/gradle.yml) +[![Java CI with Gradle](https://github.com/mnlipp/VM-Operator/actions/workflows/gradle.yml/badge.svg)](https://github.com/mnlipp/VM-Operator/actions/workflows/gradle.yml) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/2277842dac894de4b663c6aa2779077e)](https://app.codacy.com/gh/mnlipp/VM-Operator/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) # Run Qemu in Kubernetes Pods diff --git a/org.jdrupes.vmoperator.runner.qemu/src/org/jdrupes/vmoperator/runner/qemu/StateController.java b/org.jdrupes.vmoperator.runner.qemu/src/org/jdrupes/vmoperator/runner/qemu/StateController.java index fdc3a4d..8561b88 100644 --- a/org.jdrupes.vmoperator.runner.qemu/src/org/jdrupes/vmoperator/runner/qemu/StateController.java +++ b/org.jdrupes.vmoperator.runner.qemu/src/org/jdrupes/vmoperator/runner/qemu/StateController.java @@ -23,7 +23,7 @@ package org.jdrupes.vmoperator.runner.qemu; */ /* default */ class StateController { - private Runner runner; + private final Runner runner; /** * The state. diff --git a/org.jdrupes.vmoperator.util/src/org/jdrupes/vmoperator/util/LongLoggingManager.java b/org.jdrupes.vmoperator.util/src/org/jdrupes/vmoperator/util/LongLoggingManager.java index 7b64c9f..146de46 100644 --- a/org.jdrupes.vmoperator.util/src/org/jdrupes/vmoperator/util/LongLoggingManager.java +++ b/org.jdrupes.vmoperator.util/src/org/jdrupes/vmoperator/util/LongLoggingManager.java @@ -20,9 +20,16 @@ package org.jdrupes.vmoperator.util; import java.util.logging.LogManager; +/** + * A logging manager that isn't disabled by a shutdown hook. + */ public class LongLoggingManager extends LogManager { private static LongLoggingManager instance; + /** + * Instantiates a new long logging manager. + */ + @SuppressWarnings("PMD.AssignmentToNonFinalStatic") public LongLoggingManager() { instance = this; } @@ -36,6 +43,9 @@ public class LongLoggingManager extends LogManager { super.reset(); } + /** + * Reset finally. + */ public static void resetFinally() { instance.reset0(); }