Skip to content

Conversation

@jimmo
Copy link
Member

@jimmo jimmo commented Jul 25, 2023

  1. Simplify codeformat.py back to be the same as the main repo version, but without .c/.h support. (It's pretty much just a wrapper around black now)
  2. Add pre-commit support (same as main repo).
  3. Split the ruff action into its own CI action (same as main repo).

This work was funded through GitHub Sponsors.

@jimmo
Copy link
Member Author

jimmo commented Jul 25, 2023

In separate PRs, there are two follow-ups:

  • Add checking of the git commit messages. In the main repo we use our own tool (tools/verifygitlog.py) but I don't really want to duplicate that here, and I have a proof-of-concept use the standard gitlint tool that works nicely with pre-commit.
  • Same as the main, repo, add codespell checks too.

@dpgeorge
Copy link
Member

This looks good, thanks.

I also agree about the follow-up actions.

jimmo added 4 commits July 27, 2023 12:26
This was added to speed up running codeformat.py when only a small number
of files are changed, but it breaks running the tool on the master branch.
The pre-commit tool handles this correctly, and it's working well in the
main repo, so we can remove the special handling.

This makes codeformat.py behave identically to the main repository, but
without additional code for handling .c/.h files.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This matches the main repo, and conceputually ruff is not strictly doing
"code formatting".

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
@dpgeorge dpgeorge force-pushed the codeformat-actions branch from 45d8dc1 to ce3f282 Compare July 27, 2023 02:31
@dpgeorge dpgeorge merged commit ce3f282 into micropython:master Jul 27, 2023
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