Skip to content

Commit d8832a4

Browse files
committed
ci: exclude api/platform from README check
Add exclusion mechanism for driver categories that don't require README.rst files. The drivers:api and drivers:platform folders are now excluded from the documentation check as they contain interface files and platform-specific implementations rather than standalone driver implementations. Additional categories can be easily added to the excluded_categories array in the future. Signed-off-by: Antoniu Miclaus <[email protected]>
1 parent c229658 commit d8832a4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ci/documentation.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ COMMIT_RANGE="$1"
3636
check_new_components_readme() {
3737
echo_green "Checking for new drivers/projects and their README.rst files..."
3838

39+
# Excluded driver categories that don't require README.rst
40+
local excluded_categories=("api" "platform")
41+
3942
# Get all added files only
4043
git diff --name-only --diff-filter=A $COMMIT_RANGE | while read -r file; do
4144
# Check if this is a file in drivers/ or projects/ directory
@@ -46,6 +49,14 @@ check_new_components_readme() {
4649
if [ "$top_dir" = "drivers" ]; then
4750
# For drivers: drivers/category/driver_name/...
4851
local category=$(echo "$file" | cut -d'/' -f2)
52+
53+
# Skip excluded driver categories
54+
for excluded in "${excluded_categories[@]}"; do
55+
if [ "$category" = "$excluded" ]; then
56+
continue 2
57+
fi
58+
done
59+
4960
component_dir=$(echo "$file" | cut -d'/' -f3)
5061
local component_path="drivers/$category/$component_dir"
5162
elif [ "$top_dir" = "projects" ]; then

0 commit comments

Comments
 (0)