-
-
Notifications
You must be signed in to change notification settings - Fork 373
Add pre-commit hooks to run code checks #248
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
Comments
++ for pre-commit hooks. Are you planning to use some tool to distribute them @vbuberen or how do we architect this? |
I wanted to do something simple to not introduce any additional tool. |
Yes my point was more that hooks are not part of the git repo (they're not applied when the repo is cloned). So we need some sort of tools to install them on the first build or similar. |
ktlint-gradle might be able to help https://github.com/jlleitschuh/ktlint-gradle
I think they recommended (overheard in kotlinglang slack) adding that to the clean task in your gradle project so that it gets added to everyones machine. |
Thanks for sharing. Looks interesting. |
I'm adding a note for this in the README 👍 |
I am currently playing around with pre-commit hook, which is installed from |
Closed by #408 |
It seems that contributors often have to do multiple commits, since their contributions have issues with styling etc.
💡 Describe the solution you'd like
It might be more convenient to run
ktlintCheck
anddetekt
tasks as a pre-commit hook. With these changes contributors could be sure that their code passes Chucker checks and also make our library build process a little more eco-friendly, since we won't have to spin up Travis CI that often 🌲📄 Additional context
We might also include
test
step as well.🙋 Do you want to develop this feature yourself?
The text was updated successfully, but these errors were encountered: