The motivation behind adding this PR is to enable the pre-pushgit-hooks for static analysis tools like detekt or Ktlint.
Q. Why are we keeping these to the local machine end rather than GitHub Actions?
Ans:- as we all know, we are using the free GitHub Actions that come with a free runner with low bandwidth. So, as of now, we are trying to keep this on the local machine side only. Maybe in future if we find some other good option or some increased bandwidth from the side of the Github Free program.
[X] Basic Detekt Plaugin enabled.
[X] Detekt baseline configured for the whole Project.
[X] Addition of the Detekt task to run as pre-pushgit-hooks is in Progress.
[X] Ktlint enabled
[X] Addition of KtlintCheck task to run as pre-pushgit-hooks
Anyone can use the command to check locally as well from the terminal.
./gradlew detekt or ./gradlew ktlintCheck
Use this ./gradlew ktlintFormat command for doing the formatting to *.kt file.
Show Notification for reminding the reminder.
Using worker manager to schedule a tasks
fixes #36 #37
✏️ Checklist
[X] I've checked my code.
[X] I've tested the change manually.
[X] I've invoked unit tests:./gradlew detekt ktlintCheck --daemon --continue
💡 Motivation, context, additional details, changes proposed
The motivation behind adding this PR is to enable the
pre-push
git-hooks
for static analysis tools likedetekt
orKtlint
.Q. Why are we keeping these to the local machine end rather than GitHub Actions?
Ans:- as we all know, we are using the free GitHub Actions that come with a free runner with low bandwidth. So, as of now, we are trying to keep this on the local machine side only. Maybe in future if we find some other good option or some increased bandwidth from the side of the Github Free program.
pre-push
git-hooks
is in Progress.pre-push
git-hooks
Anyone can use the command to check locally as well from the terminal.
./gradlew detekt
or./gradlew ktlintCheck
Use this
./gradlew ktlintFormat
command for doing the formatting to*.kt
file.Using worker manager to schedule a tasks
fixes #36 #37
✏️ Checklist
./gradlew detekt ktlintCheck --daemon --continue
📸 Reference Screenshots.