
com.github.shyiko.ktlint.ruleset.standard.StandardRuleSetProvider.kt Maven / Gradle / Ivy
The newest version!
package com.github.shyiko.ktlint.ruleset.standard
import com.github.shyiko.ktlint.core.RuleSet
import com.github.shyiko.ktlint.core.RuleSetProvider
class StandardRuleSetProvider : RuleSetProvider {
override fun get(): RuleSet = RuleSet(
"standard",
// disabled ("./mvnw clean verify" fails with "Internal Error")
// AnnotationRule(),
ChainWrappingRule(),
CommentSpacingRule(),
FilenameRule(),
FinalNewlineRule(),
// disabled until there is a way to suppress rules globally (https://git.io/fhxnm)
// PackageNameRule(),
// disabled until auto-correct is working properly
// (e.g. try formatting "if (true)\n return { _ ->\n _\n}")
// MultiLineIfElseRule(),
// disabled until it's clear how to reconcile difference in Intellij & Android Studio import layout
// ImportOrderingRule(),
IndentationRule(),
MaxLineLengthRule(),
ModifierOrderRule(),
NoBlankLineBeforeRbraceRule(),
NoConsecutiveBlankLinesRule(),
NoEmptyClassBodyRule(),
// disabled until it's clear what to do in case of `import _.it`
// NoItParamInMultilineLambdaRule(),
NoLineBreakAfterElseRule(),
NoLineBreakBeforeAssignmentRule(),
NoMultipleSpacesRule(),
NoSemicolonsRule(),
NoTrailingSpacesRule(),
NoUnitReturnRule(),
NoUnusedImportsRule(),
NoWildcardImportsRule(),
ParameterListWrappingRule(),
SpacingAroundColonRule(),
SpacingAroundCommaRule(),
SpacingAroundCurlyRule(),
SpacingAroundDotRule(),
SpacingAroundKeywordRule(),
SpacingAroundOperatorsRule(),
SpacingAroundParensRule(),
SpacingAroundRangeOperatorRule(),
StringTemplateRule()
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy