Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate diktat smoke tests to SAVE-cli mechanism #1388

Merged
merged 58 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
3c2a4e4
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jun 21, 2022
d40ac6b
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jun 22, 2022
96abde1
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jun 22, 2022
660a7d1
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jun 23, 2022
4e6f391
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jun 23, 2022
963c456
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jun 23, 2022
71a9fd4
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jun 23, 2022
8287e61
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jun 23, 2022
9a27748
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jun 24, 2022
f045ee9
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jun 28, 2022
81b11b8
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jun 28, 2022
345bbb4
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jun 29, 2022
2e8f33c
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jun 29, 2022
355fd2b
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jun 30, 2022
e29f5d9
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 4, 2022
1764a4b
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jul 4, 2022
00628f7
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 5, 2022
e3e410e
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 5, 2022
33c5187
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 5, 2022
143d79e
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jul 5, 2022
5e610f3
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 5, 2022
ac59eca
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 5, 2022
b3456af
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 6, 2022
394d292
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jul 6, 2022
98dc4a2
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 6, 2022
c9ee5f4
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 7, 2022
7f5184a
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
703a37d
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jul 11, 2022
9f23ae5
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
289e135
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
abcdb8f
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
fa10731
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
3785fe8
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
f5127c0
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
756aa5e
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jul 11, 2022
ea5268c
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
80c375c
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
5ae5676
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
c1fb33a
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
d8a4e25
Fixing execution cmd
orchestr7 Jul 11, 2022
5122d82
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
95ba657
Fixing execution cmd
orchestr7 Jul 11, 2022
2464246
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
bb5a101
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 11, 2022
fe8f8eb
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 12, 2022
dd5e6be
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 12, 2022
18e08ff
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jul 12, 2022
4c8c223
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 12, 2022
3258081
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jul 12, 2022
ff780e4
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 12, 2022
f1e3878
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jul 14, 2022
91f3fd8
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 14, 2022
8e51f1e
Merge branch 'master' into feature/migrate_tests_to_save
Cheshiriks Jul 14, 2022
43a4de9
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 14, 2022
b6c3401
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 14, 2022
7fec3f3
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 14, 2022
04dc7ed
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 14, 2022
23ec13e
Migrate diktat smoke tests to SAVE-cli mechanism
Cheshiriks Jul 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.cqfn.diktat.ruleset.smoke

import org.cqfn.diktat.ruleset.rules.DiktatRuleSetProvider
import org.cqfn.diktat.util.FixTestBase
import com.pinterest.ktlint.core.LintError
import org.junit.jupiter.api.Tag
import org.junit.jupiter.api.Test

class DiktatSaveSmokeTest : FixTestBase("test/smoke/src/main/kotlin",
Cheshiriks marked this conversation as resolved.
Show resolved Hide resolved
{ DiktatRuleSetProvider(configFilePath) },
{ lintError, _ -> unfixedLintErrors.add(lintError) },
) {
@Test
@Tag("DiktatRuleSetProvider")
fun `save smoke test #1`() {
saveSmokeTest("LocalVariableWithOffsetExpected.kt", "LocalVariableWithOffsetTest.kt")
}

companion object {
private const val DEFAULT_CONFIG_PATH = "../diktat-analysis.yml"
private val unfixedLintErrors: MutableList<LintError> = mutableListOf()

// by default using same yml config as for diktat code style check, but allow to override
private var configFilePath = DEFAULT_CONFIG_PATH
}
}
32 changes: 32 additions & 0 deletions diktat-rules/src/test/kotlin/org/cqfn/diktat/util/FixTestBase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import org.cqfn.diktat.test.framework.processing.TestComparatorUnit

import com.pinterest.ktlint.core.Rule
import com.pinterest.ktlint.core.RuleSetProvider
import org.apache.commons.io.FileUtils.copyFile
import org.intellij.lang.annotations.Language
import org.junit.jupiter.api.Assertions
import java.io.File

import java.nio.file.Path
import kotlin.io.path.bufferedWriter
Expand All @@ -24,6 +26,7 @@ open class FixTestBase(protected val resourceFilePath: String,
private val testComparatorUnit = TestComparatorUnit(resourceFilePath) { text, fileName ->
format(ruleSetProviderRef, text, fileName, rulesConfigList, cb = cb)
}
private val diktatVersion = "1.2.1-SNAPSHOT"
Cheshiriks marked this conversation as resolved.
Show resolved Hide resolved

constructor(resourceFilePath: String,
ruleSupplier: (rulesConfigList: List<RulesConfig>) -> Rule,
Expand Down Expand Up @@ -58,6 +61,35 @@ open class FixTestBase(protected val resourceFilePath: String,
)
}

/**
* @param expectedPath path to file with expected result, relative to [resourceFilePath]
* @param testPath path to file with code that will be transformed by formatter, relative to [resourceFilePath]
*/
protected fun saveSmokeTest(expectedPath: String, testPath: String) {
val processBuilder = ProcessBuilder("src/test/resources/test/smoke/save.exe", "src/test/resources/test/smoke/src/main/kotlin", expectedPath, testPath)
Cheshiriks marked this conversation as resolved.
Show resolved Hide resolved
val file = File("tmpSave.txt")
val diktat = File("src/test/resources/test/smoke/diktat.jar")
val diktatFrom = File("../diktat-ruleset/target/diktat-$diktatVersion.jar")

file.createNewFile()
diktat.createNewFile()
copyFile(diktatFrom, diktat)
processBuilder.redirectOutput(file)

val process = processBuilder.start()
process.waitFor()

val output = file.readLines()
val saveOutput = output.joinToString("\n")

file.delete()
diktat.delete()

Assertions.assertTrue(
saveOutput.contains("SUCCESS")
)
}

/**
* @param expectedPath path to file with expected result, relative to [resourceFilePath]
* @param testPath path to file with code that will be transformed by formatter, relative to [resourceFilePath]
Expand Down
106 changes: 106 additions & 0 deletions diktat-rules/src/test/resources/test/smoke/diktat-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
- name: DIKTAT_COMMON
enabled: true
configuration:
domainName: org.cqfn.diktat
kotlinVersion: 1.5
- name: ENUM_VALUE
enabled: true
configuration:
enumStyle: snakeCase
- name: KDOC_CONTAINS_DATE_OR_AUTHOR
enabled: true
configuration:
versionRegex: \d+\.\d+\.\d+[-.\w\d]*
- name: HEADER_MISSING_OR_WRONG_COPYRIGHT
enabled: true
configuration:
isCopyrightMandatory: false
copyrightText: ''
- name: FILE_IS_TOO_LONG
enabled: true
configuration:
maxSize: 2000
ignoreFolders: ''
- name: FILE_UNORDERED_IMPORTS
enabled: true
configuration:
useRecommendedImportsOrder: true
- name: FILE_WILDCARD_IMPORTS
enabled: true
configuration:
allowedWildcards: "kotlinx.serialization.*"
- name: BRACES_BLOCK_STRUCTURE_ERROR
enabled: true
configuration:
openBraceNewline: true
closeBraceNewline: true
- name: WRONG_INDENTATION
enabled: true
configuration:
# Is newline at the end of a file needed
newlineAtEnd: true
# If true: in parameter list when parameters are split by newline they are indented with two indentations instead of one
extendedIndentOfParameters: false
# If true: if first parameter in parameter list is on the same line as opening parenthesis, then other parameters can be aligned with it
alignedParameters: true
# If true: if expression is split by newline after operator like +/-/`*`, then the next line is indented with two indentations instead of one
extendedIndentAfterOperators: true
# If true: when dot qualified expression starts on a new line, this line will be indented with two indentations instead of one
extendedIndentBeforeDot: false
# The indentation size for each file
indentationSize: 4
- name: EMPTY_BLOCK_STRUCTURE_ERROR
enabled: true
configuration:
styleEmptyBlockWithNewline: true
allowEmptyBlocks: false
- name: LONG_LINE
enabled: true
configuration:
lineLength: 180000
- name: WRONG_NEWLINES
enabled: true
configuration:
maxParametersInOneLine: 2
- name: TOO_MANY_CONSECUTIVE_SPACES
enabled: true
configuration:
maxSpaces: 1
saveInitialFormattingForEnums: false
- name: LONG_NUMERICAL_VALUES_SEPARATED
enabled: true
configuration:
maxNumberLength: 5
maxBlockLength: 3
- name: WRONG_DECLARATIONS_ORDER
enabled: true
configuration:
sortEnum: true
sortProperty: true
- name: COMMENT_WHITE_SPACE
enabled: true
configuration:
maxSpacesBeforeComment: 2
maxSpacesInComment: 1
- name: TYPE_ALIAS
enabled: true
configuration:
typeReferenceLength: 25
- name: TOO_LONG_FUNCTION
enabled: true
configuration:
maxFunctionLength: 35 # max length of function
isIncludeHeader: false # count function's header
- name: TOO_MANY_PARAMETERS
enabled: true
configuration:
maxParameterListSize: 5
- name: NESTED_BLOCK
enabled: true
configuration:
maxNestedBlockQuantity: 4
- name: TRAILING_COMMA
enabled: false
configuration:
valueArgument: true
valueParameter: true
Binary file added diktat-rules/src/test/resources/test/smoke/ktlint
Binary file not shown.
Binary file not shown.
11 changes: 8 additions & 3 deletions diktat-rules/src/test/resources/test/smoke/save.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
[general]
execCmd="java -jar ktlint-snap.jar -R diktat-1.0.0-rc.2.jar"
execCmd="java -jar ktlint -R diktat.jar"
tags = ["smokeTest"]
description = "SmokeTest"
suiteName = "SmokeTest"
language = "Kotlin"
expectedWarningsPattern = "// ;warn:?(.*):(\\d*): (.+)"

[fix]
execFlags="--disabled_rules 'standard' -F"
["fix and warn"]
["fix and warn".fix]
execFlags="--disabled_rules=standard -F"
["fix and warn".warn]
actualWarningsPattern = "(\\w+\\..+):(\\d+):(\\d+): (\\[.*\\].*)$"
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// ;warn:1:1: [FILE_NAME_MATCH_CLASS] file name is incorrect - it should match with the class described in it if there is the only one class declared: Bug1Expected.kt vs D
// ;warn:1:1: [FILE_NAME_MATCH_CLASS] file name is incorrect - it should match with the class described in it if there is the only one class declared: Bug1Expected.kt vs D{{.*}}
package org.cqfn.diktat

// ;warn:4:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: D (cannot be auto-corrected)
// ;warn:7:7: [CLASS_NAME_INCORRECT] class/enum/interface name should be in PascalCase and should contain only latin (ASCII) letters or numbers: D
// ;warn:7:7: [IDENTIFIER_LENGTH] identifier's length is incorrect, it should be in range of [2, 64] symbols: D (cannot be auto-corrected)
// ;warn:4:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: D (cannot be auto-corrected){{.*}}
// ;warn:7:7: [CLASS_NAME_INCORRECT] class/enum/interface name should be in PascalCase and should contain only latin (ASCII) letters or numbers: D{{.*}}
// ;warn:7:7: [IDENTIFIER_LENGTH] identifier's length is incorrect, it should be in range of [2, 64] symbols: D (cannot be auto-corrected){{.*}}
class D {
// ;warn:8:5: [MISSING_KDOC_CLASS_ELEMENTS] all public, internal and protected classes, functions and variables inside the class should have Kdoc: x (cannot be auto-corrected)
// ;warn:8:5: [MISSING_KDOC_CLASS_ELEMENTS] all public, internal and protected classes, functions and variables inside the class should have Kdoc: x (cannot be auto-corrected){{.*}}
val x = 0
// ;warn:13:8: [KDOC_NO_EMPTY_TAGS] no empty descriptions in tag blocks are allowed: @return (cannot be auto-corrected)
// ;warn:13:8: [KDOC_NO_EMPTY_TAGS] no empty descriptions in tag blocks are allowed: @return (cannot be auto-corrected){{.*}}

/**
* @return
*/
fun bar(): Bar {
// ;warn:17:19: [MAGIC_NUMBER] avoid using magic numbers, instead define constants with clear names describing what the magic number means: 42 (cannot be auto-corrected)
// ;warn:17:19: [MAGIC_NUMBER] avoid using magic numbers, instead define constants with clear names describing what the magic number means: 42 (cannot be auto-corrected){{.*}}
val qux = 42
return Bar(qux)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ;warn:1:1: [FILE_NAME_MATCH_CLASS] file name is incorrect - it should match with the class described in it if there is the only one class declared: DefaultPackageExpected.kt vs Example{{.*}}
// ;warn:3:1: [FILE_INCORRECT_BLOCKS_ORDER] general structure of kotlin source file is wrong, parts are in incorrect order: @file:Suppress{{.*}}
@file:Suppress(
"PACKAGE_NAME_MISSING",
"PACKAGE_NAME_INCORRECT_PATH",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
// ;warn:1:1: [FILE_NAME_MATCH_CLASS] file name is incorrect - it should match with the class described in it if there is the only one class declared: Example1Expected.kt vs Example{{.*}}
package org.cqfn.diktat

// ;warn:4:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: Example (cannot be auto-corrected){{.*}}
class Example {
// ;warn:6:5: [MISSING_KDOC_CLASS_ELEMENTS] all public, internal and protected classes, functions and variables inside the class should have Kdoc: isValid (cannot be auto-corrected){{.*}}
// ;warn:10:5: [MISSING_KDOC_CLASS_ELEMENTS] all public, internal and protected classes, functions and variables inside the class should have Kdoc: foo (cannot be auto-corrected){{.*}}
@get:JvmName("getIsValid")
val isValid = true
val foo: Int = 1

// ;warn:12:5: [MISSING_KDOC_CLASS_ELEMENTS] all public, internal and protected classes, functions and variables inside the class should have Kdoc: foo (cannot be auto-corrected){{.*}}
// ;warn:12:5: [MISSING_KDOC_ON_FUNCTION] all public, internal and protected functions should have Kdoc with proper tags: foo (cannot be auto-corrected){{.*}}
// ;warn:19:19: [EMPTY_BLOCK_STRUCTURE_ERROR] incorrect format of empty block: empty blocks are forbidden unless it is function with override keyword (cannot be auto-corrected){{.*}}
// ;warn:24:8: [KDOC_NO_EMPTY_TAGS] no empty descriptions in tag blocks are allowed: @return (cannot be auto-corrected){{.*}}
// ;warn:30:8: [KDOC_NO_EMPTY_TAGS] no empty descriptions in tag blocks are allowed: @return (cannot be auto-corrected){{.*}}
// ;warn:38:8: [KDOC_NO_EMPTY_TAGS] no empty descriptions in tag blocks are allowed: @return (cannot be auto-corrected){{.*}}
// ;warn:47:8: [KDOC_NO_EMPTY_TAGS] no empty descriptions in tag blocks are allowed: @return (cannot be auto-corrected){{.*}}
fun Foo.foo() { }

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ;warn:1:1: [HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE] files that contain multiple or no classes should contain description of what is inside of this file: there are 2 declared classes and/or objects (cannot be auto-corrected){{.*}}
package org.cqfn.diktat

import org.slf4j.LoggerFactory
Expand All @@ -11,6 +12,7 @@ import java.util.Properties
*/
@ExperimentalStdlibApi public data class Example(val foo: Int, val bar: Double) : SuperExample("lorem ipsum")

// ;warn:36:3: [EMPTY_BLOCK_STRUCTURE_ERROR] incorrect format of empty block: empty blocks are forbidden unless it is function with override keyword (cannot be auto-corrected){{.*}}
private class TestException : Exception()
/* this class is unused */
// private class Test : RuntimeException()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ;warn:1:1: [HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE] files that contain multiple or no classes should contain description of what is inside of this file: there are 6 declared classes and/or objects (cannot be auto-corrected){{.*}}
package org.cqfn.diktat

/*
Expand All @@ -8,14 +9,23 @@ package org.cqfn.diktat
* @property name
*/
class HttpClient(var name: String) {
// ;warn:12:5: [MISSING_KDOC_CLASS_ELEMENTS] all public, internal and protected classes, functions and variables inside the class should have Kdoc: url (cannot be auto-corrected){{.*}}
// ;warn:16:5: [MISSING_KDOC_CLASS_ELEMENTS] all public, internal and protected classes, functions and variables inside the class should have Kdoc: port (cannot be auto-corrected){{.*}}
// ;warn:17:5: [MISSING_KDOC_CLASS_ELEMENTS] all public, internal and protected classes, functions and variables inside the class should have Kdoc: timeout (cannot be auto-corrected){{.*}}
var url: String = ""
var port: String = ""
var timeout = 0

// ;warn:19:5: [MISSING_KDOC_CLASS_ELEMENTS] all public, internal and protected classes, functions and variables inside the class should have Kdoc: doRequest (cannot be auto-corrected){{.*}}
// ;warn:19:5: [MISSING_KDOC_ON_FUNCTION] all public, internal and protected functions should have Kdoc with proper tags: doRequest (cannot be auto-corrected){{.*}}
// ;warn:22:21: [EMPTY_BLOCK_STRUCTURE_ERROR] incorrect format of empty block: empty blocks are forbidden unless it is function with override keyword (cannot be auto-corrected){{.*}}
fun doRequest() {}
}

// ;warn:25:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: Example (cannot be auto-corrected){{.*}}
class Example {
// ;warn:27:5: [MISSING_KDOC_CLASS_ELEMENTS] all public, internal and protected classes, functions and variables inside the class should have Kdoc: foo (cannot be auto-corrected){{.*}}
// ;warn:27:5: [MISSING_KDOC_ON_FUNCTION] all public, internal and protected functions should have Kdoc with proper tags: foo (cannot be auto-corrected){{.*}}
fun foo() {
if (condition1 && condition2) {
bar()
Expand All @@ -33,10 +43,13 @@ class Example {
}
}

// ;warn:46:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: IssueType (cannot be auto-corrected){{.*}}
enum class IssueType {
PROJECT_STRUCTURE, TESTS, VCS
}

// ;warn:51:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: IssueType2 (cannot be auto-corrected){{.*}}
// ;warn:61:8: [KDOC_NO_EMPTY_TAGS] no empty descriptions in tag blocks are allowed: @return (cannot be auto-corrected){{.*}}
enum class IssueType2 {
PROJECT_STRUCTURE,
TESTS,
Expand All @@ -52,6 +65,13 @@ enum class IssueType2 {
companion object
}

// ;warn:68:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: IssueType3 (cannot be auto-corrected){{.*}}
// ;warn:76:5: [IDENTIFIER_LENGTH] identifier's length is incorrect, it should be in range of [2, 64] symbols: A (cannot be auto-corrected){{.*}}
// ;warn:77:5: [CONFUSING_IDENTIFIER_NAMING] it's a bad name for identifier: better name is: bt, nxt (cannot be auto-corrected){{.*}}
// ;warn:77:5: [IDENTIFIER_LENGTH] identifier's length is incorrect, it should be in range of [2, 64] symbols: B (cannot be auto-corrected){{.*}}
// ;warn:78:5: [IDENTIFIER_LENGTH] identifier's length is incorrect, it should be in range of [2, 64] symbols: C (cannot be auto-corrected){{.*}}
// ;warn:79:5: [CONFUSING_IDENTIFIER_NAMING] it's a bad name for identifier: better name is: obj, dgt (cannot be auto-corrected){{.*}}
// ;warn:79:5: [IDENTIFIER_LENGTH] identifier's length is incorrect, it should be in range of [2, 64] symbols: D (cannot be auto-corrected){{.*}}
enum class IssueType3 {
A,
B,
Expand All @@ -60,14 +80,20 @@ enum class IssueType3 {
;
}

// ;warn:83:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: Foo (cannot be auto-corrected){{.*}}
// ;warn:88:8: [KDOC_NO_NEWLINE_AFTER_SPECIAL_TAGS] in KDoc there should be exactly one empty line after special tags: @implNote{{.*}}
// ;warn:90:23: [EMPTY_BLOCK_STRUCTURE_ERROR] incorrect format of empty block: empty blocks are forbidden unless it is function with override keyword (cannot be auto-corrected){{.*}}
class Foo {
/**
* @implNote lorem ipsum
*/
private fun foo() {}
}

// ;warn:93:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: mains (cannot be auto-corrected){{.*}}
// ;warn:93:1: [MISSING_KDOC_ON_FUNCTION] all public, internal and protected functions should have Kdoc with proper tags: mains (cannot be auto-corrected){{.*}}
fun mains() {
// ;warn:101:23: [MAGIC_NUMBER] avoid using magic numbers, instead define constants with clear names describing what the magic number means: 100 (cannot be auto-corrected){{.*}}
val httpClient = HttpClient("myConnection")
.apply {
url = "http://example.com"
Expand Down
Loading