From 17e2a7c6f0dd6619b87a809de6ae167f57355611 Mon Sep 17 00:00:00 2001 From: "Michael N. Lipp" Date: Mon, 3 Mar 2025 12:39:50 +0100 Subject: [PATCH] Fix some codacy issues. --- .markdownlint.yaml | 38 +++++++++++++++++++ dev-example/test-vm.tpl.yaml | 2 +- org.jdrupes.vmoperator.vmaccess/.eclipse-pmd | 2 +- .../jdrupes/vmoperator/vmaccess/VmAccess.java | 2 +- .../vmaccess/browser/VmAccess-style.scss | 1 + .../vmmgmt/browser/VmMgmt-style.scss | 1 + webpages/pools.md | 4 +- webpages/upgrading.md | 4 +- 8 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 .markdownlint.yaml diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..3501bd3 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,38 @@ +# See https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml + +# Default state for all rules +default: true + +# MD007/ul-indent : Unordered list indentation : +# https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md007.md +MD007: + # Spaces for indent + indent: 2 + # Whether to indent the first level of the list + start_indented: true + # Spaces for first level indent (when start_indented is set) + start_indent: 2 + +# MD025/single-title/single-h1 : Multiple top-level headings in the same document : +# https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md025.md +MD025: + # Heading level + level: 1 + # RegExp for matching title in front matter (disable) + front_matter_title: "" + +# MD036/no-emphasis-as-heading : Emphasis used instead of a heading : +# https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md036.md +MD036: false + +# MD043/required-headings : Required heading structure : +# https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md043.md +MD043: + # List of headings + headings: [ + "# Head", + "## Item", + "### Detail" + ] + # Match case of headings + match_case: false diff --git a/dev-example/test-vm.tpl.yaml b/dev-example/test-vm.tpl.yaml index 50031bb..260341e 100644 --- a/dev-example/test-vm.tpl.yaml +++ b/dev-example/test-vm.tpl.yaml @@ -14,7 +14,7 @@ spec: # repository: ghcr.io # path: mnlipp/org.jdrupes.vmoperator.runner.qemu-alpine # version: "3.0.0" - source: registry.mnl.de/org/jdrupes/vm-operator/org.jdrupes.vmoperator.runner.qemu-arch:testing + source: registry.mnl.de/org/jdrupes/vm-operator/org.jdrupes.vmoperator.runner.qemu-arch:feature-auto-login pullPolicy: Always permissions: diff --git a/org.jdrupes.vmoperator.vmaccess/.eclipse-pmd b/org.jdrupes.vmoperator.vmaccess/.eclipse-pmd index 5d69caa..60d7780 100644 --- a/org.jdrupes.vmoperator.vmaccess/.eclipse-pmd +++ b/org.jdrupes.vmoperator.vmaccess/.eclipse-pmd @@ -4,4 +4,4 @@ - + \ No newline at end of file diff --git a/org.jdrupes.vmoperator.vmaccess/src/org/jdrupes/vmoperator/vmaccess/VmAccess.java b/org.jdrupes.vmoperator.vmaccess/src/org/jdrupes/vmoperator/vmaccess/VmAccess.java index 3b28d1c..ad4ec63 100644 --- a/org.jdrupes.vmoperator.vmaccess/src/org/jdrupes/vmoperator/vmaccess/VmAccess.java +++ b/org.jdrupes.vmoperator.vmaccess/src/org/jdrupes/vmoperator/vmaccess/VmAccess.java @@ -265,7 +265,7 @@ public class VmAccess extends FreeMarkerConlet { public void onConsoleConfigured(ConsoleConfigured event, ConsoleConnection connection) throws InterruptedException, IOException { - @SuppressWarnings("unchecked") + @SuppressWarnings({ "unchecked", "PMD.PrematureDeclaration" }) final var rendered = (Set) connection.session().get(RENDERED); connection.session().remove(RENDERED); diff --git a/org.jdrupes.vmoperator.vmaccess/src/org/jdrupes/vmoperator/vmaccess/browser/VmAccess-style.scss b/org.jdrupes.vmoperator.vmaccess/src/org/jdrupes/vmoperator/vmaccess/browser/VmAccess-style.scss index 63ae299..3a291dd 100644 --- a/org.jdrupes.vmoperator.vmaccess/src/org/jdrupes/vmoperator/vmaccess/browser/VmAccess-style.scss +++ b/org.jdrupes.vmoperator.vmaccess/src/org/jdrupes/vmoperator/vmaccess/browser/VmAccess-style.scss @@ -24,6 +24,7 @@ span[role="button"].svg-icon { display: inline-block; line-height: 1; + /* Align with forkawesome */ font-size: 14px; fill: var(--primary); diff --git a/org.jdrupes.vmoperator.vmmgmt/src/org/jdrupes/vmoperator/vmmgmt/browser/VmMgmt-style.scss b/org.jdrupes.vmoperator.vmmgmt/src/org/jdrupes/vmoperator/vmmgmt/browser/VmMgmt-style.scss index 4c11b65..248df56 100644 --- a/org.jdrupes.vmoperator.vmmgmt/src/org/jdrupes/vmoperator/vmmgmt/browser/VmMgmt-style.scss +++ b/org.jdrupes.vmoperator.vmmgmt/src/org/jdrupes/vmoperator/vmmgmt/browser/VmMgmt-style.scss @@ -118,6 +118,7 @@ span[role="button"].svg-icon { display: inline-block; line-height: 1; + /* Align with forkawesome */ font-size: 14px; fill: var(--primary); diff --git a/webpages/pools.md b/webpages/pools.md index fd25044..6b1e75f 100644 --- a/webpages/pools.md +++ b/webpages/pools.md @@ -25,7 +25,7 @@ The VMs should only be accessible via a desktop started by the VM-Operator. # systemctl disable gdm # systemctl stop gdm ``` - + * Disable `getty` on tty1. ```console @@ -55,7 +55,7 @@ The following should actually be configured for any VM. The VM-Operator agent runs as a systemd service. Sample configuration files can be found [here](https://github.com/mnlipp/VM-Operator/tree/main/dev-example/vmop-agent). -Copy +Copy * `99-vmop-agent.rules` to `/usr/local/lib/udev/rules.d/99-vmop-agent.rules`, * `vmop-agent` to `/usr/local/libexec/vmop-agent` and diff --git a/webpages/upgrading.md b/webpages/upgrading.md index 6a7f10f..c1331e5 100644 --- a/webpages/upgrading.md +++ b/webpages/upgrading.md @@ -10,7 +10,7 @@ layout: vm-operator ## To version 4.0.0 * The VmViewer conlet has been renamed to VmAccess. This affects the - [configuration](https://jdrupes.org/vm-operator/user-gui.html). + [configuration](https://jdrupes.org/vm-operator/user-gui.html). Configuration information using the old path `/Manager/GuiHttpServer/ConsoleWeblet/WebConsole/ComponentCollector/VmViewer` is still accepted for backward compatibility until the next major version, @@ -24,7 +24,7 @@ layout: vm-operator * The configuration property `passwordValidity` has been moved from component `/Manager/Controller/DisplaySecretMonitor` to - `/Manager/Controller/Reconciler/DisplaySecretReconciler`. The old path is + `/Manager/Controller/Reconciler/DisplaySecretReconciler`. The old path is still accepted for backward compatibility until the next major version, but should be updated.