[FLINK-37600] Add pre-commit git hook for common linting checks #26386
+42
−0
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.
What is the purpose of the change
There are several linting checks contained within the github actions pre-compile workflow.
It would be useful to have these checks run as a pre-commit hook in git so that any linting issues are spotted before they are pushed remotely.
This PR contains an example pre-commit git hook script in the new
tools/git-hooks
directory with instructions on how to symlink the script to the developers local.git/hooks
directory.This hook is entirely optional and once added can be skipped with the
--no-verify
flag.Brief change log
tools/git-hooks
directory.Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: noDocumentation