Skip to content

Conversation

@enetheru
Copy link
Collaborator

I found an auto formatter inspired by black.
This is what would happen if it was added to the pre-commit hooks

@dsnopek
Copy link
Collaborator

dsnopek commented Feb 26, 2025

If we're good with the code style that this enforces, I'd personally be in support this. Auto formatting makes managing changes from multiple contributors easier.

Does this PR also affect CI? Like, will builds fail if the code in the PR doesn't match the auto formatting?

@enetheru
Copy link
Collaborator Author

If we're good with the code style that this enforces, I'd personally be in support this. Auto formatting makes managing changes from multiple contributors easier.

Only larger generator expressions get mangled, but i've put in some directives to turn off the auto formatter for them.
The code style isnt to my preference, but neither is everything else.

Does this PR also affect CI? Like, will builds fail if the code in the PR doesn't match the auto formatting?

Sure does. exactly the same behaviour as existing hooks.

@enetheru enetheru marked this pull request as ready for review March 1, 2025 01:34
@enetheru enetheru requested review from a team as code owners March 1, 2025 01:34
@dsnopek
Copy link
Collaborator

dsnopek commented Mar 1, 2025

Looks good, but I think this should be squashed down to a single commit

@enetheru
Copy link
Collaborator Author

enetheru commented Mar 1, 2025

yup, I had them separate so you culd see the human vs gersemi changes. I'll squish now.

@dsnopek dsnopek added cmake topic:buildsystem Related to the buildsystem or CI setup cherrypick:4.4 labels Mar 4, 2025
@dsnopek dsnopek added this to the 4.x milestone Mar 4, 2025
Copy link
Collaborator

@dsnopek dsnopek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dsnopek dsnopek merged commit 05f5d73 into godotengine:master Mar 6, 2025
11 checks passed
@enetheru enetheru deleted the gersemi branch March 6, 2025 13:03
@dsnopek
Copy link
Collaborator

dsnopek commented Mar 17, 2025

Cherry-picked for 4.4 in PR #1745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake topic:buildsystem Related to the buildsystem or CI setup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants