Code style: disable trailing comma by default

#KT-34744
This commit is contained in:
Dmitry Gridin
2020-01-30 20:41:57 +07:00
parent 4f834cb16b
commit 3fb34596ae
3 changed files with 10 additions and 2 deletions
@@ -53,7 +53,7 @@ public class KotlinCodeStyleSettings extends CustomCodeStyleSettings {
public int WRAP_EXPRESSION_BODY_FUNCTIONS = 0;
public int WRAP_ELVIS_EXPRESSIONS = 1;
public boolean IF_RPAREN_ON_NEW_LINE = false;
public boolean ALLOW_TRAILING_COMMA = true;
public boolean ALLOW_TRAILING_COMMA = false;
@ReflectionUtil.SkipInEquals
public String CODE_STYLE_DEFAULTS = null;
@@ -58,7 +58,7 @@ class KotlinStyleGuideCodeStyle : KotlinPredefinedCodeStyle("Kotlin style guide"
CONTINUATION_INDENT_IN_ELVIS = false
WRAP_EXPRESSION_BODY_FUNCTIONS = CodeStyleSettings.WRAP_AS_NEEDED
IF_RPAREN_ON_NEW_LINE = true
ALLOW_TRAILING_COMMA = true
ALLOW_TRAILING_COMMA = false
}
}
+8
View File
@@ -54,3 +54,11 @@ org.jetbrains.kotlin.psi.injection.StringInterpolationInjectionTest.testInterpol
org.jetbrains.kotlin.shortenRefs.ShortenRefsTestGenerated.testExtensionForObject2, Always red
org.jetbrains.kotlin.util.KotlinVersionsTest.testVersionsAreConsistent, KT-35567
org.jetbrains.kotlinx.serialization.SerializationIrBytecodeListingTestGenerated.testBasic, Broken between 20 nov and 10 dec
org.jetbrains.kotlin.idea.inspections.LocalInspectionTestGenerated.TrailingComma.testAddComma
org.jetbrains.kotlin.idea.inspections.LocalInspectionTestGenerated.TrailingComma.testAddComma2
org.jetbrains.kotlin.idea.inspections.LocalInspectionTestGenerated.TrailingComma.testAddComma5
org.jetbrains.kotlin.idea.inspections.LocalInspectionTestGenerated.TrailingComma.testAddComma6
org.jetbrains.kotlin.idea.inspections.LocalInspectionTestGenerated.TrailingComma.testChangeCommaPosition
org.jetbrains.kotlin.idea.inspections.LocalInspectionTestGenerated.TrailingComma.testChangeCommaPosition2
org.jetbrains.kotlin.idea.inspections.LocalInspectionTestGenerated.TrailingComma.testMissingLineBreak
org.jetbrains.kotlin.idea.inspections.LocalInspectionTestGenerated.TrailingComma.testMissingLineBreak2
Can't render this file because it contains an unexpected character in line 12 and column 132.