-
Notifications
You must be signed in to change notification settings - Fork 126
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
ci: Add format check workflow #766
Conversation
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.
Can this check be easily overriden ignored when needed? For instance we don't want one-line fix PRs to be drowned in whitespace changes.
Add setting for the ruff formatter to check during CI. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
e75081d
to
32b9e1b
Compare
Went a step further, new files are always fully checked, changed chunks now also need to be formatted. Experimenting shown here: https://github.com/pdgendt/west/actions/workflows/format.yml with annotations |
edd1648
to
c9c21a7
Compare
cc4530a
to
a487d53
Compare
Checking only modified chunks sounds great in theory but I'm concerned that the code of the Github workflow is getting too complicated and hard to maintain. It's not like As long as this check does not block merges, I think checking only new and modified files (the entire file each time) is a good enough trade-off. For sure that trade-off has been working well for years with |
a487d53
to
a27015a
Compare
Updated the PR accordingly:
|
4a9c26e
to
c9af293
Compare
4c6bf3f
to
7d39f6c
Compare
Add a CI workflow to report formatting issues on changed files. This is to gradually update files in the repository to be conform with PEP8 formatting. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Formatting test_alias.py is trivial. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Formatting test_commands.py is trivial. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
7d39f6c
to
12c4f8d
Compare
Add a CI workflow to report formatting issues on changed files. This is to gradually update files in the repository to be conform with PEP8 formatting.