-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add pre-commit hook for Linting #276
Conversation
Ahhh inspired by your positive experiences of https://github.com/guardian/pinboard 😜 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, great! Worth running ./setup-hooks in ./setup, so everyone new to the project gets the hooks?
Co-authored-by: Jonathon Herbert <jonathon.herbert@guardian.co.uk>
Co-authored-by: Jonathon Herbert <jonathon.herbert@guardian.co.uk>
Cheers - that was my plan as I had a memory of there being a setup script, but I don't see one 🤷 |
What does this change?
This PR adds a pre-commit hook which will auto format staged changes using ScalaFMT. It also adds a setup script whose role is sym-linking the script to the hooks dir.
How to test
Check it out, run the script, make a change and commit. The linter should run against your Scala files.
How can we measure success?
Have we considered potential risks?
Yep
Images