Add task to install git pre-commit-hook
See original GitHub issueKtlint supports installing git pre-commit hook, that will check style violations on git commit. Would be nice to add this as a Gradle task to simplify setup for the project.
Name should be: ktlintAddGitPreCommitHook
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:30 (7 by maintainers)
Top Results From Across the Web
Git Hooks - Git SCM
The pre-commit hook is run first, before you even type in a commit message. It's used to inspect the snapshot that's about to...
Read more >Git pre-hook: Setup pre-commit hook for Gradle project example
1. Create a pre-hook script, let's create pre-commit file inside a new scripts directory, and we want to run unit tests before code...
Read more >How to Add Commit Hooks to Git with Husky to Automate ...
How to Add Commit Hooks to Git with Husky to Automate Code Tasks · Step 0: How to set up a new project...
Read more >Git Hooks | Atlassian Git Tutorial
applypatch-msg.sample pre-push.sample commit-msg.sample pre-rebase.sample ... To install the hook, you can either create a symlink to it in .git/hooks ...
Read more >Git Hooks | Learn how to use pre-commit hooks, post-commit ...
Git hooks are scripts that Git executes before or after events such as: commit, push, and receive. Git hooks are a built-in feature...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Initial implementation was merged (should be in next
7.3.0
release). Missing:buildSrc
supportThat are good questions 👍
Regarding them I am thinking of adding two possible git hooks:
ktlintCheck
before commitktlintFormat
before commitThis way git hook will be not detached from plugin and plugin configuration.