Add pre-commit hooks to replace the file_format.sh
script
#89233
+60
−138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pre-commit
Python tool #88866.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:This doesn't occur in
master
: