Commit aa12c13
authored
pre-commit: run sonarlintMain task (#1368)
Recently thanks to a surge in new contributors, it has been observed
that many of their commits contain code that does not pass Sonarlint
checks. This results in the CI checks failing, and contributors have to
push new commits to address the Sonarlint complaints.
Introduce a new pre-commit hook procedure that also runs Sonarlint right
before a commit gets created, which should exit with a non-zero status
code so that the commit does not get made if it does not pass Sonarlint
checks.
Running Sonarlint checks is a passive task - in other words, it does not
take the initiative of editing the code in order to make it pass the
tests, so it's safe to call the Gradle task by just calling
./gradlew sonarlintMain
Hopefully with this we get less unexpected failures on our CI pipeline
and more motivated contributors.
Signed-off-by: Chris Sdogkos <[email protected]>1 parent 4e1c132 commit aa12c13
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
| |||
0 commit comments