Skip to content

Add Checkstyle pre-commit hook for Java code quality [SEDONA-2189] #2217

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

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Subham-KRLX
Copy link
Contributor

This PR adds a Checkstyle pre-commit hook to enforce Java code style automatically before commits. The hook runs mvn checkstyle:check on Java files to detect style violations. Since Spotless already handles Scala formatting, no changes have been made to Scala-related hooks.

Currently, the codebase contains many legacy Checkstyle violations. This PR does not fix those violations but focuses solely on adding the enforcement mechanism to improve code quality for future commits.

How was this patch tested?

Locally tested by installing pre-commit hooks and running all hooks using pre-commit run --all-files.
Verified that the Checkstyle hook runs and fails when violations exist, demonstrating enforcement.
Confirmed all other hooks either pass or skip as expected.
Did this PR include necessary documentation updates?

No, this PR does not affect any public API and does not require documentation changes.

Committed directly via GitHub because local git push was blocked by previous commit errors. This change adds the Checkstyle pre-commit hook to enforce Java code style automatically.
Merge branch 'add-checkstyle-hook' into master
Added Checkstyle pre-commit hook to enforce Java code style automatically.
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