Personal lint rules and code convention

View the Project on GitHub hendraanggrian/ruleboo

Travis CI Codecov Maven Central Nexus Snapshot OpenJDK


Additional third-party rules for lint tools, meant to be used in conjunction with official ones. Most of the rules are opinionated personal code style mandate. However, some already exists in other linters, providing the same experience across languages.

Language Linter Main Rules
Java Checkstyle Google Java Style Guide via Checkstyle Google Checks
Kotlin KtLint Kotlin coding conventions via KtLint standard rules


repositories {

dependencies {
    checkstyle "com.hendraanggrian.rulebook:rulebook-checkstyle:$version"
    ktlint "com.hendraanggrian.rulebook:rulebook-ktlint:$version"



Apply Checkstyle Gradle Plugin. Using configuration checkstyle, add this project as dependency. Then use rulebook_checks.xml provided in sample-checkstyle or within rulebook-checkstyle jar.

plugins {

checkstyle {
    toolVersion "$checkstyleVersion"
    configFile "path/to/rulebook_checks.xml"
    // the rest of checkstyle plugin configurations

dependencies {
    checkstyle "$checkstyleVersion"
    checkstyle "com.hendraanggrian.rulebook:rulebook-checkstyle:libraryVersion"


Apply KtLint Integration to Gradle project. Using configuration ktlint, add this project as dependency.

configurations {

dependencies {
    ktlint "com.pinterest:ktlint:$ktlintVersion"
    ktlint "com.hendraanggrian.rulebook:rulebook-ktlint:libraryVersion"

// the rest of ktlint tasks' configuration

Do not use KtLint with Spotless, as there is yet no way to add custom rules.

First time installation

Presuming the IDE is IntelliJ IDEA, consider applying the linter style to it.


In File > Settings > Editor > Code Style > Java, import IntelliJ Java Google Style file. The whole process are better explained in Google Java Format.


Explained in KtLint IntelliJ IDEA Configuration, using standard Kotlin coding conventions is enough: