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

No option to force checkstyle run before git commit #541

Open
Brillie opened this issue Nov 5, 2021 · 3 comments
Open

No option to force checkstyle run before git commit #541

Brillie opened this issue Nov 5, 2021 · 3 comments

Comments

@Brillie
Copy link

Brillie commented Nov 5, 2021

Maybe not so much an issue, but more a question/feature-request: how can I enforce a checkstyle-run in IntelliJ before committing changes to my git repo? I'd really like to make sure only checked code goes into the repo. I have setup maven to break the build if the maven-checkstyle-run finds violations... So I'm looking for something like a pre-commit hook in the Checkstyle-IDEA plugin. It's not an option in the plugin config, and also in Version Control -> Commit -> Before Commit isn't listing a Checkstyle run.

@jshiell
Copy link
Owner

jshiell commented Nov 6, 2021

There's an option in the commit settings to run a Checkstyle scan before commit. I think this should do what you're after.

Screenshot 2021-11-06 at 11 46 37

@Brillie
Copy link
Author

Brillie commented Nov 9, 2021

Ohhhh I was looking at the project options:
image

Thanks for showing me where the option is! But it sure would be nice if the same checkbox would be available in the project options :)

@wafl22
Copy link

wafl22 commented Dec 22, 2022

I'd also be interested in exactly this feature!

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

No branches or pull requests

3 participants