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.
Amount of CPU. The default machine has
0.5 CPU with
1920 MiB RAM.
-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 potential conflicts --editorconfig=<editorConfigPath> Path to .editorconfig
No tool specific severity levels are available.
Note: The incremental analysis is disabled if any kinds of configuration files are changed. The files recognized as configuration files are as follows:
- Configuration files:
- Rule files:
- 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
With a configuration file:
inspecode: ktlint: config-file: ./my/.editorconfig
The above configuration is equivalent to:
inspecode: ktlint: options: --editorconfig: ./my/.editorconfig
If no configuration files are specified via
options field, Inspecode lets ktlint find configuration files in your repository.