FAQ
Why is it necessary?¶
When working on a project with multiple programming languages, we often forget to apply the same coding style and leave the validation to a linter tool. However, the default behavior of these linters are not always consistent. Consider the example below:
Java | Groovy | Kotlin | Python |
---|---|---|---|
Java does not allow trailing commas except in array initializers. | Groovy allows trailing commas in call sites, but CodeNarc does not natively support it. | Trailing commas can be placed in call and declaration sites in Kotlin, the rule is provided by Ktlint. | Python allows trailing commas but Pylint considers it optional in PEP. Note that the comment spacing rule is different in Python. |
|
How stable is it?¶
The rules are mostly work in progress and have not been tested against a large codebase. Disable the rules individually if they behave unexpectedly.
What's next for Rulebook?¶
Although there is no timeline for the roadmap, the following features are planned:
- More languages:
- Java
- Groovy
- Kotlin
- Python
- JavaScript
- TypeScript
- Rigorous testing:
- Consistent unit test names and cases across all languages.
- Collect interesting code snippets from open-source projects.