Repository navigation
Conversation
Add Python script which checks that HDL READMEs comply with the template. Flag inconsistencies and fail the CI run if README isn't compliant. Has two modes: manual (which checks all READMEs) and PR triggered (which checks only the READMEs covered by a specific PR). Deprecate check_readme.sh and port its checks into check_readme_template.py. Signed-off-by: bia1708 <bianca-maria.popu@analog.com>
| # `<p>/<c>/README.md`; an added `projects/<p>/*.tcl` queues just | ||
| # `<p>/README.md`. If the queued path IS the file the PR added, | ||
| # it's already in (a) and `sort -u` folds the duplicate. | ||
| git diff --name-only --diff-filter=A "$BASE_SHA" "$HEAD_SHA" \ |
There was a problem hiding this comment.
Same two-dot vs ... point as above. Consider moving this whole selection logic into the Python script (--base/--head). It would be unit-testable and would share PROJECTS_IGNORED_SUBDIRS with the checker.
There was a problem hiding this comment.
I would keep the python script arguments as-is. It's easier to run locally (if anyone wants to) by just giving it the README path. But I'll look at changing it to ...
There was a problem hiding this comment.
The check name changes from README checker / lint to README template check / check-readme-template. If branch protection requires the old name, merges will be blocked. To be checked by a repo admin.
There was a problem hiding this comment.
I'll tweak the branch protection rules after merging this, but thanks for the heads-up!
Signed-off-by: bia1708 <bianca-maria.popu@analog.com>
PR Description
Add Python script which checks that HDL READMEs comply with the template. Flag inconsistencies and fail the CI run if README isn't compliant. Has two modes: manual (which checks all READMEs) and PR triggered (which checks only the READMEs covered by a specific PR). Deprecate check_readme.sh and port its checks into check_readme_template.py.
Test run for all files (the same would show for a manual trigger): https://github.com/analogdevicesinc/hdl/actions/runs/45652912945/job/139341831261
Test run for a mock PR (with annotations instead of console errors): bia1708#113
This PR should be merged after all READMEs are migrated to the new template (so as not to disrupt PRs). After merging this PR, I'll add this as a mandatory check for PR merges.
PR Type
PR Checklist