The README suggests installing ktlint in `/usr/loc...
# ktlint
n
The README suggests installing ktlint in
/usr/local/bin
, meaning that all your projects need to be on the same ktlint version. Now you probably don't want to include the
ktlint
binary in every repo, but what about a Gradle-wrapper like script that downloads the ktlint binary? Would that be something the repository might want to provide?
r
Just out of interest, are you building with gradle? If so, what’s wrong with using one of the two gradle plugins’ tasks, which implicitly download the correct version of ktlint?
n
We’ve seen that running ktlint in gradle is significantly slower than invoking the binary directly since gradle needs to configure everything
r
Fair enough. On my project it takes between 1 & 3 seconds to run
gw lintKotlin
or
gw formatKotlin
. Gradle 6.8-milestone-1, org.jmailen.kotlinter:3.2.0.
t
Gradle should become better when configuration cache will work
one advantage of the Gradle (if configuration cache is working) is skipping the check on unchanged sources