How to setup sonarlint as a git precommit hook?

524 Views Asked by At

I was exploring on linting tools for java and decided to use sonarlint plugin on IntelliJ Idea. Now, I'm finding it difficult on how to integrate sonarlint with a git precommit hook. This is to enforce my teammates to resolve all the issues and bugs reported by Sonarlint before committing the code.

Also, I'm not looking for hosting a SonarQube server just for this. Is there someway to add a configuration within codebase and enable the linting on git precommit?

0

There are 0 best solutions below