jeremymailen / kotlinter-gradle

Painless, fast ktlint plugin for Gradle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any reason pre-commit install tasks is not wired?

brice-laurencin opened this issue · comments

Hello,

One cannot call installKotlinterPreCommitHook because it is not installed anywhere: https://github.com/jeremymailen/kotlinter-gradle/blob/master/src/main/kotlin/org/jmailen/gradle/kotlinter/KotlinterPlugin.kt#L29

is this on purpose?

Yeah, the main problem is that the plugin doesn't know which files in your workspace are the ones being committed. It might complain about files which aren't part of that set.

We've actually been pondering removing the githooks since there are better ones out there and the ktlint command line is better suited to run as part of the githook since it can target individual files.