Skip to content

dist/tools: add static check for missing board doc.md files#22240

Merged
crasbe merged 2 commits intoRIOT-OS:masterfrom
zhqqzn:22224-add-board-doc-check
May 6, 2026
Merged

dist/tools: add static check for missing board doc.md files#22240
crasbe merged 2 commits intoRIOT-OS:masterfrom
zhqqzn:22224-add-board-doc-check

Conversation

@zhqqzn
Copy link
Copy Markdown

@zhqqzn zhqqzn commented May 5, 2026

Contribution description

This PR adds a static test (.sh script) that checks whether every ported board has a mandatory doc.md file.
The "common" directory is skipped as it's not a standalone ported board.

Testing procedure

./dist/tools/board_doc_check/check.sh
or make static-test

If all boards contain the required doc.md file, the test passes silently. Otherwise, it fails and reports the directories where the required file is missing.

Issues/PRs references

Closes #22224. See also #22221.

Depends on #22221.

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • none

@github-actions github-actions Bot added the Area: tools Area: Supplementary tools label May 5, 2026
@crasbe crasbe added Type: new feature The issue requests / The PR implemements a new feature for RIOT CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 5, 2026
@riot-ci
Copy link
Copy Markdown

riot-ci commented May 5, 2026

Murdock results

✔️ PASSED

76e9269 doc/guides: update porting_boards to require doc.md for new boards

Success Failures Total Runtime
1 0 1 01m:35s

Artifacts

@crasbe crasbe added the State: waiting for other PR State: The PR requires another PR to be merged first label May 5, 2026
Copy link
Copy Markdown
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

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

Thank you for providing the static test :)

I'm afraid we can't merge it though until #22221 is completed, but perhaps this is a boost in motivation for @AnnsAnns to finish it :)

Comment thread dist/tools/board_doc_check/check.sh Outdated
@zhqqzn
Copy link
Copy Markdown
Author

zhqqzn commented May 5, 2026

OK, thanks for the review!

@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented May 5, 2026

Perhaps you can use the opportunity to also change the wording in our guides about Porting Boards: https://doc.riot-os.org/advanced_tutorials/porting_boards/#docmd (in doc/guides/advanced_tutorials/porting_boards.mdx)

Something like this:

diff --git a/doc/guides/advanced_tutorials/porting_boards.mdx b/doc/guides/advanced_tutorials/porting_boards.mdx
index 1d0ab59fc4..c4b8f121ec 100644
--- a/doc/guides/advanced_tutorials/porting_boards.mdx
+++ b/doc/guides/advanced_tutorials/porting_boards.mdx
@@ -197,9 +197,12 @@ PROGRAMMER ?= openocd

 ### doc.md

-Although not explicitly needed, if upstreamed and as a general good
-practice, this file holds all `BOARD` documentation. This can include
+This file holds all `BOARD` documentation and is a necessary prerequisite
+for every new board that is ported. This file can (and should) include
 datasheet reference, documentation on how to flash, etc.
+Proper documentation about your board makes it easier for others to use it
+to the full capacity. Remember to also mention any features that are not
+supported yet!

 The documentation must be under the proper doxygen group, you can compile the
 documentation by calling `make doc` and then open the generated html file on

@crasbe crasbe removed the State: waiting for other PR State: The PR requires another PR to be merged first label May 5, 2026
@zhqqzn zhqqzn force-pushed the 22224-add-board-doc-check branch from 2cd677c to 2cb0a95 Compare May 5, 2026 15:53
@github-actions github-actions Bot added the Area: doc Area: Documentation label May 5, 2026
Comment thread dist/tools/board_doc_check/check.sh Outdated
@zhqqzn zhqqzn requested a review from crasbe May 6, 2026 06:02
Copy link
Copy Markdown
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

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

Looks good. You don't have to necessarily re-request a review, I get e-mail notifications about any changes and any conversation in this PR anyways.

You can squash the three commits regarding the new static test and leave two commits overall: one for the new static test and one for the guides change.

Evgeniy Kuznetsov and others added 2 commits May 6, 2026 12:54
Co-authored-by: crasbe <crasbe@gmail.com>

Co-authored-by: Marian Buschsieweke <maribu@users.noreply.github.com>
@zhqqzn zhqqzn force-pushed the 22224-add-board-doc-check branch from e84f6f7 to 76e9269 Compare May 6, 2026 09:58
@crasbe crasbe enabled auto-merge May 6, 2026 10:02
@crasbe crasbe added this pull request to the merge queue May 6, 2026
Merged via the queue into RIOT-OS:master with commit 336efd2 May 6, 2026
26 checks passed
@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented May 6, 2026

Thank you for providing the test and congratulations to your first RIOT contribution 🥳

@zhqqzn
Copy link
Copy Markdown
Author

zhqqzn commented May 6, 2026

Thank you too (and maribu) for the feedback and suggestions!

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

Labels

Area: doc Area: Documentation Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test to check that supported boards contain a doc.md file

4 participants