Overview
Features¶
What is Rulebook?
Library extension
A set of additional rules for static code analysis tools
Features
Multiple languages
Originally written for Kotlin, it now supports Java, Groovy and Python
Follows guidelines
Works together with standard rules from linter tools and respects common coding convention
Compatibility table¶
Legend
Rule | Java | Groovy | Kotlin | Python |
---|---|---|---|---|
Block tag punctuation46 | ||||
Built-in types35 | ||||
Confusing predicate32 | ||||
File size39 | ||||
Null equality40 | ||||
Redundant qualifier24 | ||||
TODO comment26 | ||||
Trailing comma in call41 | ||||
Trailing comma in collection50 | ||||
Trailing comma in declaration41 | ||||
Unused import4 | ||||
Wildcard import18 | ||||
Declaring group | ||||
Abstract class definition1 | ||||
Contract function definition34 | ||||
Exception inheritance48 | ||||
Number suffix for double21 | ||||
Number suffix for float21 | ||||
Number suffix for integer21 | ||||
Number suffix for long21 | ||||
String quotes14 | ||||
Unnecessary parentheses in lambda47 | ||||
Utility class definition5 | ||||
Naming group | ||||
Class name acronym27 | ||||
Class name43 | ||||
Constant property name43 | ||||
File name38 | ||||
Identifier name43 | ||||
Illegal class final name27 | ||||
Illegal variable name6 | ||||
Package name43 | ||||
Property name interop37 | ||||
Required generic name49 | ||||
Ordering group | ||||
Block tag order8 | ||||
Built-in function position2 | ||||
Import order17 | ||||
Inner class position29 | ||||
Member order29 | ||||
Overload function position36 | ||||
Static import position17 | ||||
Spacing group | ||||
Block comment spaces45 | ||||
Block comment trim3 | ||||
Block tag indentation15 | ||||
Case separator30 | ||||
Code block trim12 | ||||
Comment spaces10 | ||||
Comment trim3 | ||||
Duplicate blank line20 | ||||
Duplicate blank line in block comment3 | ||||
Duplicate blank line in comment3 | ||||
Member separator20 | ||||
Missing blank line before block tags33 | ||||
Unnecessary blank line before package19 | ||||
Stating group | ||||
Illegal catch48 | ||||
Illegal throw48 | ||||
Missing braces9 | ||||
Nested if-else22 | ||||
Redundant default23 | ||||
Redundant else23 | ||||
Unnecessary switch25 | ||||
Wrapping group | ||||
Assignment wrap16 | ||||
Chain call wrap42 | ||||
Elvis wrap7 | ||||
Empty code block join13 | ||||
Infix call wrap11 | ||||
Lambda wrap16 | ||||
Operator wrap11 | ||||
Parameter wrap28 | ||||
Short block comment join31 | ||||
Statement wrap44 |
Download¶
Integrate the linter tools
-
Java
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard.
-
Groovy
CodeNarc is similar to popular static analysis tools such as PMD or Checkstyle.
-
Kotlin
An anti-bikeshedding Kotlin linter with built-in formatter.
-
Python
It's not just a linter that annoys you!