jeremymailen / kotlinter-gradle

Painless, fast ktlint plugin for Gradle
Apache License 2.0
583 stars 50 forks source link

Thank You #1

Closed shyiko closed 7 years ago

shyiko commented 7 years ago

Hey Jeremy,

I've been watching this project for couple of days and I think it's awesome. Just wanted to say Thank You for doing this and let you know that I have added a link to this repo in https://github.com/shyiko/ktlint#-with-gradle.

Keep it up!

Enjoy your weekend, Stan.

jeremymailen commented 7 years ago

Thanks Stan! I really appreciate it. You've done the challenging part by making the linter itself so thank you for helping the Kotlin community. Many dev teams want a linter when they adopt a new language and auto-formatting is an extra bonus.

First time I've written a full Gradle plugin. I hope it helps teams plug it in to their build smoothly. Thoughts, feature requests, and contributions welcome!

DSamaryan commented 7 years ago

Can I create a custom rules with that wrapper?

jeremymailen commented 7 years ago

Yes, you can apply your own custom rulesets. They just need to be in the gradle buildscript classpath:

buildscript {
    dependencies {
        classpath files('libs/my-custom-ktlint-rules.jar')
    }
}

plugins {
    ...
    id 'org.jmailen.kotlinter' version '0.9.3'
}
...

Of course if your rules are in an artifact repository you can use a maven coordinate there as well.

This will work since this plugin uses the ktlint engine directly rather than wrapping around execution of the tool.

I'll document this in the readme. Thanks!