Skip to content

Comments

Add markdown action#19010

Open
lsiepel wants to merge 29 commits intoopenhab:mainfrom
lsiepel:worlfown-markdownlinter
Open

Add markdown action#19010
lsiepel wants to merge 29 commits intoopenhab:mainfrom
lsiepel:worlfown-markdownlinter

Conversation

@lsiepel
Copy link
Contributor

@lsiepel lsiepel commented Jul 22, 2025

Changes:

Please provide feedback.

Fixes: #13858

Refs: #19011

@lsiepel lsiepel added the infrastructure Build system and Karaf related issues and PRs label Jul 22, 2025
@lsiepel
Copy link
Contributor Author

lsiepel commented Jul 22, 2025

nosborn/github-action-markdown-cli@508d6ce and tcort/github-action-markdown-link-check@a800ad5 are not allowed to be used in openhab/openhab-addons. Actions in this workflow must be: within a repository owned by openhab, created by GitHub, or matching the following: Ana06/get-changed-files@, ghys/checkstyle-github-action@, stCarolas/setup-maven@*.

Who can allow this?

@holgerfriedrich
Copy link
Member

Add-ons maintainers should be able to configure GH repo settings.
I can't help, I can do it only for core and distro.

There you can add exceptions.
Since the last supply chain attack, we have configured it a bit stricter.

@lsiepel lsiepel mentioned this pull request Jul 22, 2025
20 tasks
@lsiepel lsiepel marked this pull request as ready for review July 22, 2025 20:26
@lsiepel lsiepel requested a review from a team as a code owner July 22, 2025 20:26
Copy link
Contributor

@dag81 dag81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I presume this config is tested :) - well I tried not part of the required group - the more checks in GHA the better.

@lsiepel
Copy link
Contributor Author

lsiepel commented Jul 22, 2025

Yes, it is. :-)

@lsiepel
Copy link
Contributor Author

lsiepel commented Jul 26, 2025

What am I missing? We fixed the 1800+ markdown issues. Re running the tools shows no progress. Looks like it gets old source code?!

@wborn
Copy link
Member

wborn commented Jul 26, 2025

There's one more to merge #19028

@lsiepel
Copy link
Contributor Author

lsiepel commented Jul 26, 2025

Updated the PR, now it is down to 250. Yes one PR to go. I also wonder what happend to freebox, as that binding shows errors while being removed.

@lsiepel
Copy link
Contributor Author

lsiepel commented Jul 26, 2025

Only freeboxos is left.
I can fix that when I have access to my computer in two weeks.

Error: bundles/org.openhab.binding.freeboxos/README.md:53:86 MD034/no-bare-urls Bare URL used [Context: "http://192.168.0.2:8080/"]
Error: bundles/org.openhab.binding.freeboxos/README.md:59:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:59:9 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:71:18 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:71:28 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:72:79 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:72:88 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:76:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:76:16 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:76:21 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:76:27 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:84:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:84:12 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:84:17 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:84:31 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:96:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:96:9 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:96:14 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:96:19 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:103:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:103:10 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:111:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:111:10 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:118:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:118:14 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:131:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:131:14 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:140:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:140:14 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:150:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:150:8 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:160:5 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:160:19 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:160:22 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:160:30 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:160:33 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:160:37 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:160:42 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:160:48 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:246:158 MD056/table-column-count Table column count [Expected: 6; Actual: 5; Too few cells, row will be missing data]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:29 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:43 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:46 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:53 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:56 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:61 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:64 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:73 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:76 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:85 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:91 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]
Error: bundles/org.openhab.binding.freeboxos/README.md:248:94 MD049/emphasis-style Emphasis style [Expected: underscore; Actual: asterisk]

@wborn
Copy link
Member

wborn commented Jul 26, 2025

Does it need to be rebased?

@lsiepel
Copy link
Contributor Author

lsiepel commented Jul 26, 2025

Does it need to be rebased?

Freebox and freeboxos are separate bindings. The first is removed and now no longer (after merge to current head) shows no more warnings. I think somehow missed freeboxos.

jlaur added a commit to jlaur/openhab-addons that referenced this pull request Jul 26, 2025
Related to openhab#19010

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@jlaur jlaur mentioned this pull request Jul 26, 2025
@jlaur
Copy link
Contributor

jlaur commented Jul 26, 2025

Only freeboxos is left.
I can fix that when I have access to my computer in two weeks.

Thanks for all your efforts on this! 👍 I have created #19062 covering FreeboxOS. Now enjoy your holiday. 😎

@wborn
Copy link
Member

wborn commented Jul 27, 2025

Yes you've certainly earned a nice holiday after fixing all these Markdown issues! 😉

Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some docs on how to run this locally would also be nice so contributors can more quickly get feedback on their changes and do not have to wait for CI.

Would be nice if it becomes part of the Spotless config but it doesn't seem to support markdownlint.

Another possibility for being able to easily run it locally would be by using the frontend-maven-plugin to run markdownlint.

Maybe it can become part of the CI workflow so we have only have one badge to check for the overal status?

@lsiepel
Copy link
Contributor Author

lsiepel commented Jul 27, 2025

There is room for improvement. I have not found a way to run it locally without additional setup steps.

Edit: when the frontend-maven-plugin is added to the root pom, will the check be run by all mvn builds even when someone only has the binding subfolder as project opened? If so this would be very useful. Nevertheless this ci action is still needed as gatekeeper

when I’m back I will add some lines to the docs (in a separate PR)

lsiepel pushed a commit that referenced this pull request Jul 27, 2025
* Fix Markdown

Related to #19010

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@lsiepel
Copy link
Contributor Author

lsiepel commented Jul 27, 2025

All green, ready to merge

phenix1990 pushed a commit to phenix1990/openhab-addons that referenced this pull request Jul 31, 2025
* Fix Markdown

Related to openhab#19010

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@lsiepel
Copy link
Contributor Author

lsiepel commented Aug 3, 2025

Ping @openhab/add-ons-maintainers i prefer not to wait as new markdown issues will then probably be merged.

@jlaur
Copy link
Contributor

jlaur commented Aug 3, 2025

@wborn - can you have a look? Unfortunately my knowledge here is limited, so I would only be able to blindly approve and merge it and see what happens.

@wborn
Copy link
Member

wborn commented Aug 5, 2025

If you address the review comments, I will help fixing any new issuess and test it locally based on the docs.

psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Aug 6, 2025
* Fix Markdown

Related to openhab#19010

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
@lsiepel
Copy link
Contributor Author

lsiepel commented Aug 12, 2025

Made some progress. I added markdownlint to the mvn verify step. It is very challenging as the build proces can be started from two places: the project root or a bundle. I managed to fix these working directory issues except for the last step: loading the markdown config file.
This file is in /.github/markdownlint.yaml but there does not seem to be a variable available that points to the root, it is always relative to the path.

Any ideas?

@wborn
Copy link
Member

wborn commented Aug 12, 2025

Maybe you can use ${basedirRoot}?

<checkstyleProperties>${basedirRoot}/tools/static-code-analysis/checkstyle/ruleset.properties</checkstyleProperties>

@lsiepel
Copy link
Contributor Author

lsiepel commented Aug 13, 2025

Thanks, that was exactly where i was looking for. I have now changed the paths and it is more clean now. Errors are interactive/clickable and point to the problematic file straight away. Nice!

Tried to run it from a few different bundles, all works as expected. I have removed the workflow as the markdown check is now part of the verify fase, so it should also be run from CI. I have a full build running now to see if that gives any findings. If not i think this is ready to get merged and/or get aditional feedback. Edit: locally the full build is succesfull it detects some markup issues that i will fix in another PR.

Edit: Is there some conflict with jsscripting? As the CI fails due to this error:
Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.15.1:npm (npm install) on project org.openhab.automation.jsscripting: Failed to run task: 'npm install openhab@5.12.0 webpack@^5.94.0 webpack-cli@^5.1.4 --prefix .' failed. java.io.IOException: /home/runner/work/openhab-addons/openhab-addons/bundles/org.openhab.automation.jsscripting/target/js doesn't exist. ->

lsiepel and others added 23 commits February 4, 2026 15:08
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
* Fix wrong command order
* Fix jsscripting conflicts

Signed-off-by: Wouter Born <github@maindrain.net>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
@lsiepel lsiepel force-pushed the worlfown-markdownlinter branch from a5326b6 to a2496b3 Compare February 4, 2026 14:08
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
@lsiepel
Copy link
Contributor Author

lsiepel commented Feb 4, 2026

@digitaldan could you be of any help here? What am i missing regarding the npm issues.

@digitaldan
Copy link
Contributor

Hi, I'm traveling for the next week, but will try and take a look when I have a little down time .

@digitaldan
Copy link
Contributor

@lsiepel on first glance, the installDirectory added to the pom.xml looks suspicious to me . We don't actually include any node or npm modules in the target matter binding which i think this is referring too? Yes, we build our matter websocket server with node/npm and webpack it up as a single file (matter.js) , and then copy this to a folder in the target jar (matter-server/matter.js), but nothing else. Is this failing b/c its expecting node/npm to be there?

@lsiepel
Copy link
Contributor Author

lsiepel commented Feb 5, 2026

@lsiepel on first glance, the installDirectory added to the pom.xml looks suspicious to me . We don't actually include any node or npm modules in the target matter binding which i think this is referring too? Yes, we build our matter websocket server with node/npm and webpack it up as a single file (matter.js) , and then copy this to a folder in the target jar (matter-server/matter.js), but nothing else. Is this failing b/c its expecting node/npm to be there?

I have a hard time to figure out what exactly fails and why, the logs are not that clear. The installdirectory seems to be as expected. Atleast when i build the matter binding without these changes, it builds fine and it ends up with the node folder in the matter-server folder, just like this PR. The .gitignore file also shows that this folder is used (and excluded for git).

Hopefully you can have a closer look when you are back to your omcputer, i have so many time on this and find troubleshooting this node stuff not that easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Build system and Karaf related issues and PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[General Documentation] Could/Should we add a markdownlint config?

6 participants