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

Add pre-commit hooks to replace the file_format.sh script #89233

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Mar 6, 2024

The new pre-commit hooks catch common file formatting issues, along with new checks such as JSON and YAML validity. There is also a check that prevents adding submodules by accident, as the main Godot repository doesn't use submodules.

I'm having an issue currently where clang-format never runs (even with pre-commit run --all-files). Check the CI log of this PR:

image

This doesn't occur in master:

image

The new pre-commit hooks catch common file formatting issues,
along with new checks such as JSON and YAML validity. There
is also a check that prevents adding submodules by accident,
as the main Godot repository doesn't use submodules.
</Project>
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be tested on Windows with the new vsproj generation to make sure it still works fine with the trailing newlines.
Otherwise we'll need to exclude these files from the check. CC @shana

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

Successfully merging this pull request may close these issues.

2 participants