Instead of the bespoke tools/codeformat.py script, it would probably be better to move to the popular pre-commit tool to invoke all linting/formatting/static-analysis tools. Github Actions workflows would also need to be updated to invoke pre-commit.
If migrating to pre-commit sounds good, I can open up a PR.