gantsign / ktlint-maven-plugin

Maven plugin for ktlint the Kotlin linter

Home Page:http://gantsign.com/ktlint-maven-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ktlint:check requires binary dependencies to be present

gzsombor opened this issue · comments

Running mvn ktlint:check on a clean multi-module projects fails, if there are inter-module dependencies, because it needs the dependencies being built.
Imagine a setup, where there is a module-1 and module-2, module-2 depends on module-1.
If you run : mvn ktlint:check -pl :module-2, maven tries to download module-1-SNAPSHOT.jar (from maven central), which fails.
It's unclear, why ktlint-maven-plugin needs the compiled dependencies, as I would assume, that it only checks the source code.
The issue comes from the fact, that our multi-module setup is pretty big, to compile all the modules, we need ~20 minutes, but we would like to have a quick, ktlint check to catch the problems, without the slower compile process.

@gzsombor thanks for reporting this issue, sorry it took me so long to respond (my day job hasn't left much time for OSS recently). I don't recall the reason for requiring binary dependencies, but the current version of the plugin doesn't seem to need them, so I've removed the requirement. You can find the fix in version 1.12.0 of the plugin.

Thank you for the fix! (It seems, that it's only part of the 1.12.1 release)