An anti-bikeshedding Kotlin linter with built-in formatter.
Patterns to include in reports.
Patterns to exclude from reports.
Note: As of now, ktlint does not keep CRLF line endings and all EOL characters are converted to LF in files where the auto-fix is applied. We will solve this problem, but for the time being, please don't enable the auto-fix feature if you need to keep CRLF line endings.
-a, --android Turn on Android Kotlin Style Guide compatibility --limit=<limit> Maximum number of errors to show (default: show all) --repository=<repositories> An additional Maven repository (Maven Central/JCenter/JitPack are active by default) (value format: <id>=<url>) -U, --repository-update Check remote repositories for updated snapshots -R, --ruleset=<rulesets> A path to a JAR file containing additional ruleset (s) or a <groupId>:<artifactId>:<version> triple pointing to a remote artifact (in which case ktlint will first check local cache (~/. m2/repository) and then, if not found, attempt downloading it from Maven Central/JCenter/JitPack/user-provided repository) --skip-classpath-check Do not check classpath for pottential conflicts
Note: The incremental analysis is disabled if any kinds of configuration files are changed. The files recognized as configuration files are as follows:
- Files specified to
With default options:
inspecode: ktlint: default
With enabling auto-fixing and default options:
inspecode: ktlint: auto-fix
With custom machine:
inspecode: ktlint: machine: cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
With custom options:
inspecode: ktlint: options: --limit: 10