From 6f72a7f1f43ff1fee0091ffe0e3de565b3293d3e Mon Sep 17 00:00:00 2001 From: aktsay6 Date: Tue, 22 Dec 2020 11:10:15 +0300 Subject: [PATCH 1/7] bugfix/commented-code-fp(#652) ### What's done: * Added tests --- .../chapter2/comments/CommentedCodeTest.kt | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt index e7a0b8603e..e958a04c6a 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt @@ -79,7 +79,7 @@ class CommentedCodeTest : LintTestBase(::CommentsRule) { @Test @Tag(WarningNames.COMMENTED_OUT_CODE) - fun `Should warn if commented out function is detected (single line comments)`() { + fun `Should warn if commented out function is detected single line comments`() { lintMethod( """ |import org.junit.Test @@ -256,4 +256,42 @@ class CommentedCodeTest : LintTestBase(::CommentsRule) { """.trimMargin(), LintError(1, 1, ruleId, "${COMMENTED_OUT_CODE.warnText()} public fun someFunc(name: String): Boolean =", false)) } + + + @Test + @Tag(WarningNames.COMMENTED_OUT_CODE) + fun `should not trigger on multiline comments #1`() { + lintMethod( + """ + |/* + | + | Copyright 2018-2020 Charles Korn. + | + | Licensed under the Apache License, Version 2.0 (the "License"); + | you may not use this file except in compliance with the License. + | You may obtain a copy of the License at + | + | http://www.apache.org/licenses/LICENSE-2.0 + | + | Unless required by applicable law or agreed to in writing, software + | distributed under the License is distributed on an "AS IS" BASIS, + | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + | See the License for the specific language governing permissions and + | limitations under the License. + | + |*/ + """.trimMargin()) + } + + @Test + @Tag(WarningNames.COMMENTED_OUT_CODE) + fun `should not trigger on multiline comments #2`() { + lintMethod( + """ + |/* + | * some text here + | maybe even with another line + |*/ + """.trimMargin()) + } } From 28b4b6ebc43be9d56575d9cfa80595baaa43f94f Mon Sep 17 00:00:00 2001 From: soWhoAmI Date: Wed, 23 Dec 2020 15:44:13 +0300 Subject: [PATCH 2/7] bugfix/commented-code-fp(#652) ### What's done: * Fixed bug --- .../org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt index 2be92b7709..caaf6fdcba 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt +++ b/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/comments/CommentsRule.kt @@ -56,7 +56,7 @@ class CommentsRule(private val configRules: List) : Rule("comments" val eolCommentsOffsetToText = getOffsetsToTextBlocksFromEolComments(node) val blockCommentsOffsetToText = node .findAllNodesWithSpecificType(BLOCK_COMMENT) - .map { it.startOffset to it.text.removeSurrounding("/*", "*/") } + .map { it.startOffset to it.text.trim().removeSurrounding("/*", "*/") } (eolCommentsOffsetToText + blockCommentsOffsetToText) .flatMap { (offset, text) -> From cdae11d4f60e35bf3a4d82b62e8a90ea4b1b2023 Mon Sep 17 00:00:00 2001 From: soWhoAmI Date: Wed, 23 Dec 2020 18:22:41 +0300 Subject: [PATCH 3/7] bugfix/commented-code-fp(#652) ### What's done: * Fixed bug --- .../diktat/ruleset/chapter2/comments/CommentedCodeTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt index e958a04c6a..2b810aa065 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt @@ -265,7 +265,7 @@ class CommentedCodeTest : LintTestBase(::CommentsRule) { """ |/* | - | Copyright 2018-2020 Charles Korn. + | Copyright 2018-2020 John Doe. | | Licensed under the Apache License, Version 2.0 (the "License"); | you may not use this file except in compliance with the License. @@ -288,10 +288,10 @@ class CommentedCodeTest : LintTestBase(::CommentsRule) { fun `should not trigger on multiline comments #2`() { lintMethod( """ - |/* + | /* | * some text here | maybe even with another line - |*/ + | */ """.trimMargin()) } } From 8ec9d0ba9aee994156971f287192c19130aa5e80 Mon Sep 17 00:00:00 2001 From: soWhoAmI Date: Thu, 24 Dec 2020 12:04:40 +0300 Subject: [PATCH 4/7] bugfix/commented-code-fp(#652) ### What's done: * Added fix test --- .../diktat/ruleset/smoke/DiktatSmokeTest.kt | 33 +++++++++++++++++-- .../smoke/src/main/kotlin/Example5Expected.kt | 15 +++++++++ .../smoke/src/main/kotlin/Example5Test.kt | 5 +++ 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt create mode 100644 diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Test.kt diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt index 59f3191b01..88069e8ef5 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt @@ -44,7 +44,7 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", * Disable some of the rules. */ @Suppress("UnsafeCallOnNullableType") - private fun overrideRulesConfig(rulesToDisable: List) { + private fun overrideRulesConfig(rulesToDisable: List, rulesToOverride: Map>?) { val rulesConfig = RulesConfigReader(javaClass.classLoader).readResource(configFilePath)!! .toMutableList() .also { rulesConfig -> @@ -52,6 +52,10 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", rulesConfig.removeIf { it.name == warning.name } rulesConfig.add(RulesConfig(warning.name, enabled = false, configuration = emptyMap())) } + rulesToOverride?.forEach { map -> + rulesConfig.removeIf { it.name == map.key } + rulesConfig.add(RulesConfig(map.key, enabled = true, configuration = map.value)) + } } createTempFile() .also { @@ -84,10 +88,35 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", @Tag("DiktatRuleSetProvider") fun `regression - should not fail if package is not set`() { overrideRulesConfig(listOf(Warnings.PACKAGE_NAME_MISSING, Warnings.PACKAGE_NAME_INCORRECT_PATH, - Warnings.PACKAGE_NAME_INCORRECT_PREFIX)) + Warnings.PACKAGE_NAME_INCORRECT_PREFIX), null) fixAndCompare("DefaultPackageExpected.kt", "DefaultPackageTest.kt") } + @Test + @Tag("DiktatRuleSetProvider") + fun `smoke test #5`() { + overrideRulesConfig(emptyList(), + mapOf( + Pair(Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT.name, mapOf( + Pair("isCopyrightMandatory", "true"), + Pair("copyrightText", """|Copyright 2018-2020 John Doe. + | Licensed under the Apache License, Version 2.0 (the "License"); + | you may not use this file except in compliance with the License. + | You may obtain a copy of the License at + | + | http://www.apache.org/licenses/LICENSE-2.0 + """.trimMargin()) + ) + ) + ) + ) + fixAndCompare("Example5Expected.kt", "Example5Test.kt") + + if (unfixedLintErrors.contains(LintError(line=1, col=1, ruleId="diktat-ruleset:comments", detail="${Warnings.COMMENTED_OUT_CODE.warnText()} /*"))) { + error("Should not contain this warning") + } + } + @Test @Tag("DiktatRuleSetProvider") fun `smoke test #4`() { diff --git a/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt b/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt new file mode 100644 index 0000000000..d981eb1cdd --- /dev/null +++ b/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt @@ -0,0 +1,15 @@ + /* + * Copyright 2018-2020 John Doe. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + */ + +package org.cqfn.diktat + +class Some { + +} + diff --git a/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Test.kt b/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Test.kt new file mode 100644 index 0000000000..7396489e1a --- /dev/null +++ b/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Test.kt @@ -0,0 +1,5 @@ +package org.cqfn.diktat + +class Some { + +} From c9a80cf7570d5aabe0a467490a6849987473ab8e Mon Sep 17 00:00:00 2001 From: soWhoAmI Date: Thu, 24 Dec 2020 17:44:43 +0300 Subject: [PATCH 5/7] bugfix/top-level-block-comment(#651) ### What's done: * Fixed bugs --- .../diktat/ruleset/smoke/DiktatSmokeTest.kt | 36 +++++++++---------- .../smoke/src/main/kotlin/Example5Expected.kt | 16 ++++----- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt index 88069e8ef5..2412ba9d1e 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt @@ -27,6 +27,7 @@ import org.junit.jupiter.api.Test import java.io.File import kotlinx.serialization.encodeToString +import org.junit.jupiter.api.Assertions /** * Test for [DiktatRuleSetProvider] in autocorrect mode as a whole. All rules are applied to a file. @@ -44,7 +45,7 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", * Disable some of the rules. */ @Suppress("UnsafeCallOnNullableType") - private fun overrideRulesConfig(rulesToDisable: List, rulesToOverride: Map>?) { + private fun overrideRulesConfig(rulesToDisable: List, rulesToOverride: Map> = emptyMap()) { val rulesConfig = RulesConfigReader(javaClass.classLoader).readResource(configFilePath)!! .toMutableList() .also { rulesConfig -> @@ -52,9 +53,9 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", rulesConfig.removeIf { it.name == warning.name } rulesConfig.add(RulesConfig(warning.name, enabled = false, configuration = emptyMap())) } - rulesToOverride?.forEach { map -> - rulesConfig.removeIf { it.name == map.key } - rulesConfig.add(RulesConfig(map.key, enabled = true, configuration = map.value)) + rulesToOverride.forEach { (name, configuration) -> + rulesConfig.removeIf { it.name == name } + rulesConfig.add(RulesConfig(name, enabled = true, configuration = configuration)) } } createTempFile() @@ -88,7 +89,7 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", @Tag("DiktatRuleSetProvider") fun `regression - should not fail if package is not set`() { overrideRulesConfig(listOf(Warnings.PACKAGE_NAME_MISSING, Warnings.PACKAGE_NAME_INCORRECT_PATH, - Warnings.PACKAGE_NAME_INCORRECT_PREFIX), null) + Warnings.PACKAGE_NAME_INCORRECT_PREFIX)) fixAndCompare("DefaultPackageExpected.kt", "DefaultPackageTest.kt") } @@ -97,24 +98,23 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", fun `smoke test #5`() { overrideRulesConfig(emptyList(), mapOf( - Pair(Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT.name, mapOf( - Pair("isCopyrightMandatory", "true"), - Pair("copyrightText", """|Copyright 2018-2020 John Doe. - | Licensed under the Apache License, Version 2.0 (the "License"); - | you may not use this file except in compliance with the License. - | You may obtain a copy of the License at - | - | http://www.apache.org/licenses/LICENSE-2.0 - """.trimMargin()) - ) + Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT.name to mapOf( + "isCopyrightMandatory" to "true", + "copyrightText" to """|Copyright 2018-2020 John Doe. + | Licensed under the Apache License, Version 2.0 (the "License"); + | you may not use this file except in compliance with the License. + | You may obtain a copy of the License at + | + | http://www.apache.org/licenses/LICENSE-2.0 + """.trimMargin() ) ) ) fixAndCompare("Example5Expected.kt", "Example5Test.kt") - if (unfixedLintErrors.contains(LintError(line=1, col=1, ruleId="diktat-ruleset:comments", detail="${Warnings.COMMENTED_OUT_CODE.warnText()} /*"))) { - error("Should not contain this warning") - } + Assertions.assertFalse( + unfixedLintErrors.contains(LintError(line=1, col=1, ruleId="diktat-ruleset:comments", detail="${Warnings.COMMENTED_OUT_CODE.warnText()} /*")) + ) } @Test diff --git a/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt b/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt index d981eb1cdd..9a8c5546fc 100644 --- a/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt +++ b/diktat-rules/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt @@ -1,11 +1,11 @@ - /* - * Copyright 2018-2020 John Doe. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - */ +/* + Copyright 2018-2020 John Doe. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 +*/ package org.cqfn.diktat From 03a63fa0e3f8fa11f25e14e41f75b4c1dc0004cf Mon Sep 17 00:00:00 2001 From: soWhoAmI Date: Thu, 24 Dec 2020 18:06:40 +0300 Subject: [PATCH 6/7] bugfix/commented-code-fp(#652) ### What's done: * Fixed bugs --- .../diktat/ruleset/smoke/DiktatSmokeTest.kt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt index 2412ba9d1e..5ba899c7c1 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt @@ -13,8 +13,8 @@ import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_ON_FUNCTION import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_TOP_LEVEL import org.cqfn.diktat.ruleset.rules.DIKTAT_RULE_SET_ID import org.cqfn.diktat.ruleset.rules.DiktatRuleSetProvider -import org.cqfn.diktat.util.FixTestBase import org.cqfn.diktat.util.assertEquals +import org.cqfn.diktat.util.FixTestBase import com.charleskorn.kaml.Yaml import com.charleskorn.kaml.YamlConfiguration @@ -29,6 +29,8 @@ import java.io.File import kotlinx.serialization.encodeToString import org.junit.jupiter.api.Assertions +typealias ruleToConfig = Map> + /** * Test for [DiktatRuleSetProvider] in autocorrect mode as a whole. All rules are applied to a file. * Note: ktlint uses initial text from a file to calculate line and column from offset. Because of that line/col of unfixed errors @@ -45,7 +47,7 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", * Disable some of the rules. */ @Suppress("UnsafeCallOnNullableType") - private fun overrideRulesConfig(rulesToDisable: List, rulesToOverride: Map> = emptyMap()) { + private fun overrideRulesConfig(rulesToDisable: List, rulesToOverride: ruleToConfig = emptyMap()) { val rulesConfig = RulesConfigReader(javaClass.classLoader).readResource(configFilePath)!! .toMutableList() .also { rulesConfig -> @@ -97,23 +99,23 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", @Tag("DiktatRuleSetProvider") fun `smoke test #5`() { overrideRulesConfig(emptyList(), - mapOf( - Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT.name to mapOf( - "isCopyrightMandatory" to "true", - "copyrightText" to """|Copyright 2018-2020 John Doe. + mapOf( + Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT.name to mapOf( + "isCopyrightMandatory" to "true", + "copyrightText" to """|Copyright 2018-2020 John Doe. | Licensed under the Apache License, Version 2.0 (the "License"); | you may not use this file except in compliance with the License. | You may obtain a copy of the License at | | http://www.apache.org/licenses/LICENSE-2.0 """.trimMargin() - ) ) + ) ) fixAndCompare("Example5Expected.kt", "Example5Test.kt") Assertions.assertFalse( - unfixedLintErrors.contains(LintError(line=1, col=1, ruleId="diktat-ruleset:comments", detail="${Warnings.COMMENTED_OUT_CODE.warnText()} /*")) + unfixedLintErrors.contains(LintError(line = 1, col = 1, ruleId="diktat-ruleset:comments", detail = "${Warnings.COMMENTED_OUT_CODE.warnText()} /*")) ) } From 9f136cb13c7e37e267e0c1537cfb058897bb37a1 Mon Sep 17 00:00:00 2001 From: soWhoAmI Date: Thu, 24 Dec 2020 18:14:25 +0300 Subject: [PATCH 7/7] bugfix/commented-code-fp(#652) ### What's done: * Fixed bugs --- .../diktat/ruleset/chapter2/comments/CommentedCodeTest.kt | 5 ++--- .../kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt index 2b810aa065..ff65a11980 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt @@ -257,12 +257,11 @@ class CommentedCodeTest : LintTestBase(::CommentsRule) { LintError(1, 1, ruleId, "${COMMENTED_OUT_CODE.warnText()} public fun someFunc(name: String): Boolean =", false)) } - @Test @Tag(WarningNames.COMMENTED_OUT_CODE) fun `should not trigger on multiline comments #1`() { lintMethod( - """ + """ |/* | | Copyright 2018-2020 John Doe. @@ -287,7 +286,7 @@ class CommentedCodeTest : LintTestBase(::CommentsRule) { @Tag(WarningNames.COMMENTED_OUT_CODE) fun `should not trigger on multiline comments #2`() { lintMethod( - """ + """ | /* | * some text here | maybe even with another line diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt index 5ba899c7c1..d0c5cbc2cb 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt +++ b/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt @@ -13,13 +13,14 @@ import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_ON_FUNCTION import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_TOP_LEVEL import org.cqfn.diktat.ruleset.rules.DIKTAT_RULE_SET_ID import org.cqfn.diktat.ruleset.rules.DiktatRuleSetProvider -import org.cqfn.diktat.util.assertEquals import org.cqfn.diktat.util.FixTestBase +import org.cqfn.diktat.util.assertEquals import com.charleskorn.kaml.Yaml import com.charleskorn.kaml.YamlConfiguration import com.pinterest.ktlint.core.LintError import org.junit.jupiter.api.AfterEach +import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -27,7 +28,6 @@ import org.junit.jupiter.api.Test import java.io.File import kotlinx.serialization.encodeToString -import org.junit.jupiter.api.Assertions typealias ruleToConfig = Map> @@ -115,7 +115,7 @@ class DiktatSmokeTest : FixTestBase("test/smoke/src/main/kotlin", fixAndCompare("Example5Expected.kt", "Example5Test.kt") Assertions.assertFalse( - unfixedLintErrors.contains(LintError(line = 1, col = 1, ruleId="diktat-ruleset:comments", detail = "${Warnings.COMMENTED_OUT_CODE.warnText()} /*")) + unfixedLintErrors.contains(LintError(line = 1, col = 1, ruleId = "diktat-ruleset:comments", detail = "${Warnings.COMMENTED_OUT_CODE.warnText()} /*")) ) }