Skip to content

Commit 5dd1eef

Browse files
author
Evgeniy Kuznetsov
committed
dist/tools: add static check for missing board doc.md files
1 parent d63780a commit 5dd1eef

2 files changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (C) 2026 Evgeniy Kuznetsov <evvykuznetsov@edu.hse.ru>
4+
#
5+
# This file is subject to the terms and conditions of the GNU Lesser
6+
# General Public License v2.1. See the file LICENSE in the top level
7+
# directory for more details.
8+
9+
: "${RIOTBASE:=$(cd "$(dirname "$0")"/../../../ || exit; pwd)}"
10+
: "${RIOTTOOLS:=${RIOTBASE}/dist/tools}"
11+
12+
# not running shellcheck with -x in the CI --> disable SC1091
13+
# shellcheck disable=SC1091
14+
. "${RIOTTOOLS}"/ci/github_annotate.sh
15+
16+
github_annotate_setup
17+
18+
EXIT_CODE=0
19+
20+
for board_dir in "${RIOTBASE}"/boards/*/; do
21+
board=$(basename "${board_dir}")
22+
23+
[ "${board}" = "common" ] && continue
24+
25+
if [ ! -f "${board_dir}/doc.md" ]; then
26+
MSG="boards/${board}/doc.md is missing"
27+
if github_annotate_is_on; then
28+
github_annotate_error_no_file "${MSG}"
29+
else
30+
echo "ERROR: ${MSG}"
31+
fi
32+
EXIT_CODE=1
33+
fi
34+
done
35+
36+
github_annotate_teardown
37+
38+
exit "${EXIT_CODE}"

dist/tools/ci/static_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ run ./dist/tools/headerguards/check.sh
127127
run ./dist/tools/buildsystem_sanity_check/check.sh
128128
run ./dist/tools/feature_resolution/check.sh
129129
run ./dist/tools/boards_supported/check.sh
130+
run ./dist/tools/board_doc_check/check.sh
130131
run ./dist/tools/codespell/check.sh
131132
run ./dist/tools/cargo-checks/check.sh
132133
run ./dist/tools/examples_check/check_has_readme.sh

0 commit comments

Comments
 (0)