-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Board Header Check Action #2519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Nice! 😀 I'll give this a more detailed look next week. |
@will-v-pi Something else I just thought of - might be nice to also use https://github.com/actions/labeler so that any PRs modifying files in the |
on: | ||
push: | ||
paths: | ||
- 'src/boards/include/boards/**' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there's probably no reason that this shouldn't be shortened to just 'src/boards/**'
, given that nothing else lives in that directory?
# Python <3.11 doesn't have ExceptionGroup, so define a simple one | ||
class ExceptionGroup(Exception): | ||
def __init__(self, message, errors): | ||
message += "\n" + "\n".join(e.__str__() for e in errors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to use str(e)
rather than e.__str__()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of my questions are important enough to prevent this being merged, especially as the very-similar #2525 has already been merged.
Add a GitHub action to run
check_all_board_headers.sh
, but only when either the board headers are updated, or the scripts are updatedAlso modify the
check_board_header.py
script to create multiple exceptions as it goes, and only raise them when necessary, so that you get more errors at once in the output (rather than just getting the first error it finds)For an example of the errors this will throw, see https://github.com/will-v-pi/pico-sdk/actions/runs/15611738462/job/43974078599
Maintains compatibility with Python < 3.11 for running locally, as
ExceptionGroup
was added then