From fda30f6db0cb64455f1618a1f85ed88110e28498 Mon Sep 17 00:00:00 2001 From: Arrgentum Date: Tue, 24 May 2022 18:36:19 +0300 Subject: [PATCH] ### Whats added: * corrected logic fix and warn String Template in Linelength rule * added logic fix and warn long Dot Qualified Expression in LineLength rule * added logic fix and warn Value Arguments List in LineLength rule * added and corrected fix and warn tests in LineLength rule * fix code with diktat:fix@diktat * added comments to classes and functions * correct code with running detect ### Issue (#1243) --- .../org/cqfn/diktat/ruleset/chapter3/LineLengthFixTest.kt | 8 ++------ ...onNoFixExpected1.kt => LongExpressionNoFixExpected.kt} | 0 .../paragraph3/long_line/LongExpressionNoFixExpected2.kt | 8 -------- 3 files changed, 2 insertions(+), 14 deletions(-) rename diktat-rules/src/test/resources/test/paragraph3/long_line/{LongExpressionNoFixExpected1.kt => LongExpressionNoFixExpected.kt} (100%) delete mode 100644 diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected2.kt diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LineLengthFixTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LineLengthFixTest.kt index d452f27cd0..609331eaa7 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LineLengthFixTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LineLengthFixTest.kt @@ -70,14 +70,10 @@ class LineLengthFixTest : FixTestBase("test/paragraph3/long_line", ::LineLength) } @Test - fun `shouldn't fix1`() { - fixAndCompare("LongExpressionNoFixExpected1.kt", "LongExpressionNoFixTest.kt", rulesConfigListShortLineLength) + fun `shouldn't fix`() { + fixAndCompare("LongExpressionNoFixExpected.kt", "LongExpressionNoFixTest.kt", rulesConfigListShortLineLength) } - @Test - fun `shouldn't fix2`() { - fixAndCompare("LongExpressionNoFixExpected2.kt", "LongExpressionNoFixTest.kt", rulesConfigListShortLineLength) - } @Test fun `should fix annotation`() { diff --git a/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected1.kt b/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected.kt similarity index 100% rename from diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected1.kt rename to diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected.kt diff --git a/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected2.kt b/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected2.kt deleted file mode 100644 index 22e030d248..0000000000 --- a/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected2.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.cqfn.diktat.resources.paragraph3.longline - -class veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong { - // looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongggggggggggggggggggggggggg - //looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongggggggggggggggggggggggggg - val s = - "d s d d d d ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" -}