sds / overcommit

A fully configurable and extendable Git hook manager
MIT License
3.92k stars 281 forks source link

JavaCheckStyle and Ktlint fail when overcommit is run #778

Closed hkhan-iengineering closed 2 years ago

hkhan-iengineering commented 2 years ago

I am getting the following error when running overcommit after signing it. Analyze with JavaCheckStyle..........................[JavaCheckstyle] FAILED 'checkstyle' is not installed, not in your PATH, or does not have execute permissions Analyze with KtLint..........................................[Ktlint] FAILED 'ktlint' is not installed, not in your PATH, or does not have execute permissions

Following is my yaml file configuration for both the hooks: PreCommit: JavaCheckstyle: enabled: true on_warn: fail # Treat all warnings as failures description: 'Analyze with JavaCheckStyle' required_executable: 'checkstyle' Ktlint: enabled: true on_warn: fail # Treat all warnings as failures description: 'Analyze with KtLint' required_executable: 'ktlint'

Any help on this?

hkhan-iengineering commented 2 years ago

Resolved by installing the relevant hooks in the project directory by using

brew install checkstyle,
brew install ktlint