From b78d96911dd76debe64592b28d2c5752f853ae77 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Tue, 22 Jul 2025 10:30:33 +0200 Subject: [PATCH 01/29] Add markdown action Signed-off-by: Leo Siepel --- .github/markdownlin.yaml | 37 ++++++++++++++++++++++++++++ .github/mlc_config.json | 7 ++++++ .github/workflows/markdownlint.yml | 39 ++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 .github/markdownlin.yaml create mode 100644 .github/mlc_config.json create mode 100644 .github/workflows/markdownlint.yml diff --git a/.github/markdownlin.yaml b/.github/markdownlin.yaml new file mode 100644 index 0000000000000..dd4fa6d214015 --- /dev/null +++ b/.github/markdownlin.yaml @@ -0,0 +1,37 @@ +# From: https://github.com/openhab/openhab-docs/blob/main/.github/.markdownlint.yaml + +default: true + +# Expect dash usage for unorderd lists +MD004: + style: dash + +# Allow long line lengths +MD013: false + +# Allow duplicate headers for different nesting +MD024: + siblings_only: true + +# Allow Multiple top level headers in the same document +MD025: false + +# Allow trailing punctuation in headers +MD026: false +MD029: + style: one + +# Allow inline HTML +MD033: false + +# Code block style +MD046: + style: fenced + +# Emphasiszis in underscore +MD049: + style: underscore + +# Strong in asterisk +MD050: + style: asterisk \ No newline at end of file diff --git a/.github/mlc_config.json b/.github/mlc_config.json new file mode 100644 index 0000000000000..0cddc6550eea9 --- /dev/null +++ b/.github/mlc_config.json @@ -0,0 +1,7 @@ +{ + "ignorePatterns": [ + { "pattern": "^https://github.com/openhab/openhab-addons/commit/.*" }, + { "pattern": "^https://github.com/openhab/openhab-addons/pull/.*" }, + { "pattern": "^mailto:.*" } + ] +} \ No newline at end of file diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml new file mode 100644 index 0000000000000..024309dd0973b --- /dev/null +++ b/.github/workflows/markdownlint.yml @@ -0,0 +1,39 @@ +name: Check Markdown For Errors + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + markdownlint: + name: markdownlint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # pinning to SHA to mitigate possible supply chain attack + - name: Run markdownlint-cli + uses: nosborn/github-action-markdown-cli@508d6cefd8f0cc99eab5d2d4685b1d5f470042c1 # v3.5.0 + with: + files: . + config_file: ".github/markdownlint.yaml" + + markdown-link-check: + name: Broken Links Check + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # pinning to SHA to mitigate possible supply chain attack + - name: Check for broken links + uses: tcort/github-action-markdown-link-check@a800ad5f1c35bf61987946fd31c15726a1c9f2ba # v1.1.0 + with: + use-quiet-mode: 'yes' # only show errors in output + use-verbose-mode: 'yes' # show detailed HTTP status for checked links + config-file: '.github/mlc_config.json' \ No newline at end of file From 43c956592c30aba9b7e32393c342470563b799c2 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Tue, 22 Jul 2025 11:27:07 +0200 Subject: [PATCH 02/29] Trigger Signed-off-by: Leo Siepel --- .github/workflows/markdownlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index 024309dd0973b..78b8b6cb509ab 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - # pinning to SHA to mitigate possible supply chain attack + # pinning to SHA to mitigate possible supply chain attacks - name: Run markdownlint-cli uses: nosborn/github-action-markdown-cli@508d6cefd8f0cc99eab5d2d4685b1d5f470042c1 # v3.5.0 with: From 82bf5f756631c3edc2b69e1cd9745d4068cd0ef5 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Tue, 22 Jul 2025 11:37:52 +0200 Subject: [PATCH 03/29] Another trigger Signed-off-by: Leo Siepel --- .github/workflows/markdownlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index 78b8b6cb509ab..024309dd0973b 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - # pinning to SHA to mitigate possible supply chain attacks + # pinning to SHA to mitigate possible supply chain attack - name: Run markdownlint-cli uses: nosborn/github-action-markdown-cli@508d6cefd8f0cc99eab5d2d4685b1d5f470042c1 # v3.5.0 with: From efcdf81acd2f6fba2a6dce4a44af8f16dbf65ac5 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Tue, 22 Jul 2025 11:58:42 +0200 Subject: [PATCH 04/29] Fix filename, remove broken links check Signed-off-by: Leo Siepel --- .github/{markdownlin.yaml => markdownlint.yaml} | 0 .github/workflows/markdownlint.yml | 17 +---------------- 2 files changed, 1 insertion(+), 16 deletions(-) rename .github/{markdownlin.yaml => markdownlint.yaml} (100%) diff --git a/.github/markdownlin.yaml b/.github/markdownlint.yaml similarity index 100% rename from .github/markdownlin.yaml rename to .github/markdownlint.yaml diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index 024309dd0973b..37c214c06c1da 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -21,19 +21,4 @@ jobs: uses: nosborn/github-action-markdown-cli@508d6cefd8f0cc99eab5d2d4685b1d5f470042c1 # v3.5.0 with: files: . - config_file: ".github/markdownlint.yaml" - - markdown-link-check: - name: Broken Links Check - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # pinning to SHA to mitigate possible supply chain attack - - name: Check for broken links - uses: tcort/github-action-markdown-link-check@a800ad5f1c35bf61987946fd31c15726a1c9f2ba # v1.1.0 - with: - use-quiet-mode: 'yes' # only show errors in output - use-verbose-mode: 'yes' # show detailed HTTP status for checked links - config-file: '.github/mlc_config.json' \ No newline at end of file + config_file: ".github/markdownlint.yaml" \ No newline at end of file From b4770a7c5fa5c672ae51a8099696f7ba08e4b0e9 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Tue, 12 Aug 2025 13:49:28 +0200 Subject: [PATCH 05/29] Add markdown to build/verify Signed-off-by: Leo Siepel --- pom.xml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/pom.xml b/pom.xml index ddfbd29d18f0d..1f4ed44fc92f3 100644 --- a/pom.xml +++ b/pom.xml @@ -606,6 +606,47 @@ Import-Package: \\ + + com.github.eirslett + frontend-maven-plugin + 1.15.0 + + + + install-node-and-npm + + install-node-and-npm + + + v20.11.0 + 10.2.5 + + + + + + npm-install-markdownlint + + npm + + + install markdownlint-cli --no-save + + + + + + run-markdownlint + + npm + + verify + + exec markdownlint "**/*.md" -c .github/markdownlint.json + + + + From 58cbdc63eb0045623eb62ab14280a5f2358d715c Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Tue, 12 Aug 2025 15:46:25 +0200 Subject: [PATCH 06/29] Fix paths Signed-off-by: Leo Siepel --- .gitignore | 2 ++ pom.xml | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 95de5ec9f4da2..71fab3a0dbc80 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ pom.xml.versionsBackup .vim shell.nix tags + +node_modules/ \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1f4ed44fc92f3..4948d9640fb65 100644 --- a/pom.xml +++ b/pom.xml @@ -610,6 +610,9 @@ Import-Package: \\ com.github.eirslett frontend-maven-plugin 1.15.0 + + ${project.build.directory}/node + @@ -630,6 +633,7 @@ Import-Package: \\ npm + ${project.build.directory}/node install markdownlint-cli --no-save @@ -642,7 +646,8 @@ Import-Package: \\ verify - exec markdownlint "**/*.md" -c .github/markdownlint.json + ${project.build.directory}/node + exec -- markdownlint "../../**/*.md" --ignore "**/node_modules/**" -c .github/markdownlint.json @@ -699,6 +704,11 @@ Import-Package: \\ com.diffplug.spotless spotless-maven-plugin + + + com.github.eirslett + frontend-maven-plugin + From 8e4d7e148bc55f01044fd6d83ed07905786a3163 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Tue, 12 Aug 2025 15:50:06 +0200 Subject: [PATCH 07/29] Fix extension Signed-off-by: Leo Siepel --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4948d9640fb65..628beadfbc0e4 100644 --- a/pom.xml +++ b/pom.xml @@ -647,7 +647,7 @@ Import-Package: \\ verify ${project.build.directory}/node - exec -- markdownlint "../../**/*.md" --ignore "**/node_modules/**" -c .github/markdownlint.json + exec -- markdownlint "../../**/*.md" --ignore "**/node_modules/**" -c .github/markdownlint.yaml From 457afa3be81df3f01d2f004fe014de1c88645e9a Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Tue, 12 Aug 2025 17:24:13 +0200 Subject: [PATCH 08/29] Spotless Signed-off-by: Leo Siepel --- pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 628beadfbc0e4..4f27b7d865a8a 100644 --- a/pom.xml +++ b/pom.xml @@ -611,7 +611,7 @@ Import-Package: \\ frontend-maven-plugin 1.15.0 - ${project.build.directory}/node + ${project.build.directory}/node @@ -705,10 +705,10 @@ Import-Package: \\ spotless-maven-plugin - - com.github.eirslett - frontend-maven-plugin - + + com.github.eirslett + frontend-maven-plugin + From ccaf4faba0feb6c591705df28a1b308d31429dbc Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Wed, 13 Aug 2025 11:21:13 +0200 Subject: [PATCH 09/29] Fully change to plugin Signed-off-by: Leo Siepel --- .github/workflows/markdownlint.yml | 24 ------------------------ pom.xml | 8 ++++---- 2 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/markdownlint.yml diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml deleted file mode 100644 index 37c214c06c1da..0000000000000 --- a/.github/workflows/markdownlint.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Check Markdown For Errors - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - markdownlint: - name: markdownlint - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # pinning to SHA to mitigate possible supply chain attack - - name: Run markdownlint-cli - uses: nosborn/github-action-markdown-cli@508d6cefd8f0cc99eab5d2d4685b1d5f470042c1 # v3.5.0 - with: - files: . - config_file: ".github/markdownlint.yaml" \ No newline at end of file diff --git a/pom.xml b/pom.xml index 4f27b7d865a8a..e18ff519637d9 100644 --- a/pom.xml +++ b/pom.xml @@ -611,7 +611,7 @@ Import-Package: \\ frontend-maven-plugin 1.15.0 - ${project.build.directory}/node + ${project.build.directory} @@ -633,7 +633,7 @@ Import-Package: \\ npm - ${project.build.directory}/node + ${project.build.directory} install markdownlint-cli --no-save @@ -646,8 +646,8 @@ Import-Package: \\ verify - ${project.build.directory}/node - exec -- markdownlint "../../**/*.md" --ignore "**/node_modules/**" -c .github/markdownlint.yaml + ${project.build.directory} + exec -- markdownlint "../**/*.md" --ignore "**/node_modules/**" -c ${basedirRoot}/.github/markdownlint.yaml From ad125a6edfee2d3633dcbe95114fc1dbd213a090 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Wed, 13 Aug 2025 13:18:35 +0200 Subject: [PATCH 10/29] Ignore folders to speed up Signed-off-by: Leo Siepel --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e18ff519637d9..fdf2241ab585b 100644 --- a/pom.xml +++ b/pom.xml @@ -647,7 +647,7 @@ Import-Package: \\ verify ${project.build.directory} - exec -- markdownlint "../**/*.md" --ignore "**/node_modules/**" -c ${basedirRoot}/.github/markdownlint.yaml + exec -- markdownlint "../**/*.md" --ignore "**/node_modules/**" --ignore "**/target/**" --ignore "**/.vscode/**" --ignore "**/itests/**" --ignore "**/features/**" -c ${basedirRoot}/.github/markdownlint.yaml From fef17febfef10911084bd206f38a6255efa2e09b Mon Sep 17 00:00:00 2001 From: Wouter Born Date: Thu, 14 Aug 2025 18:50:44 +0200 Subject: [PATCH 11/29] Some markdownlint improvements * Fix wrong command order * Fix jsscripting conflicts Signed-off-by: Wouter Born --- pom.xml | 106 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 46 deletions(-) diff --git a/pom.xml b/pom.xml index fdf2241ab585b..4ea7f754a8a4d 100644 --- a/pom.xml +++ b/pom.xml @@ -606,52 +606,6 @@ Import-Package: \\ - - com.github.eirslett - frontend-maven-plugin - 1.15.0 - - ${project.build.directory} - - - - - install-node-and-npm - - install-node-and-npm - - - v20.11.0 - 10.2.5 - - - - - - npm-install-markdownlint - - npm - - - ${project.build.directory} - install markdownlint-cli --no-save - - - - - - run-markdownlint - - npm - - verify - - ${project.build.directory} - exec -- markdownlint "../**/*.md" --ignore "**/node_modules/**" --ignore "**/target/**" --ignore "**/.vscode/**" --ignore "**/itests/**" --ignore "**/features/**" -c ${basedirRoot}/.github/markdownlint.yaml - - - - @@ -912,6 +866,66 @@ Import-Package: \\ ${oh.java.version} + + + check-markdown + + + README.md + + + + + + + com.github.eirslett + frontend-maven-plugin + 1.15.1 + + + + install-node-and-npm-markdownlint + + install-node-and-npm + + + v20.11.0 + 10.2.5 + ${project.build.directory} + + + + + + npm-install-markdownlint + + npm + + + ${project.build.directory} + install markdownlint-cli --no-save + + + + + + run-markdownlint + + npm + + verify + + ${project.build.directory} + exec -- markdownlint -c ${basedirRoot}/.github/markdownlint.yaml ../*.md ../doc/**/*.md + + + + + + + + + From a2f53a8d68b2de8d8e0ca92bc1c4634e6c8071ec Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Sun, 17 Aug 2025 21:14:36 +0200 Subject: [PATCH 12/29] Version pinning Signed-off-by: Leo Siepel --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 4ea7f754a8a4d..00da9930c343f 100644 --- a/pom.xml +++ b/pom.xml @@ -903,7 +903,7 @@ Import-Package: \\ ${project.build.directory} - install markdownlint-cli --no-save + install markdownlint-cli@0.45.0 --no-save @@ -916,7 +916,7 @@ Import-Package: \\ verify ${project.build.directory} - exec -- markdownlint -c ${basedirRoot}/.github/markdownlint.yaml ../*.md ../doc/**/*.md + exec --loglevel=info -- markdownlint -c ${basedirRoot}/.github/markdownlint.yaml ../*.md ../doc/**/*.md From 07910050427224a207f554ecb42ecbe444493478 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Sun, 17 Aug 2025 22:24:54 +0200 Subject: [PATCH 13/29] Another attemp to find the output for markdownlint Signed-off-by: Leo Siepel --- .github/scripts/maven-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/maven-build b/.github/scripts/maven-build index f6cac0dd899e5..f8dc66d56a5a4 100755 --- a/.github/scripts/maven-build +++ b/.github/scripts/maven-build @@ -20,7 +20,7 @@ function mvnp() { local padding=$(bc -l <<< "scale=0;2*(l($reactor_size)/l(10)+1)") local command=(./mvnw $@) exec "${command[@]}" 2>&1 | # execute, redirect stderr to stdout - tee "$BUILD_LOG" | # write output to log + tee -a "$BUILD_LOG" | # write output to log stdbuf -oL grep -aE '^\[INFO\] Building .+ \[.+\]$' | # filter progress stdbuf -o0 sed -uE 's/^\[INFO\] Building (.*[^ ])[ ]+\[([0-9]+\/[0-9]+)\]$/\2| \1/' | # prefix project name with progress stdbuf -o0 sed -e :a -e "s/^.\{1,${padding}\}|/ &/;ta" # right align progress with padding From 53374676542bb0c366950af87ec95525965b97f4 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Sun, 17 Aug 2025 23:54:36 +0200 Subject: [PATCH 14/29] Revert Signed-off-by: Leo Siepel --- .github/scripts/maven-build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/maven-build b/.github/scripts/maven-build index f8dc66d56a5a4..f6cac0dd899e5 100755 --- a/.github/scripts/maven-build +++ b/.github/scripts/maven-build @@ -20,7 +20,7 @@ function mvnp() { local padding=$(bc -l <<< "scale=0;2*(l($reactor_size)/l(10)+1)") local command=(./mvnw $@) exec "${command[@]}" 2>&1 | # execute, redirect stderr to stdout - tee -a "$BUILD_LOG" | # write output to log + tee "$BUILD_LOG" | # write output to log stdbuf -oL grep -aE '^\[INFO\] Building .+ \[.+\]$' | # filter progress stdbuf -o0 sed -uE 's/^\[INFO\] Building (.*[^ ])[ ]+\[([0-9]+\/[0-9]+)\]$/\2| \1/' | # prefix project name with progress stdbuf -o0 sed -e :a -e "s/^.\{1,${padding}\}|/ &/;ta" # right align progress with padding From 5c19e53c7c9e79776cf2ef49f8b414abfcc54485 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Wed, 24 Dec 2025 19:56:34 +0100 Subject: [PATCH 15/29] Final attempt Signed-off-by: Leo Siepel --- .../{markdownlint.yaml => .markdownlint.yaml} | 5 +- .github/mlc_config.json | 7 -- .gitignore | 4 +- bundles/pom.xml | 36 +++++++++++ pom.xml | 64 ------------------- 5 files changed, 41 insertions(+), 75 deletions(-) rename .github/{markdownlint.yaml => .markdownlint.yaml} (94%) delete mode 100644 .github/mlc_config.json diff --git a/.github/markdownlint.yaml b/.github/.markdownlint.yaml similarity index 94% rename from .github/markdownlint.yaml rename to .github/.markdownlint.yaml index dd4fa6d214015..d9dc234c8dab4 100644 --- a/.github/markdownlint.yaml +++ b/.github/.markdownlint.yaml @@ -34,4 +34,7 @@ MD049: # Strong in asterisk MD050: - style: asterisk \ No newline at end of file + style: asterisk + +MD060: false + \ No newline at end of file diff --git a/.github/mlc_config.json b/.github/mlc_config.json deleted file mode 100644 index 0cddc6550eea9..0000000000000 --- a/.github/mlc_config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "ignorePatterns": [ - { "pattern": "^https://github.com/openhab/openhab-addons/commit/.*" }, - { "pattern": "^https://github.com/openhab/openhab-addons/pull/.*" }, - { "pattern": "^mailto:.*" } - ] -} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 71fab3a0dbc80..cab43babb26b6 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,4 @@ pom.xml.versionsBackup .metals .vim shell.nix -tags - -node_modules/ \ No newline at end of file +tags \ No newline at end of file diff --git a/bundles/pom.xml b/bundles/pom.xml index 87a88909a34fd..83b9ec5141965 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -523,6 +523,7 @@ target/dependency + false @@ -781,6 +782,41 @@ + + com.github.eirslett + frontend-maven-plugin + 1.15.1 + + + install-node-and-npm + + install-node-and-npm + + validate + + ${markdownlint.skip} + + ${maven.multiModuleProjectDirectory}/target/.mvn/node + v20.11.1 + + + + + markdownlint + + npm + + validate + + ${markdownlint.skip} + + ${project.basedir} + ${maven.multiModuleProjectDirectory}/target/.mvn/node + exec --yes markdownlint-cli2 -- "**/*.md" "!**/target/**" "!**/node_modules/**" --config "${maven.multiModuleProjectDirectory}/.github/.markdownlint.yaml" + + + + diff --git a/pom.xml b/pom.xml index 00da9930c343f..c7e3cceed404c 100644 --- a/pom.xml +++ b/pom.xml @@ -658,11 +658,6 @@ Import-Package: \\ com.diffplug.spotless spotless-maven-plugin - - - com.github.eirslett - frontend-maven-plugin - @@ -867,65 +862,6 @@ Import-Package: \\ - - check-markdown - - - README.md - - - - - - - com.github.eirslett - frontend-maven-plugin - 1.15.1 - - - - install-node-and-npm-markdownlint - - install-node-and-npm - - - v20.11.0 - 10.2.5 - ${project.build.directory} - - - - - - npm-install-markdownlint - - npm - - - ${project.build.directory} - install markdownlint-cli@0.45.0 --no-save - - - - - - run-markdownlint - - npm - - verify - - ${project.build.directory} - exec --loglevel=info -- markdownlint -c ${basedirRoot}/.github/markdownlint.yaml ../*.md ../doc/**/*.md - - - - - - - - - From 72a965b85dd9e2de85d8df005080a013bc0bd50d Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Wed, 24 Dec 2025 19:57:17 +0100 Subject: [PATCH 16/29] Update versions Signed-off-by: Leo Siepel --- bundles/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/pom.xml b/bundles/pom.xml index 83b9ec5141965..d0f6bf4556761 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -785,7 +785,7 @@ com.github.eirslett frontend-maven-plugin - 1.15.1 + 2.0.0 install-node-and-npm @@ -797,7 +797,7 @@ ${markdownlint.skip} ${maven.multiModuleProjectDirectory}/target/.mvn/node - v20.11.1 + v24.12.0 From a29318025f84c9cce9a6df2594a3333384db946e Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Wed, 24 Dec 2025 20:21:13 +0100 Subject: [PATCH 17/29] Fix quote path issue Signed-off-by: Leo Siepel --- bundles/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/pom.xml b/bundles/pom.xml index d0f6bf4556761..87ac4c3dbb2dc 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -812,7 +812,7 @@ ${project.basedir} ${maven.multiModuleProjectDirectory}/target/.mvn/node - exec --yes markdownlint-cli2 -- "**/*.md" "!**/target/**" "!**/node_modules/**" --config "${maven.multiModuleProjectDirectory}/.github/.markdownlint.yaml" + exec --yes markdownlint-cli2 -- **/*.md !**/target/** !**/node_modules/** --config ${maven.multiModuleProjectDirectory}/.github/.markdownlint.yaml From 226cd64902ad62b9040f7a54cb248ee1775878da Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Wed, 24 Dec 2025 20:26:04 +0100 Subject: [PATCH 18/29] Minor typo Signed-off-by: Leo Siepel --- .github/.markdownlint.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.markdownlint.yaml b/.github/.markdownlint.yaml index d9dc234c8dab4..f545d833f91ab 100644 --- a/.github/.markdownlint.yaml +++ b/.github/.markdownlint.yaml @@ -2,7 +2,7 @@ default: true -# Expect dash usage for unorderd lists +# Expect dash usage for unordered lists MD004: style: dash @@ -28,7 +28,7 @@ MD033: false MD046: style: fenced -# Emphasiszis in underscore +# Emphasis in underscore MD049: style: underscore From 171f932d546fcbb960126b080f77e04b8ad2b32c Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Sun, 1 Feb 2026 10:47:34 +0100 Subject: [PATCH 19/29] Fix logging Signed-off-by: Leo Siepel --- .github/scripts/maven-build | 47 ++++++++++++++++++++++++++-------- .github/workflows/ci-build.yml | 2 +- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/.github/scripts/maven-build b/.github/scripts/maven-build index f6cac0dd899e5..de4b69b6d18e2 100755 --- a/.github/scripts/maven-build +++ b/.github/scripts/maven-build @@ -14,16 +14,41 @@ function print_reactor_summary() { cat "$BUILD_LOG" | sed -n "${start},${end}p" | sed 's/\[INFO\] //' } +function emit_markdownlint_annotations() { + [[ -f "$BUILD_LOG" ]] || return 0 + + # Match markdownlint errors even if the line has prefixes before [INFO] + grep -aE '\[INFO\] .*\.md:[0-9]+(:[0-9]+)? error MD' "$BUILD_LOG" \ + | sed -E 's/^.*\[INFO\] //' \ + | while IFS= read -r l; do + file=$(echo "$l" | sed -E 's/^([^:]+\.md):.*/\1/') + line=$(echo "$l" | sed -E 's/^[^:]+\.md:([0-9]+).*/\1/') + + if echo "$l" | grep -qE '^[^:]+\.md:[0-9]+:[0-9]+ error MD'; then + col=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+:([0-9]+) error .*/\1/') + msg=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+:[0-9]+ error (MD[^ ]+) (.*)$/\1 \2/') + echo "::error file=$file,line=$line,col=$col::$msg" + else + msg=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+ error (MD[^ ]+) (.*)$/\1 \2/') + echo "::error file=$file,line=$line::$msg" + fi + done +} + function mvnp() { - set -o pipefail # exit build with error when pipes fail - local reactor_size=$(find -name "pom.xml" | grep -vE '/src/|/target/' | wc -l) - local padding=$(bc -l <<< "scale=0;2*(l($reactor_size)/l(10)+1)") - local command=(./mvnw $@) - exec "${command[@]}" 2>&1 | # execute, redirect stderr to stdout - tee "$BUILD_LOG" | # write output to log - stdbuf -oL grep -aE '^\[INFO\] Building .+ \[.+\]$' | # filter progress - stdbuf -o0 sed -uE 's/^\[INFO\] Building (.*[^ ])[ ]+\[([0-9]+\/[0-9]+)\]$/\2| \1/' | # prefix project name with progress - stdbuf -o0 sed -e :a -e "s/^.\{1,${padding}\}|/ &/;ta" # right align progress with padding + set -o pipefail # exit build with error when pipes fail + local reactor_size=$(find -name "pom.xml" | grep -vE '/src/|/target/' | wc -l) + local padding=$(bc -l <<< "scale=0;2*(l($reactor_size)/l(10)+1)") + local command=(bash ./mvnw "$@") + + "${command[@]}" 2>&1 | \ + tee "$BUILD_LOG" | \ + stdbuf -oL grep -aE '^\[INFO\] Building .+ \[.+\]$' | \ + stdbuf -o0 sed -uE 's/^\[INFO\] Building (.*[^ ])[ ]+\[([0-9]+\/[0-9]+)\]$/\2| \1/' | \ + stdbuf -o0 sed -e :a -e "s/^.\{1,${padding}\}|/ &/;ta" + + # Exit code of Maven is the first command in the pipeline + return "${PIPESTATUS[0]}" } function build_all() { @@ -38,6 +63,8 @@ function build_all() { status=$? echo + emit_markdownlint_annotations + if [ $status -eq 0 ]; then print_reactor_summary else @@ -104,5 +131,5 @@ function build_based_on_changes() { fi } -./mvnw -v +bash ./mvnw -v build_based_on_changes diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 648bc7da44036..e64bce0a9d439 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -67,7 +67,7 @@ jobs: - name: Build id: build - run: './.github/scripts/maven-build' + run: bash './.github/scripts/maven-build' env: CHANGED_FILES: ${{ steps.files.outputs.all }} MAVEN_OPTS: >- From edae3e702ca5a52884e25be1bb54fa831950b1a5 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Sun, 1 Feb 2026 10:53:07 +0100 Subject: [PATCH 20/29] Revert .gitignore Signed-off-by: Leo Siepel --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index cab43babb26b6..95de5ec9f4da2 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,4 @@ pom.xml.versionsBackup .metals .vim shell.nix -tags \ No newline at end of file +tags From 7c2cbaf243923ee1bdac9b10fa2814313362c2e8 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Sun, 1 Feb 2026 10:56:04 +0100 Subject: [PATCH 21/29] Cleanup pom Signed-off-by: Leo Siepel --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index c7e3cceed404c..ddfbd29d18f0d 100644 --- a/pom.xml +++ b/pom.xml @@ -861,7 +861,6 @@ Import-Package: \\ ${oh.java.version} - From fa738bc3a810276837d4e4414a93b04265fc1d2a Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Sun, 1 Feb 2026 11:49:54 +0100 Subject: [PATCH 22/29] Fix linkable errors Signed-off-by: Leo Siepel --- .github/scripts/maven-build | 49 +++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/.github/scripts/maven-build b/.github/scripts/maven-build index de4b69b6d18e2..9c4e4b6a50301 100755 --- a/.github/scripts/maven-build +++ b/.github/scripts/maven-build @@ -14,25 +14,42 @@ function print_reactor_summary() { cat "$BUILD_LOG" | sed -n "${start},${end}p" | sed 's/\[INFO\] //' } -function emit_markdownlint_annotations() { +gha_escape() { + sed -e 's/%/%25/g' -e 's/\r/%0D/g' -e 's/\n/%0A/g' +} + +emit_markdownlint_annotations() { [[ -f "$BUILD_LOG" ]] || return 0 - # Match markdownlint errors even if the line has prefixes before [INFO] - grep -aE '\[INFO\] .*\.md:[0-9]+(:[0-9]+)? error MD' "$BUILD_LOG" \ - | sed -E 's/^.*\[INFO\] //' \ - | while IFS= read -r l; do - file=$(echo "$l" | sed -E 's/^([^:]+\.md):.*/\1/') - line=$(echo "$l" | sed -E 's/^[^:]+\.md:([0-9]+).*/\1/') - - if echo "$l" | grep -qE '^[^:]+\.md:[0-9]+:[0-9]+ error MD'; then - col=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+:([0-9]+) error .*/\1/') - msg=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+:[0-9]+ error (MD[^ ]+) (.*)$/\1 \2/') - echo "::error file=$file,line=$line,col=$col::$msg" - else - msg=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+ error (MD[^ ]+) (.*)$/\1 \2/') - echo "::error file=$file,line=$line::$msg" + while IFS= read -r l; do + file=$(echo "$l" | sed -E 's/^([^:]+\.md):.*/\1/') + line=$(echo "$l" | sed -E 's/^[^:]+\.md:([0-9]+).*/\1/') + + # Repair path so GitHub can link it (repo-root relative) + if [[ ! -f "$file" ]]; then + if [[ -f "bundles/$file" ]]; then + file="bundles/$file" + elif [[ -f "itests/$file" ]]; then + file="itests/$file" fi - done + fi + + if echo "$l" | grep -qE '^[^:]+\.md:[0-9]+:[0-9]+ error MD'; then + col=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+:([0-9]+) error .*/\1/') + rule=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+:[0-9]+ error (MD[^ ]+) .*/\1/') + rest=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+:[0-9]+ error MD[^ ]+ (.*)$/\1/') + rest_esc=$(printf '%s' "$rest" | gha_escape) + echo "::error file=$file,line=$line,col=$col,title=$rule::$rest_esc" + else + rule=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+ error (MD[^ ]+) .*/\1/') + rest=$(echo "$l" | sed -E 's/^[^:]+\.md:[0-9]+ error MD[^ ]+ (.*)$/\1/') + rest_esc=$(printf '%s' "$rest" | gha_escape) + echo "::error file=$file,line=$line,title=$rule::$rest_esc" + fi + done < <( + grep -aE '\[INFO\] .*\.md:[0-9]+(:[0-9]+)? error MD' "$BUILD_LOG" \ + | sed -E 's/^.*\[INFO\] //' + ) } function mvnp() { From 8967e3b14726f23f608bbe26024bee54530745e0 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Sun, 1 Feb 2026 22:11:53 +0100 Subject: [PATCH 23/29] Attempt to isolate Signed-off-by: Leo Siepel --- bundles/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/pom.xml b/bundles/pom.xml index 87ac4c3dbb2dc..e82a107ed8567 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -796,7 +796,7 @@ ${markdownlint.skip} - ${maven.multiModuleProjectDirectory}/target/.mvn/node + ${maven.multiModuleProjectDirectory}/target/.mvn/node_md v24.12.0 @@ -811,7 +811,7 @@ ${markdownlint.skip} ${project.basedir} - ${maven.multiModuleProjectDirectory}/target/.mvn/node + ${maven.multiModuleProjectDirectory}/target/.mvn/node_md exec --yes markdownlint-cli2 -- **/*.md !**/target/** !**/node_modules/** --config ${maven.multiModuleProjectDirectory}/.github/.markdownlint.yaml From defea8abbf68ffeb58637f014924cd20ee5622db Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Sun, 1 Feb 2026 23:11:44 +0100 Subject: [PATCH 24/29] Downgrade node Signed-off-by: Leo Siepel --- bundles/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/pom.xml b/bundles/pom.xml index e82a107ed8567..02eb1787009d1 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -796,8 +796,8 @@ ${markdownlint.skip} - ${maven.multiModuleProjectDirectory}/target/.mvn/node_md - v24.12.0 + ${maven.multiModuleProjectDirectory}/target/.mvn/node + v20.11.1 @@ -811,7 +811,7 @@ ${markdownlint.skip} ${project.basedir} - ${maven.multiModuleProjectDirectory}/target/.mvn/node_md + ${maven.multiModuleProjectDirectory}/target/.mvn/node exec --yes markdownlint-cli2 -- **/*.md !**/target/** !**/node_modules/** --config ${maven.multiModuleProjectDirectory}/.github/.markdownlint.yaml From 30a9402036ed72e396cf1b2bc46ea60822cd3dfa Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Sun, 1 Feb 2026 23:21:17 +0100 Subject: [PATCH 25/29] Revert downgrade Signed-off-by: Leo Siepel --- bundles/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/pom.xml b/bundles/pom.xml index 02eb1787009d1..87ac4c3dbb2dc 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -797,7 +797,7 @@ ${markdownlint.skip} ${maven.multiModuleProjectDirectory}/target/.mvn/node - v20.11.1 + v24.12.0 From ee2b4448b0d849037335e3b67d0208822ae51f58 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Mon, 2 Feb 2026 22:07:34 +0100 Subject: [PATCH 26/29] Another attemp to isolate Signed-off-by: Leo Siepel --- bundles/org.openhab.binding.matter/pom.xml | 2 ++ bundles/pom.xml | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/bundles/org.openhab.binding.matter/pom.xml b/bundles/org.openhab.binding.matter/pom.xml index 91cf45d5dcef0..99fea45e12a35 100644 --- a/bundles/org.openhab.binding.matter/pom.xml +++ b/bundles/org.openhab.binding.matter/pom.xml @@ -25,6 +25,7 @@ frontend-maven-plugin 2.0.0 + ${project.build.directory}/frontend-matter v20.12.2 10.5.0 @@ -101,6 +102,7 @@ frontend-maven-plugin 2.0.0 + ${project.build.directory}/frontend-matter v20.12.2 10.5.0 diff --git a/bundles/pom.xml b/bundles/pom.xml index 87ac4c3dbb2dc..db4c86e22afdd 100644 --- a/bundles/pom.xml +++ b/bundles/pom.xml @@ -786,6 +786,18 @@ com.github.eirslett frontend-maven-plugin 2.0.0 + + + ${markdownlint.skip} + + + ${maven.multiModuleProjectDirectory}/target/.mvn/node-markdownlint + v24.12.0 + + + 11.6.2 + + install-node-and-npm @@ -793,12 +805,6 @@ install-node-and-npm validate - - ${markdownlint.skip} - - ${maven.multiModuleProjectDirectory}/target/.mvn/node - v24.12.0 - @@ -808,10 +814,7 @@ validate - ${markdownlint.skip} - ${project.basedir} - ${maven.multiModuleProjectDirectory}/target/.mvn/node exec --yes markdownlint-cli2 -- **/*.md !**/target/** !**/node_modules/** --config ${maven.multiModuleProjectDirectory}/.github/.markdownlint.yaml From a2496b3beab74078976848bf51040e1a355cdf40 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Tue, 3 Feb 2026 20:30:35 +0100 Subject: [PATCH 27/29] Add jsscripting isolation Signed-off-by: Leo Siepel --- bundles/org.openhab.automation.jsscripting/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/bundles/org.openhab.automation.jsscripting/pom.xml b/bundles/org.openhab.automation.jsscripting/pom.xml index 61384f7b9907c..193acf124fc73 100644 --- a/bundles/org.openhab.automation.jsscripting/pom.xml +++ b/bundles/org.openhab.automation.jsscripting/pom.xml @@ -47,6 +47,7 @@ frontend-maven-plugin 2.0.0 + target/js ${node.version} target/js From 8a8f7cdd272636717308b022bdc88d25b3aa465f Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Wed, 4 Feb 2026 16:22:28 +0100 Subject: [PATCH 28/29] Align folder Signed-off-by: Leo Siepel --- bundles/org.openhab.binding.matter/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.matter/pom.xml b/bundles/org.openhab.binding.matter/pom.xml index 99fea45e12a35..26ce51d10da80 100644 --- a/bundles/org.openhab.binding.matter/pom.xml +++ b/bundles/org.openhab.binding.matter/pom.xml @@ -25,7 +25,7 @@ frontend-maven-plugin 2.0.0 - ${project.build.directory}/frontend-matter + ${project.build.directory}/matter-server v20.12.2 10.5.0 @@ -102,7 +102,7 @@ frontend-maven-plugin 2.0.0 - ${project.build.directory}/frontend-matter + ${project.build.directory}/matter-server v20.12.2 10.5.0 From 92c2531c97a31ee50e5fd9999c6a80a97a032c46 Mon Sep 17 00:00:00 2001 From: Leo Siepel Date: Wed, 4 Feb 2026 20:16:28 +0100 Subject: [PATCH 29/29] Fix install folder Signed-off-by: Leo Siepel --- bundles/org.openhab.binding.matter/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/org.openhab.binding.matter/pom.xml b/bundles/org.openhab.binding.matter/pom.xml index 26ce51d10da80..3223dc5c90774 100644 --- a/bundles/org.openhab.binding.matter/pom.xml +++ b/bundles/org.openhab.binding.matter/pom.xml @@ -25,7 +25,7 @@ frontend-maven-plugin 2.0.0 - ${project.build.directory}/matter-server + matter-server v20.12.2 10.5.0 @@ -102,7 +102,7 @@ frontend-maven-plugin 2.0.0 - ${project.build.directory}/matter-server + matter-server v20.12.2 10.5.0