Sider Documentation

Sider Documentation

  • Enterprise
  • News
  • Sider Top

›Kotlin

Getting Started

  • Home
  • Intro Videos
  • Setting up Sider
  • Dashboard Overview
  • Repository Settings
  • Custom Analysis Configuration
  • Recommended Ruleset
  • Working with Issues
  • Permissions
  • Skip Analyzing

Analysis Tools

    Ruby

    • RuboCop
    • Reek
    • Querly
    • Rails Best Practices
    • Brakeman
    • HAML-Lint
    • Slim-Lint (beta)

    Java

    • Checkstyle
    • PMD
    • JavaSee

    Kotlin

    • ktlint (beta)
    • detekt (beta)

    JavaScript and Flavors

    • ESLint
    • JSHint
    • TyScan
    • CoffeeLint
    • TSLint (deprecated)

    CSS

    • stylelint
    • SCSS-Lint (deprecated)

    PHP

    • PHP_CodeSniffer
    • PHPMD
    • Phinder

    Python

    • Flake8
    • Pylint (beta)

    Swift

    • SwiftLint

    Go

    • GolangCI-Lint

    C/C++

    • Cppcheck
    • cpplint
    • Clang-Tidy (beta)

    C#

    • FxCop (beta)

    Shell script

    • ShellCheck

    Dockerfile

    • hadolint

    Markdown

    • remark-lint

    Others

    • Goodcheck
    • Misspell
    • LanguageTool (beta)
    • PMD CPD (beta)

Custom Rules

  • Intro to Custom Rules
  • Goodcheck
  • Tips & Tricks

Advanced Settings

  • Inline Comments
  • Private Dependencies
  • Restricting access to Close button
  • Transferring a repository

Billing and Plans

  • Billing and Plans

Troubleshooting

  • Troubleshooting

Enterprise

  • Outline
  • System Overview
  • Installation
  • Configuration
  • Operation
  • Update
  • Load Balancer
  • MySQL
  • Redis
  • MinIO
  • Amazon S3
  • GitHub Enterprise Server
  • Clustering
  • Example Deployments

    • Single Node with Docker Compose

    Releases

    • Overview
    • January 2021
    • December 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • February 2020
    • January 2020
    • November 2019
    • Older releases

News

  • 2021
  • 2020
  • 2019
Edit

ktlint

This is BETA. The behavior of this tool might change.

Supported VersionLanguageWebsite
0.39.0 ¹Kotlinhttps://ktlint.github.io

ktlint is a linter with built-in formatter for Kotlin programming language.

¹ You can use Gradle or Maven to install any version of ktlint, but note that the version may not compatible with Sider.

Getting Started

To start using ktlint, enable it in your repository settings.

Configuration

You can customize your ktlint analysis using sider.yml as follows:

linter:
  ktlint:
    target:
      - "src/**/*.kt"
      - "!src/**/*Test.kt"
      - "test/"
    ruleset:
      - custom_ruleset.jar
    disabled_rules:
      - "no-wildcard-imports"
      - "indent"
    experimental: true
NameTypeDefault
root_dirstring-
jvm_depsstring[][][]
targetstring, string[][]
rulesetstring, string[][]
disabled_rulesstring, string[][]
experimentalbooleanfalse

target

This option allows you to specify glob patterns of files to analyze. If omitted, Sider analyzes all Kotlin files in your repository.

ruleset

This option allows you to specify URLs to rulesets you want to enable.

disabled_rules

This option allows you to specify rule names to disable.

experimental

This option allows you to use the experimental rules.


cli

This option was removed.

This option allows you to configure the CLI execution. For example:

linter:
  ktlint:
    cli:
      patterns:
        - "src/**/*.kt"
        - "!src/**/*Test.kt"
      ruleset:
        - "https://example.com/custom/ruleset.jar"
      disabled_rules:
        - "no-wildcard-imports"
      experimental: true

cli.patterns

This option was removed.

This option allows you to specify glob patterns or directories to analyze. If omitted, Sider analyzes all Kotlin files in your repository.

cli.ruleset

This option was removed.

This option allows you to specify URLs to rulesets you want to enable.

cli.disabled_rules

This option was removed.

This option allows you to specify rule names you want to disable.

cli.experimental

This option was removed.

This option allows you to specify whether enabling experimental rules or not.

gradle

This option was removed.

This option allows you to configure the Gradle integration. For example:

linter:
  ktlint:
    gradle:
      task: ktlint
      reporter: checkstyle
      output: build/reports/ktlint/ktlintMainSourceSetCheck.xml

gradle.task

This option was removed.

This option allows you to specify a Gradle task to execute ktlint.

gradle.reporter

This option was removed.

This option allows you to specify a reporter of the output from the task.

We recommend using the json or checkstyle reporter for Sider integration. Because the plain reporter does not print any rule ID which is used to identify issues in Sider.

gradle.output

This option was removed.

This option allows you to specify a file path that contains the output. If omitted, Sider reads the output from STDOUT.

maven

This option was removed.

This option allows you to configure the Maven integration. For example:

linter:
  ktlint:
    maven:
      goal: "antrun:run@ktlint"
      reporter: checkstyle
      output: target/ktlint.xml

maven.goal

This option was removed.

This option allows you to specify a Maven goal to execute ktlint.

maven.reporter

This option was removed.

This option allows you to specify a reporter of the output from the goal. It has the same limitation as gradle.reporter.

maven.output

This option was removed.

This option allows you to specify a file path that contains the output.

← JavaSeedetekt (beta) →
  • Getting Started
  • Configuration
    • target
    • ruleset
    • disabled_rules
    • experimental
    • cli
    • cli.patterns
    • cli.ruleset
    • cli.disabled_rules
    • cli.experimental
    • gradle
    • gradle.task
    • gradle.reporter
    • gradle.output
    • maven
    • maven.goal
    • maven.reporter
    • maven.output
Sider Documentation
Docs
Getting StartedAnalysis ToolsEnterprise
Sider
Sider TopTerms of ServicePrivacy
Social
BlogGitHubStar
Copyright © 2021 Sider, Inc.