Open Ryanf55 opened 1 year ago
Looks theres' some conflicts with Tools/gittools/pre-commit.py
which overwrites pre-commit.
(venv-ardupilot) ryan@ryan-B650-970:~/Development/ardu_ws/src/ardupilot$ pre-commit install
Running in migration mode with existing hooks at .git/hooks/pre-commit.legacy
Use -f to use only pre-commit.
pre-commit installed at .git/hooks/pre-commit
Additionally, pre-commit doesn't run without errors right now. It's not enforced in CI, so there will be regressions.
To start, we can add exceptions for all the current regressions, and enforce no new regressions in CI.
Would be nice to run astyle in CI too to prevent errors like these: https://github.com/ArduPilot/ardupilot/pull/24792#discussion_r1307250568
AP_DDS requires pre-commit to be run. If you don't have it set up, you have to run it and squash the changes. CI could actually support changing the files automatically.
Last time we discussed this in dev call for how
astyle
isn't applied automatically, I suggested pre-commit, however that was shot down because astyle is not available on all developer machines. With pre-commit auto-fixing the files in CI, this is no longer a concern, and could be adopted more widely across the repo.https://youtu.be/-5JoR29ZlrA?t=1738
Originally posted by @magicrub in https://github.com/ArduPilot/ardupilot/issues/23535#issuecomment-1512330756