godotengine / godot-cpp

C++ bindings for the Godot script API
MIT License
1.69k stars 526 forks source link

Replace legacy hooks with `pre-commit` Python tool #1504

Closed Repiteo closed 3 months ago

Repiteo commented 3 months ago

Overhauls the hook system to utilize the main repo's pre-commit hook logic. Migrated relevant files and settings over as needed, as well as applying any detected changes. In particular, this changes the python formatting system from black to ruff & ensures all the tools used in the checks are now easily accessible via pyproject.toml. The misc/hooks folder was removed entirely, with all relevant logic being handled in misc/scripts or .pre-commit-config.yaml.

dsnopek commented 3 months ago

Thanks, this looks really great!

Seems to work perfectly in my testing. Skimming the changes, they seem to match all the equivalents in the Godot repo. And all the code style fixes seem good to me too.

dsnopek commented 2 months ago

Cherry-picked for 4.2 in PR https://github.com/godotengine/godot-cpp/pull/1527

dsnopek commented 2 months ago

Cherry-picked for 4.1 in PR https://github.com/godotengine/godot-cpp/pull/1529