Skip to content

ci: Add README template checker workflow - #2229

Open
bia1708 wants to merge 2 commits into
mainfrom
bia1708/readme-checker
Open

bia1708 wants to merge 2 commits into
mainfrom
bia1708/readme-checker

Conversation

@bia1708

@bia1708 bia1708 commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

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

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)
  • Documentation

PR Checklist

  • I have followed the code style guidelines
  • I have performed a self-review of changes
  • I have compiled all hdl projects and libraries affected by this PR
  • I have tested in hardware affected projects, at least on relevant boards
  • I have commented my code, at least hard-to-understand parts
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe files, Copyright etc)
  • I have not introduced new Warnings/Critical Warnings on compilation
  • I have added new hdl testbenches or updated existing ones

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" \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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 ...

Comment thread .github/workflows/readme_checker.yaml Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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>
@bia1708
bia1708 requested a review from ioanachelaru November 26, 2026 16:19

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants