Skip to content
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

Replace legacy hooks with pre-commit Python tool #1504

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

Repiteo
Copy link
Contributor

@Repiteo Repiteo commented Jun 24, 2024

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.

@Repiteo Repiteo added enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup labels Jun 24, 2024
@Repiteo Repiteo added this to the 4.x milestone Jun 24, 2024
@Repiteo Repiteo requested review from a team as code owners June 24, 2024 20:38
@dsnopek
Copy link
Collaborator

dsnopek commented Jun 25, 2024

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 dsnopek merged commit 7d7799b into godotengine:master Jun 25, 2024
12 checks passed
@Repiteo Repiteo deleted the pre-commit-hooks branch June 25, 2024 16:42
@dsnopek
Copy link
Collaborator

dsnopek commented Jul 17, 2024

Cherry-picked for 4.2 in PR #1527

@dsnopek
Copy link
Collaborator

dsnopek commented Jul 17, 2024

Cherry-picked for 4.1 in PR #1529

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement on the current functionality topic:buildsystem Related to the buildsystem or CI setup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants