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.
--limitoption is not applied in auto-fix mode.
Amount of CPU. The default machine has
0.5 CPU with
1920 MiB RAM.
-a, --android Turn on Android Kotlin Style Guide compatibility --disabled_rules=<disabledRules> Comma-separated list of rules to globally disable --limit=<limit> Maximum number of errors to show (default: show all) -R, --ruleset=<rulesets> A path to a JAR file containing additional ruleset(s) --skip-classpath-check Do not check classpath for potential conflicts --editorconfig=<editorConfigPath> Path to .editorconfig --experimental Enabled experimental rules (ktlint-ruleset-experimental)
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.