diff --git a/.editorconfig b/.editorconfig index d8cc0b33b1..6a5d08a32b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -55,7 +55,7 @@ ij_kotlin_field_annotation_wrap = split_into_lines ij_kotlin_finally_on_new_line = false ij_kotlin_if_rparen_on_new_line = true ij_kotlin_import_nested_classes = false -ij_kotlin_imports_layout = android.**,androidx.**,com.android.**,org.cqfn.diktat.**,*,java.**,javax.**,kotlin.**,kotlinx.**,^ +ij_kotlin_imports_layout = android.**,androidx.**,com.android.**,com.saveourtool.diktat.**,*,java.**,javax.**,kotlin.**,kotlinx.**,^ ij_kotlin_insert_whitespaces_in_simple_one_line_method = true ij_kotlin_keep_blank_lines_before_right_brace = 2 ij_kotlin_keep_blank_lines_in_code = 2 diff --git a/.github/workflows/diktat.yml b/.github/workflows/diktat.yml index 5ac6eeab5d..1e92f65d1d 100644 --- a/.github/workflows/diktat.yml +++ b/.github/workflows/diktat.yml @@ -14,33 +14,36 @@ jobs: security-events: write steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: temurin - - uses: gradle/gradle-build-action@v2 - with: - gradle-version: wrapper - arguments: | - diktatCheck - mergeDiktatReports - -Pdiktat.githubActions=true - -Pdetekt.multiplatform.disabled=true - --build-cache - --continue - -PgprUser=${{ github.actor }} - -PgprKey=${{ secrets.GITHUB_TOKEN }} - - name: Upload SARIF report to Github - uses: github/codeql-action/upload-sarif@v2 - if: ${{ always() }} - with: - sarif_file: build/reports/diktat/diktat-merged.sarif - - name: Upload SARIF artifacts - uses: actions/upload-artifact@v3 - if: ${{ failure() }} - with: - name: sarif-reports - path: "**/build/reports/diktat" - retention-days: 1 + - name: This action is disabled until the release 2.0.0 + run: | + echo "This action is disabled until the release 2.0.0" +# - uses: actions/checkout@v3 +# - name: Set up JDK 11 +# uses: actions/setup-java@v3 +# with: +# java-version: 11 +# distribution: temurin +# - uses: gradle/gradle-build-action@v2 +# with: +# gradle-version: wrapper +# arguments: | +# diktatCheck +# mergeDiktatReports +# -Pdiktat.githubActions=true +# -Pdetekt.multiplatform.disabled=true +# --build-cache +# --continue +# -PgprUser=${{ github.actor }} +# -PgprKey=${{ secrets.GITHUB_TOKEN }} +# - name: Upload SARIF report to Github +# uses: github/codeql-action/upload-sarif@v2 +# if: ${{ always() }} +# with: +# sarif_file: build/reports/diktat/diktat-merged.sarif +# - name: Upload SARIF artifacts +# uses: actions/upload-artifact@v3 +# if: ${{ failure() }} +# with: +# name: sarif-reports +# path: "**/build/reports/diktat" +# retention-days: 1 diff --git a/.github/workflows/diktat_snapshot.yml b/.github/workflows/diktat_snapshot.yml index 484378df23..3e6bf8c3d7 100644 --- a/.github/workflows/diktat_snapshot.yml +++ b/.github/workflows/diktat_snapshot.yml @@ -53,14 +53,34 @@ jobs: :diktat-gradle-plugin:publishToMavenLocal :generateLibsForDiktatSnapshot -x detekt - -x diktatCheck -x test + # FixMe: return after 2.0.0 + # -x diktatCheck + + - name: 'Copy files and set flags' + run: | + echo "DIKTAT_SNAPSHOT=1" >> $GITHUB_ENV + mv gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/diktat-convention-configuration.gradle.txt gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/diktat-convention-configuration.gradle.kts - name: 'Override ' run: | mv gradle/libs.versions.toml gradle/libs.versions.toml_current mv build/diktat-snapshot/libs.versions.toml_snapshot gradle/libs.versions.toml + # FixMe: remove after 2.0.0 + - name: 'Small hack to inject implementation and to run diktat properly from snapshot' + run: | + #!/bin/bash + file_path=gradle/plugins/build.gradle.kts + string_to_insert=' + dependencies { + implementation(libs.diktat.gradle.plugin) { + exclude("io.github.detekt.sarif4k", "sarif4k") + } + }' + + echo $string_to_insert >> $file_path + # copied from .github/workflows/diktat.yml - uses: gradle/gradle-build-action@v2 with: @@ -70,8 +90,8 @@ jobs: mergeDiktatReports -Pdiktat.githubActions=true -Pdetekt.multiplatform.disabled=true - --build-cache --continue + --build-cache -PgprUser=${{ github.actor }} -PgprKey=${{ secrets.GITHUB_TOKEN }} - name: Upload SARIF report to Github diff --git a/README.md b/README.md index 3663361147..e76eadc70c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![codecov](https://codecov.io/gh/saveourtool/diKTat/branch/master/graph/badge.svg)](https://codecov.io/gh/saveourtool/diKTat) [![Releases](https://img.shields.io/github/v/release/saveourtool/diKTat)](https://github.com/saveourtool/diKTat/releases) -[![Maven Central](https://img.shields.io/maven-central/v/org.cqfn.diktat/diktat-rules)](https://mvnrepository.com/artifact/org.cqfn.diktat) +[![Maven Central](https://img.shields.io/maven-central/v/com.saveourtool.diktat/diktat-rules)](https://mvnrepository.com/artifact/com.saveourtool.diktat) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsaveourtool%2FdiKTat.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsaveourtool%2FdiKTat?ref=badge_shield) [![Chat on Telegram](https://img.shields.io/badge/Chat%20on-Telegram-brightgreen.svg)](https://t.me/diktat_help) @@ -60,7 +60,7 @@ Main features of diktat are the following: **OR** use `curl`: ```console - $ curl -sSLO https://github.com/saveourtool/diKTat/releases/download/v1.2.5/diktat-1.2.5.jar + $ curl -sSLO https://github.com/saveourtool/diKTat/releases/download/v1.2.5/diktat-1.2.5.jar && chmod a+x diktat ``` ### Run diKTat @@ -89,7 +89,7 @@ If you use it and encounter any problems, feel free to open issues on [github](h ```xml - org.cqfn.diktat + com.saveourtool.diktat diktat-maven-plugin ${diktat.version} @@ -182,7 +182,7 @@ This plugin is available since version 0.1.5. You can see how the plugin is conf ```kotlin plugins { - id("org.cqfn.diktat.diktat-gradle-plugin") version "1.2.5" + id("com.saveourtool.diktat.diktat-gradle-plugin") version "1.2.5" } ``` @@ -193,11 +193,11 @@ buildscript { mavenCentral() } dependencies { - classpath("org.cqfn.diktat:diktat-gradle-plugin:1.2.5") + classpath("com.saveourtool.diktat:diktat-gradle-plugin:1.2.5") } } -apply(plugin = "org.cqfn.diktat.diktat-gradle-plugin") +apply(plugin = "com.saveourtool.diktat.diktat-gradle-plugin") ``` You can then configure diktat using `diktat` extension: diff --git a/build.gradle.kts b/build.gradle.kts index 11af66166a..4ea51e2334 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,13 +1,13 @@ -import org.cqfn.diktat.buildutils.configureSigning +import com.saveourtool.diktat.buildutils.configureSigning import org.jetbrains.kotlin.incremental.createDirectory import java.nio.file.Files @Suppress("DSL_SCOPE_VIOLATION", "RUN_IN_SCRIPT") // https://github.com/gradle/gradle/issues/22797 plugins { - id("org.cqfn.diktat.buildutils.versioning-configuration") - id("org.cqfn.diktat.buildutils.git-hook-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") - id("org.cqfn.diktat.buildutils.publishing-configuration") + id("com.saveourtool.diktat.buildutils.versioning-configuration") + id("com.saveourtool.diktat.buildutils.git-hook-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.publishing-configuration") alias(libs.plugins.talaiot.base) java `maven-publish` diff --git a/detekt-config.yml b/detekt-config.yml index 031a75e8cf..76c8c31a40 100644 --- a/detekt-config.yml +++ b/detekt-config.yml @@ -602,4 +602,4 @@ style: WildcardImport: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] - excludeImports: ['org.cqfn.diktat.ruleset.utils.*', 'java.util.*', 'kotlinx.android.synthetic.*', 'kotlinx.serialization'] + excludeImports: ['com.saveourtool.diktat.ruleset.utils.*', 'java.util.*', 'kotlinx.android.synthetic.*', 'kotlinx.serialization'] diff --git a/diktat-analysis.yml b/diktat-analysis.yml index 101bcf658a..6b412d427d 100644 --- a/diktat-analysis.yml +++ b/diktat-analysis.yml @@ -3,7 +3,7 @@ enabled: true configuration: # put your package name here - it will be autofixed and checked - domainName: org.cqfn.diktat + domainName: com.saveourtool.diktat # testDirs: test # can also use chapter names here (not only numbers) # expected values: disabledChapters: "Naming, Comments, General, Variables, Functions, Classes" @@ -173,8 +173,8 @@ - name: FILE_WILDCARD_IMPORTS enabled: true configuration: - # Allowed wildcards for imports (e.g. "import org.cqfn.diktat.*, import org.jetbrains.kotlin.*") - allowedWildcards: "kotlinx.serialization.*,org.cqfn.diktat.ruleset.utils.*" + # Allowed wildcards for imports (e.g. "import com.saveourtool.diktat.*, import org.jetbrains.kotlin.*") + allowedWildcards: "kotlinx.serialization.*,com.saveourtool.diktat.ruleset.utils.*" # Checks unused imports - name: UNUSED_IMPORT enabled: true diff --git a/diktat-api/build.gradle.kts b/diktat-api/build.gradle.kts index d27314538f..7dd10c71f3 100644 --- a/diktat-api/build.gradle.kts +++ b/diktat-api/build.gradle.kts @@ -1,7 +1,7 @@ plugins { - id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") - id("org.cqfn.diktat.buildutils.publishing-signing-default-configuration") + id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.publishing-signing-default-configuration") } project.description = "This module builds diktat-api" diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatProcessor.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatProcessor.kt similarity index 93% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatProcessor.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatProcessor.kt index f74bf92420..3b12d2ff9d 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatProcessor.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatProcessor.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat +package com.saveourtool.diktat -import org.cqfn.diktat.api.DiktatCallback +import com.saveourtool.diktat.api.DiktatCallback import java.nio.file.Path /** diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatProcessorFactory.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatProcessorFactory.kt similarity index 82% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatProcessorFactory.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatProcessorFactory.kt index 8363826ed4..dcc554fca3 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatProcessorFactory.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatProcessorFactory.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat +package com.saveourtool.diktat -import org.cqfn.diktat.api.DiktatRuleSet +import com.saveourtool.diktat.api.DiktatRuleSet /** * A factory to create [DiktatProcessor] using [DiktatRuleSet] diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatRunner.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatRunner.kt similarity index 88% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatRunner.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatRunner.kt index 5bc85c14fe..8285dd58b4 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatRunner.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatRunner.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat +package com.saveourtool.diktat -import org.cqfn.diktat.api.DiktatBaseline -import org.cqfn.diktat.api.DiktatBaseline.Companion.skipKnownErrors -import org.cqfn.diktat.api.DiktatProcessorListener -import org.cqfn.diktat.api.DiktatProcessorListener.Companion.countErrorsAsProcessorListener -import org.cqfn.diktat.api.DiktatReporter +import com.saveourtool.diktat.api.DiktatBaseline +import com.saveourtool.diktat.api.DiktatBaseline.Companion.skipKnownErrors +import com.saveourtool.diktat.api.DiktatProcessorListener +import com.saveourtool.diktat.api.DiktatProcessorListener.Companion.countErrorsAsProcessorListener +import com.saveourtool.diktat.api.DiktatReporter import java.nio.file.Path import java.util.concurrent.atomic.AtomicInteger import kotlin.io.path.readText diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatRunnerArguments.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatRunnerArguments.kt similarity index 95% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatRunnerArguments.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatRunnerArguments.kt index 026597824e..699e787c69 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatRunnerArguments.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatRunnerArguments.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat +package com.saveourtool.diktat -import org.cqfn.diktat.api.DiktatProcessorListener +import com.saveourtool.diktat.api.DiktatProcessorListener import java.io.OutputStream import java.nio.file.Path import kotlin.io.path.absolutePathString diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatRunnerFactory.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatRunnerFactory.kt similarity index 86% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatRunnerFactory.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatRunnerFactory.kt index 7e886c787c..4cdfc1d570 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/DiktatRunnerFactory.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/DiktatRunnerFactory.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat +package com.saveourtool.diktat -import org.cqfn.diktat.api.DiktatBaseline -import org.cqfn.diktat.api.DiktatBaselineFactory -import org.cqfn.diktat.api.DiktatProcessorListener -import org.cqfn.diktat.api.DiktatProcessorListener.Companion.closeAfterAllAsProcessorListener -import org.cqfn.diktat.api.DiktatReporter -import org.cqfn.diktat.api.DiktatReporterFactory -import org.cqfn.diktat.api.DiktatRuleSetFactory +import com.saveourtool.diktat.api.DiktatBaseline +import com.saveourtool.diktat.api.DiktatBaselineFactory +import com.saveourtool.diktat.api.DiktatProcessorListener +import com.saveourtool.diktat.api.DiktatProcessorListener.Companion.closeAfterAllAsProcessorListener +import com.saveourtool.diktat.api.DiktatReporter +import com.saveourtool.diktat.api.DiktatReporterFactory +import com.saveourtool.diktat.api.DiktatRuleSetFactory import java.io.OutputStream import java.nio.file.Path diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatBaseline.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatBaseline.kt similarity index 97% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatBaseline.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatBaseline.kt index fccbd32ca1..f415801708 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatBaseline.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatBaseline.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.api +package com.saveourtool.diktat.api import java.nio.file.Path diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatBaselineFactory.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatBaselineFactory.kt similarity index 95% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatBaselineFactory.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatBaselineFactory.kt index 9276e0ae38..44f127a5b9 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatBaselineFactory.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatBaselineFactory.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.api +package com.saveourtool.diktat.api import java.nio.file.Path diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatCallback.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatCallback.kt similarity index 94% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatCallback.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatCallback.kt index b4260cc474..d9589dbe6f 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatCallback.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatCallback.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.api +package com.saveourtool.diktat.api /** * Callback for diktat process diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatError.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatError.kt similarity index 92% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatError.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatError.kt index 56b20c90a5..5bf012e23b 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatError.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatError.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.api +package com.saveourtool.diktat.api /** * Error found by `diktat` diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatErrorEmitter.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatErrorEmitter.kt similarity index 94% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatErrorEmitter.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatErrorEmitter.kt index bda11ebff1..c549b997a5 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatErrorEmitter.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatErrorEmitter.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.api +package com.saveourtool.diktat.api /** * The **file-specific** error emitter, initialized and used in [DiktatRule] implementations. diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatProcessorListener.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatProcessorListener.kt similarity index 81% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatProcessorListener.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatProcessorListener.kt index 36927a71ff..b8497b0090 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatProcessorListener.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatProcessorListener.kt @@ -1,29 +1,29 @@ -package org.cqfn.diktat.api +package com.saveourtool.diktat.api import java.io.OutputStream import java.nio.file.Path import java.util.concurrent.atomic.AtomicInteger /** - * A listener for [org.cqfn.diktat.DiktatProcessor] + * A listener for [com.saveourtool.diktat.DiktatProcessor] */ interface DiktatProcessorListener { /** - * Called once, before [org.cqfn.diktat.DiktatProcessor] starts process a bunch of files. + * Called once, before [com.saveourtool.diktat.DiktatProcessor] starts process a bunch of files. * * @param files */ fun beforeAll(files: Collection): Unit = Unit /** - * Called before each file when [org.cqfn.diktat.DiktatProcessor] starts to process it. + * Called before each file when [com.saveourtool.diktat.DiktatProcessor] starts to process it. * * @param file */ fun before(file: Path): Unit = Unit /** - * Called on each error when [org.cqfn.diktat.DiktatProcessor] detects such one. + * Called on each error when [com.saveourtool.diktat.DiktatProcessor] detects such one. * * @param file * @param error @@ -36,14 +36,14 @@ interface DiktatProcessorListener { ): Unit = Unit /** - * Called after each file when [org.cqfn.diktat.DiktatProcessor] finished to process it. + * Called after each file when [com.saveourtool.diktat.DiktatProcessor] finished to process it. * * @param file */ fun after(file: Path): Unit = Unit /** - * Called once, after the processing of [org.cqfn.diktat.DiktatProcessor] finished. + * Called once, after the processing of [com.saveourtool.diktat.DiktatProcessor] finished. */ fun afterAll(): Unit = Unit diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatReporterFactory.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatReporterFactory.kt similarity index 97% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatReporterFactory.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatReporterFactory.kt index 2fe86176bf..51438c9c8c 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatReporterFactory.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatReporterFactory.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.api +package com.saveourtool.diktat.api import java.io.OutputStream import java.nio.file.Path diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatRule.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatRule.kt similarity index 95% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatRule.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatRule.kt index ea369146c1..53a0471128 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatRule.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatRule.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.api +package com.saveourtool.diktat.api import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatRuleSet.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatRuleSet.kt similarity index 81% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatRuleSet.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatRuleSet.kt index 18700f5a24..a8f9aca532 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatRuleSet.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatRuleSet.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.api +package com.saveourtool.diktat.api /** * A group of [DiktatRule]'s as a single set. diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatRuleSetFactory.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatRuleSetFactory.kt similarity index 95% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatRuleSetFactory.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatRuleSetFactory.kt index 5f66e87e64..e0ca3e4a7e 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/api/DiktatRuleSetFactory.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/api/DiktatRuleSetFactory.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.api +package com.saveourtool.diktat.api import java.nio.file.Path import kotlin.io.path.absolutePathString diff --git a/diktat-api/src/main/kotlin/org/cqfn/diktat/util/FileUtils.kt b/diktat-api/src/main/kotlin/com/saveourtool/diktat/util/FileUtils.kt similarity index 96% rename from diktat-api/src/main/kotlin/org/cqfn/diktat/util/FileUtils.kt rename to diktat-api/src/main/kotlin/com/saveourtool/diktat/util/FileUtils.kt index b1fdce2891..5a5add0263 100644 --- a/diktat-api/src/main/kotlin/org/cqfn/diktat/util/FileUtils.kt +++ b/diktat-api/src/main/kotlin/com/saveourtool/diktat/util/FileUtils.kt @@ -2,7 +2,7 @@ * Utility methods to work with file paths. */ -package org.cqfn.diktat.util +package com.saveourtool.diktat.util import java.nio.file.Path import kotlin.io.path.extension diff --git a/diktat-cli/build.gradle.kts b/diktat-cli/build.gradle.kts index 386acfcf02..f5e315c7cc 100644 --- a/diktat-cli/build.gradle.kts +++ b/diktat-cli/build.gradle.kts @@ -3,9 +3,9 @@ import org.jetbrains.kotlin.incremental.createDirectory @Suppress("DSL_SCOPE_VIOLATION", "RUN_IN_SCRIPT") // https://github.com/gradle/gradle/issues/22797 plugins { - id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") - id("org.cqfn.diktat.buildutils.publishing-signing-default-configuration") + id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.publishing-signing-default-configuration") alias(libs.plugins.kotlin.plugin.serialization) alias(libs.plugins.shadow) } @@ -55,7 +55,7 @@ sourceSets.getByName("main") { tasks.named("shadowJar") { archiveClassifier.set("") manifest { - attributes["Main-Class"] = "org.cqfn.diktat.DiktatMainKt" + attributes["Main-Class"] = "com.saveourtool.diktat.DiktatMainKt" } duplicatesStrategy = DuplicatesStrategy.FAIL } diff --git a/diktat-cli/src/main/kotlin/org/cqfn/diktat/DiktatMain.kt b/diktat-cli/src/main/kotlin/com/saveourtool/diktat/DiktatMain.kt similarity index 76% rename from diktat-cli/src/main/kotlin/org/cqfn/diktat/DiktatMain.kt rename to diktat-cli/src/main/kotlin/com/saveourtool/diktat/DiktatMain.kt index aae16f9407..9b0747d3cf 100644 --- a/diktat-cli/src/main/kotlin/org/cqfn/diktat/DiktatMain.kt +++ b/diktat-cli/src/main/kotlin/com/saveourtool/diktat/DiktatMain.kt @@ -2,15 +2,15 @@ * The file contains main method */ -package org.cqfn.diktat - -import org.cqfn.diktat.api.DiktatProcessorListener -import org.cqfn.diktat.cli.DiktatMode -import org.cqfn.diktat.cli.DiktatProperties -import org.cqfn.diktat.ktlint.DiktatBaselineFactoryImpl -import org.cqfn.diktat.ktlint.DiktatProcessorFactoryImpl -import org.cqfn.diktat.ktlint.DiktatReporterFactoryImpl -import org.cqfn.diktat.ruleset.rules.DiktatRuleSetFactoryImpl +package com.saveourtool.diktat + +import com.saveourtool.diktat.api.DiktatProcessorListener +import com.saveourtool.diktat.cli.DiktatMode +import com.saveourtool.diktat.cli.DiktatProperties +import com.saveourtool.diktat.ktlint.DiktatBaselineFactoryImpl +import com.saveourtool.diktat.ktlint.DiktatProcessorFactoryImpl +import com.saveourtool.diktat.ktlint.DiktatReporterFactoryImpl +import com.saveourtool.diktat.ruleset.rules.DiktatRuleSetFactoryImpl import mu.KotlinLogging diff --git a/diktat-cli/src/main/kotlin/org/cqfn/diktat/cli/DiktatMode.kt b/diktat-cli/src/main/kotlin/com/saveourtool/diktat/cli/DiktatMode.kt similarity index 86% rename from diktat-cli/src/main/kotlin/org/cqfn/diktat/cli/DiktatMode.kt rename to diktat-cli/src/main/kotlin/com/saveourtool/diktat/cli/DiktatMode.kt index 1618e008f4..36fb838af7 100644 --- a/diktat-cli/src/main/kotlin/org/cqfn/diktat/cli/DiktatMode.kt +++ b/diktat-cli/src/main/kotlin/com/saveourtool/diktat/cli/DiktatMode.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.cli +package com.saveourtool.diktat.cli import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/diktat-cli/src/main/kotlin/org/cqfn/diktat/cli/DiktatProperties.kt b/diktat-cli/src/main/kotlin/com/saveourtool/diktat/cli/DiktatProperties.kt similarity index 93% rename from diktat-cli/src/main/kotlin/org/cqfn/diktat/cli/DiktatProperties.kt rename to diktat-cli/src/main/kotlin/com/saveourtool/diktat/cli/DiktatProperties.kt index 313a35a8b8..bd86e2393f 100644 --- a/diktat-cli/src/main/kotlin/org/cqfn/diktat/cli/DiktatProperties.kt +++ b/diktat-cli/src/main/kotlin/com/saveourtool/diktat/cli/DiktatProperties.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.cli +package com.saveourtool.diktat.cli -import org.cqfn.diktat.DiktatRunnerArguments -import org.cqfn.diktat.api.DiktatProcessorListener -import org.cqfn.diktat.api.DiktatReporterFactory -import org.cqfn.diktat.common.config.rules.DIKTAT -import org.cqfn.diktat.common.config.rules.DIKTAT_ANALYSIS_CONF -import org.cqfn.diktat.util.isKotlinCodeOrScript -import org.cqfn.diktat.util.tryToPathIfExists -import org.cqfn.diktat.util.walkByGlob +import com.saveourtool.diktat.DiktatRunnerArguments +import com.saveourtool.diktat.api.DiktatProcessorListener +import com.saveourtool.diktat.api.DiktatReporterFactory +import com.saveourtool.diktat.common.config.rules.DIKTAT +import com.saveourtool.diktat.common.config.rules.DIKTAT_ANALYSIS_CONF +import com.saveourtool.diktat.util.isKotlinCodeOrScript +import com.saveourtool.diktat.util.tryToPathIfExists +import com.saveourtool.diktat.util.walkByGlob import generated.DIKTAT_VERSION import generated.KTLINT_VERSION import org.apache.logging.log4j.LogManager @@ -189,7 +189,7 @@ data class DiktatProperties( /** * @param diktatReporterFactory - * @return a single type of [org.cqfn.diktat.api.DiktatReporter] as parsed cli arg + * @return a single type of [com.saveourtool.diktat.api.DiktatReporter] as parsed cli arg */ private fun ArgParser.reporterType(diktatReporterFactory: DiktatReporterFactory) = option( type = ArgType.Choice( diff --git a/diktat-cli/src/main/kotlin/org/cqfn/diktat/util/CliUtils.kt b/diktat-cli/src/main/kotlin/com/saveourtool/diktat/util/CliUtils.kt similarity index 97% rename from diktat-cli/src/main/kotlin/org/cqfn/diktat/util/CliUtils.kt rename to diktat-cli/src/main/kotlin/com/saveourtool/diktat/util/CliUtils.kt index ace7196ecf..632df32475 100644 --- a/diktat-cli/src/main/kotlin/org/cqfn/diktat/util/CliUtils.kt +++ b/diktat-cli/src/main/kotlin/com/saveourtool/diktat/util/CliUtils.kt @@ -2,7 +2,7 @@ * This class contains util methods to operate with java.nio.file.Path for CLI */ -package org.cqfn.diktat.util +package com.saveourtool.diktat.util import java.io.File import java.nio.file.FileSystem diff --git a/diktat-cli/src/test/kotlin/org/cqfn/diktat/util/CliUtilsKtTest.kt b/diktat-cli/src/test/kotlin/com/saveourtool/diktat/util/CliUtilsKtTest.kt similarity index 98% rename from diktat-cli/src/test/kotlin/org/cqfn/diktat/util/CliUtilsKtTest.kt rename to diktat-cli/src/test/kotlin/com/saveourtool/diktat/util/CliUtilsKtTest.kt index 19d65f1428..1eb1151b59 100644 --- a/diktat-cli/src/test/kotlin/org/cqfn/diktat/util/CliUtilsKtTest.kt +++ b/diktat-cli/src/test/kotlin/com/saveourtool/diktat/util/CliUtilsKtTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.util +package com.saveourtool.diktat.util import org.assertj.core.api.Assertions import org.junit.jupiter.api.Test diff --git a/diktat-common/build.gradle.kts b/diktat-common/build.gradle.kts index a4215a0a42..219d3472a1 100644 --- a/diktat-common/build.gradle.kts +++ b/diktat-common/build.gradle.kts @@ -1,8 +1,8 @@ @Suppress("DSL_SCOPE_VIOLATION", "RUN_IN_SCRIPT") // https://github.com/gradle/gradle/issues/22797 plugins { - id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") - id("org.cqfn.diktat.buildutils.publishing-signing-default-configuration") + id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.publishing-signing-default-configuration") alias(libs.plugins.kotlin.plugin.serialization) } diff --git a/diktat-common/src/main/kotlin/org/cqfn/diktat/common/cli/CliArgument.kt b/diktat-common/src/main/kotlin/com/saveourtool/diktat/common/cli/CliArgument.kt similarity index 95% rename from diktat-common/src/main/kotlin/org/cqfn/diktat/common/cli/CliArgument.kt rename to diktat-common/src/main/kotlin/com/saveourtool/diktat/common/cli/CliArgument.kt index 1744df2dfc..a24be0a986 100644 --- a/diktat-common/src/main/kotlin/org/cqfn/diktat/common/cli/CliArgument.kt +++ b/diktat-common/src/main/kotlin/com/saveourtool/diktat/common/cli/CliArgument.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.common.cli +package com.saveourtool.diktat.common.cli import org.apache.commons.cli.Option diff --git a/diktat-common/src/main/kotlin/org/cqfn/diktat/common/config/reader/ApplicationProperties.kt b/diktat-common/src/main/kotlin/com/saveourtool/diktat/common/config/reader/ApplicationProperties.kt similarity index 95% rename from diktat-common/src/main/kotlin/org/cqfn/diktat/common/config/reader/ApplicationProperties.kt rename to diktat-common/src/main/kotlin/com/saveourtool/diktat/common/config/reader/ApplicationProperties.kt index 0ee4fe2de3..708ff0a6b5 100644 --- a/diktat-common/src/main/kotlin/org/cqfn/diktat/common/config/reader/ApplicationProperties.kt +++ b/diktat-common/src/main/kotlin/com/saveourtool/diktat/common/config/reader/ApplicationProperties.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.common.config.reader +package com.saveourtool.diktat.common.config.reader import mu.KotlinLogging diff --git a/diktat-common/src/main/kotlin/org/cqfn/diktat/common/config/reader/JsonResourceConfigReader.kt b/diktat-common/src/main/kotlin/com/saveourtool/diktat/common/config/reader/JsonResourceConfigReader.kt similarity index 97% rename from diktat-common/src/main/kotlin/org/cqfn/diktat/common/config/reader/JsonResourceConfigReader.kt rename to diktat-common/src/main/kotlin/com/saveourtool/diktat/common/config/reader/JsonResourceConfigReader.kt index 6da9a9a3d3..8b442dce87 100644 --- a/diktat-common/src/main/kotlin/org/cqfn/diktat/common/config/reader/JsonResourceConfigReader.kt +++ b/diktat-common/src/main/kotlin/com/saveourtool/diktat/common/config/reader/JsonResourceConfigReader.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.common.config.reader +package com.saveourtool.diktat.common.config.reader import mu.KotlinLogging diff --git a/diktat-common/src/main/kotlin/org/cqfn/diktat/common/config/rules/RulesConfigReader.kt b/diktat-common/src/main/kotlin/com/saveourtool/diktat/common/config/rules/RulesConfigReader.kt similarity index 97% rename from diktat-common/src/main/kotlin/org/cqfn/diktat/common/config/rules/RulesConfigReader.kt rename to diktat-common/src/main/kotlin/com/saveourtool/diktat/common/config/rules/RulesConfigReader.kt index 29c8ef8e02..db6e7271c1 100644 --- a/diktat-common/src/main/kotlin/org/cqfn/diktat/common/config/rules/RulesConfigReader.kt +++ b/diktat-common/src/main/kotlin/com/saveourtool/diktat/common/config/rules/RulesConfigReader.kt @@ -2,10 +2,10 @@ * Classes and extensions needed to read and parse rules configuration file */ -package org.cqfn.diktat.common.config.rules +package com.saveourtool.diktat.common.config.rules -import org.cqfn.diktat.common.config.reader.JsonResourceConfigReader -import org.cqfn.diktat.common.config.rules.RulesConfigReader.Companion.log +import com.saveourtool.diktat.common.config.reader.JsonResourceConfigReader +import com.saveourtool.diktat.common.config.rules.RulesConfigReader.Companion.log import com.charleskorn.kaml.Yaml import com.charleskorn.kaml.YamlConfiguration diff --git a/diktat-common/src/test/kotlin/org/cqfn/diktat/test/ConfigReaderTest.kt b/diktat-common/src/test/kotlin/com/saveourtool/diktat/test/ConfigReaderTest.kt similarity index 74% rename from diktat-common/src/test/kotlin/org/cqfn/diktat/test/ConfigReaderTest.kt rename to diktat-common/src/test/kotlin/com/saveourtool/diktat/test/ConfigReaderTest.kt index 4d0802e289..be37b4403d 100644 --- a/diktat-common/src/test/kotlin/org/cqfn/diktat/test/ConfigReaderTest.kt +++ b/diktat-common/src/test/kotlin/com/saveourtool/diktat/test/ConfigReaderTest.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.test +package com.saveourtool.diktat.test -import org.cqfn.diktat.common.config.rules.DIKTAT_COMMON -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.RulesConfigReader -import org.cqfn.diktat.common.config.rules.getCommonConfiguration -import org.cqfn.diktat.common.config.rules.kotlinVersion +import com.saveourtool.diktat.common.config.rules.DIKTAT_COMMON +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.RulesConfigReader +import com.saveourtool.diktat.common.config.rules.getCommonConfiguration +import com.saveourtool.diktat.common.config.rules.kotlinVersion import org.junit.jupiter.api.Test class ConfigReaderTest { @@ -16,7 +16,7 @@ class ConfigReaderTest { assert(rulesConfigList.any { it.name == "CLASS_NAME_INCORRECT" && it.enabled }) assert(rulesConfigList.find { it.name == "CLASS_NAME_INCORRECT" }?.configuration == emptyMap()) assert(rulesConfigList.find { it.name == "DIKTAT_COMMON" } - ?.configuration?.get("domainName") == "org.cqfn.diktat") + ?.configuration?.get("domainName") == "com.saveourtool.diktat") } @Test diff --git a/diktat-common/src/test/resources/test-rules-config.yml b/diktat-common/src/test/resources/test-rules-config.yml index 7ae20b78b7..cca805e923 100644 --- a/diktat-common/src/test/resources/test-rules-config.yml +++ b/diktat-common/src/test/resources/test-rules-config.yml @@ -1,7 +1,7 @@ - name: DIKTAT_COMMON enabled: true configuration: - domainName: org.cqfn.diktat + domainName: com.saveourtool.diktat kotlinVersion: 1.4.21 testDirs: "test, androidUnitTest" - name: CLASS_NAME_INCORRECT @@ -109,7 +109,7 @@ - name: FILE_WILDCARD_IMPORTS enabled: true configuration: - allowedWildcards: "" # Allowed wildcards for imports (e.g. "import org.cqfn.diktat.*, import org.jetbrains.kotlin.*") + allowedWildcards: "" # Allowed wildcards for imports (e.g. "import com.saveourtool.diktat.*, import org.jetbrains.kotlin.*") useRecommendedImportsOrder: true - name: NO_BRACES_IN_CONDITIONALS_AND_LOOPS enabled: true diff --git a/diktat-dev-ksp/build.gradle.kts b/diktat-dev-ksp/build.gradle.kts index db36e832ae..a7582d0519 100644 --- a/diktat-dev-ksp/build.gradle.kts +++ b/diktat-dev-ksp/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") } dependencies { diff --git a/diktat-dev-ksp/src/main/kotlin/org/cqfn/diktat/ruleset/generation/EnumNames.kt b/diktat-dev-ksp/src/main/kotlin/com/saveourtool/diktat/ruleset/generation/EnumNames.kt similarity index 86% rename from diktat-dev-ksp/src/main/kotlin/org/cqfn/diktat/ruleset/generation/EnumNames.kt rename to diktat-dev-ksp/src/main/kotlin/com/saveourtool/diktat/ruleset/generation/EnumNames.kt index 001065646e..66e7f0a245 100644 --- a/diktat-dev-ksp/src/main/kotlin/org/cqfn/diktat/ruleset/generation/EnumNames.kt +++ b/diktat-dev-ksp/src/main/kotlin/com/saveourtool/diktat/ruleset/generation/EnumNames.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.generation +package com.saveourtool.diktat.ruleset.generation /** * Annotation that marks to generate an object with names from Enum diff --git a/diktat-dev-ksp/src/main/kotlin/org/cqfn/diktat/ruleset/generation/EnumNamesSymbolProcessor.kt b/diktat-dev-ksp/src/main/kotlin/com/saveourtool/diktat/ruleset/generation/EnumNamesSymbolProcessor.kt similarity index 98% rename from diktat-dev-ksp/src/main/kotlin/org/cqfn/diktat/ruleset/generation/EnumNamesSymbolProcessor.kt rename to diktat-dev-ksp/src/main/kotlin/com/saveourtool/diktat/ruleset/generation/EnumNamesSymbolProcessor.kt index 824928d8a2..5ed5e7bd0e 100644 --- a/diktat-dev-ksp/src/main/kotlin/org/cqfn/diktat/ruleset/generation/EnumNamesSymbolProcessor.kt +++ b/diktat-dev-ksp/src/main/kotlin/com/saveourtool/diktat/ruleset/generation/EnumNamesSymbolProcessor.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.generation +package com.saveourtool.diktat.ruleset.generation import com.google.devtools.ksp.processing.CodeGenerator import com.google.devtools.ksp.processing.Dependencies diff --git a/diktat-dev-ksp/src/main/kotlin/org/cqfn/diktat/ruleset/generation/EnumNamesSymbolProcessorProvider.kt b/diktat-dev-ksp/src/main/kotlin/com/saveourtool/diktat/ruleset/generation/EnumNamesSymbolProcessorProvider.kt similarity index 91% rename from diktat-dev-ksp/src/main/kotlin/org/cqfn/diktat/ruleset/generation/EnumNamesSymbolProcessorProvider.kt rename to diktat-dev-ksp/src/main/kotlin/com/saveourtool/diktat/ruleset/generation/EnumNamesSymbolProcessorProvider.kt index 8deb6eb7dd..dd97bee244 100644 --- a/diktat-dev-ksp/src/main/kotlin/org/cqfn/diktat/ruleset/generation/EnumNamesSymbolProcessorProvider.kt +++ b/diktat-dev-ksp/src/main/kotlin/com/saveourtool/diktat/ruleset/generation/EnumNamesSymbolProcessorProvider.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.generation +package com.saveourtool.diktat.ruleset.generation import com.google.devtools.ksp.processing.SymbolProcessor import com.google.devtools.ksp.processing.SymbolProcessorEnvironment diff --git a/diktat-dev-ksp/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider b/diktat-dev-ksp/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider index f1006ef2dd..4228f8646c 100644 --- a/diktat-dev-ksp/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider +++ b/diktat-dev-ksp/src/main/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider @@ -1 +1 @@ -org.cqfn.diktat.ruleset.generation.EnumNamesSymbolProcessorProvider +com.saveourtool.diktat.ruleset.generation.EnumNamesSymbolProcessorProvider diff --git a/diktat-gradle-plugin/build.gradle.kts b/diktat-gradle-plugin/build.gradle.kts index b54a7ca102..ccef0c6b54 100644 --- a/diktat-gradle-plugin/build.gradle.kts +++ b/diktat-gradle-plugin/build.gradle.kts @@ -1,10 +1,10 @@ -import org.cqfn.diktat.buildutils.configureSigning +import com.saveourtool.diktat.buildutils.configureSigning import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentOperatingSystem import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") id("pl.droidsonroids.jacoco.testkit") version "1.0.12" id("org.gradle.test-retry") version "1.5.3" id("com.gradle.plugin-publish") version "1.2.0" @@ -39,8 +39,8 @@ tasks.withType { gradlePlugin { plugins { create("diktatPlugin") { - id = "org.cqfn.diktat.diktat-gradle-plugin" - implementationClass = "org.cqfn.diktat.plugin.gradle.DiktatGradlePlugin" + id = "com.saveourtool.diktat.diktat-gradle-plugin" + implementationClass = "com.saveourtool.diktat.plugin.gradle.DiktatGradlePlugin" } } } diff --git a/diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginFunctionalTest.kt b/diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginFunctionalTest.kt similarity index 97% rename from diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginFunctionalTest.kt rename to diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginFunctionalTest.kt index 1d6f19d9f5..5e535faf84 100644 --- a/diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginFunctionalTest.kt +++ b/diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginFunctionalTest.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle -import org.cqfn.diktat.plugin.gradle.DiktatGradlePlugin.Companion.DIKTAT_CHECK_TASK +import com.saveourtool.diktat.plugin.gradle.DiktatGradlePlugin.Companion.DIKTAT_CHECK_TASK import org.gradle.buildinit.plugins.internal.modifiers.BuildInitDsl import org.gradle.internal.impldep.org.junit.rules.TemporaryFolder import org.gradle.testkit.runner.TaskOutcome diff --git a/diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginGroovyFunctionalTest.kt b/diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginGroovyFunctionalTest.kt similarity index 97% rename from diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginGroovyFunctionalTest.kt rename to diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginGroovyFunctionalTest.kt index d883729d26..a945d9ce7d 100644 --- a/diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginGroovyFunctionalTest.kt +++ b/diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginGroovyFunctionalTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle import org.gradle.buildinit.plugins.internal.modifiers.BuildInitDsl import org.gradle.internal.impldep.org.junit.rules.TemporaryFolder diff --git a/diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginMultiprojectFunctionalTest.kt b/diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginMultiprojectFunctionalTest.kt similarity index 96% rename from diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginMultiprojectFunctionalTest.kt rename to diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginMultiprojectFunctionalTest.kt index 610bbf1ed5..b5a0780dd4 100644 --- a/diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginMultiprojectFunctionalTest.kt +++ b/diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginMultiprojectFunctionalTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle import org.gradle.buildinit.plugins.internal.modifiers.BuildInitDsl import org.gradle.internal.impldep.org.junit.rules.TemporaryFolder diff --git a/diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/Utils.kt b/diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/Utils.kt similarity index 96% rename from diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/Utils.kt rename to diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/Utils.kt index 76db1c642d..e848fceb4f 100644 --- a/diktat-gradle-plugin/src/functionalTest/kotlin/org/cqfn/diktat/plugin/gradle/Utils.kt +++ b/diktat-gradle-plugin/src/functionalTest/kotlin/com/saveourtool/diktat/plugin/gradle/Utils.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle import org.gradle.buildinit.plugins.internal.modifiers.BuildInitDsl import org.gradle.internal.impldep.org.junit.rules.TemporaryFolder @@ -21,7 +21,7 @@ internal fun createExampleProject(testProjectDir: TemporaryFolder, testProjectDir.newFile(buildFileName).writeText( """ plugins { - id("org.cqfn.diktat.diktat-gradle-plugin") + id("com.saveourtool.diktat.diktat-gradle-plugin") } repositories { diff --git a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/DiktatExtension.kt b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatExtension.kt similarity index 97% rename from diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/DiktatExtension.kt rename to diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatExtension.kt index e25eb42468..e8ba234a88 100644 --- a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/DiktatExtension.kt +++ b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatExtension.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle import org.gradle.api.tasks.InputFile import org.gradle.api.tasks.PathSensitive diff --git a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePlugin.kt b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePlugin.kt similarity index 84% rename from diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePlugin.kt rename to diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePlugin.kt index 7980e01e92..8ed30418fe 100644 --- a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePlugin.kt +++ b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePlugin.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle -import org.cqfn.diktat.plugin.gradle.tasks.DiktatCheckTask.Companion.registerDiktatCheckTask -import org.cqfn.diktat.plugin.gradle.tasks.DiktatFixTask.Companion.registerDiktatFixTask -import org.cqfn.diktat.plugin.gradle.tasks.configureMergeReportsTask +import com.saveourtool.diktat.plugin.gradle.tasks.DiktatCheckTask.Companion.registerDiktatCheckTask +import com.saveourtool.diktat.plugin.gradle.tasks.DiktatFixTask.Companion.registerDiktatFixTask +import com.saveourtool.diktat.plugin.gradle.tasks.configureMergeReportsTask import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.tasks.util.PatternSet diff --git a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt similarity index 82% rename from diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt rename to diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt index aca13fb5b8..25d1093126 100644 --- a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt +++ b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle import org.gradle.api.Task diff --git a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/Utils.kt b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/Utils.kt similarity index 98% rename from diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/Utils.kt rename to diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/Utils.kt index ab84448c43..48ce4df9fd 100644 --- a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/Utils.kt +++ b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/Utils.kt @@ -4,7 +4,7 @@ @file:Suppress("FILE_NAME_MATCH_CLASS", "MatchingDeclarationName") -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle import groovy.lang.Closure import org.gradle.api.Project diff --git a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/DiktatCheckTask.kt b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/DiktatCheckTask.kt similarity index 80% rename from diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/DiktatCheckTask.kt rename to diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/DiktatCheckTask.kt index 749a0dc832..6f656825a8 100644 --- a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/DiktatCheckTask.kt +++ b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/DiktatCheckTask.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.plugin.gradle.tasks +package com.saveourtool.diktat.plugin.gradle.tasks -import org.cqfn.diktat.DiktatRunner -import org.cqfn.diktat.DiktatRunnerArguments -import org.cqfn.diktat.plugin.gradle.DiktatExtension -import org.cqfn.diktat.plugin.gradle.DiktatGradlePlugin +import com.saveourtool.diktat.DiktatRunner +import com.saveourtool.diktat.DiktatRunnerArguments +import com.saveourtool.diktat.plugin.gradle.DiktatExtension +import com.saveourtool.diktat.plugin.gradle.DiktatGradlePlugin import org.gradle.api.Project import org.gradle.api.tasks.TaskProvider import org.gradle.api.tasks.util.PatternFilterable diff --git a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/DiktatFixTask.kt b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/DiktatFixTask.kt similarity index 82% rename from diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/DiktatFixTask.kt rename to diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/DiktatFixTask.kt index 5801712006..0e7fdc4e4e 100644 --- a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/DiktatFixTask.kt +++ b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/DiktatFixTask.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.plugin.gradle.tasks +package com.saveourtool.diktat.plugin.gradle.tasks -import org.cqfn.diktat.DiktatRunner -import org.cqfn.diktat.DiktatRunnerArguments -import org.cqfn.diktat.plugin.gradle.DiktatExtension -import org.cqfn.diktat.plugin.gradle.DiktatGradlePlugin +import com.saveourtool.diktat.DiktatRunner +import com.saveourtool.diktat.DiktatRunnerArguments +import com.saveourtool.diktat.plugin.gradle.DiktatExtension +import com.saveourtool.diktat.plugin.gradle.DiktatGradlePlugin import org.gradle.api.Project import org.gradle.api.tasks.TaskProvider import org.gradle.api.tasks.util.PatternFilterable diff --git a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/DiktatTaskBase.kt b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/DiktatTaskBase.kt similarity index 85% rename from diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/DiktatTaskBase.kt rename to diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/DiktatTaskBase.kt index acba224986..16e6a7a716 100644 --- a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/DiktatTaskBase.kt +++ b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/DiktatTaskBase.kt @@ -1,16 +1,16 @@ -package org.cqfn.diktat.plugin.gradle.tasks +package com.saveourtool.diktat.plugin.gradle.tasks -import org.cqfn.diktat.DiktatRunner -import org.cqfn.diktat.DiktatRunnerArguments -import org.cqfn.diktat.DiktatRunnerFactory -import org.cqfn.diktat.api.DiktatProcessorListener -import org.cqfn.diktat.ktlint.DiktatBaselineFactoryImpl -import org.cqfn.diktat.ktlint.DiktatProcessorFactoryImpl -import org.cqfn.diktat.ktlint.DiktatReporterFactoryImpl -import org.cqfn.diktat.plugin.gradle.DiktatExtension -import org.cqfn.diktat.plugin.gradle.getOutputFile -import org.cqfn.diktat.plugin.gradle.getReporterType -import org.cqfn.diktat.ruleset.rules.DiktatRuleSetFactoryImpl +import com.saveourtool.diktat.DiktatRunner +import com.saveourtool.diktat.DiktatRunnerArguments +import com.saveourtool.diktat.DiktatRunnerFactory +import com.saveourtool.diktat.api.DiktatProcessorListener +import com.saveourtool.diktat.ktlint.DiktatBaselineFactoryImpl +import com.saveourtool.diktat.ktlint.DiktatProcessorFactoryImpl +import com.saveourtool.diktat.ktlint.DiktatReporterFactoryImpl +import com.saveourtool.diktat.plugin.gradle.DiktatExtension +import com.saveourtool.diktat.plugin.gradle.getOutputFile +import com.saveourtool.diktat.plugin.gradle.getReporterType +import com.saveourtool.diktat.ruleset.rules.DiktatRuleSetFactoryImpl import generated.DIKTAT_VERSION import generated.KTLINT_VERSION @@ -37,7 +37,7 @@ import java.nio.file.Path abstract class DiktatTaskBase( @get:Internal internal val extension: DiktatExtension, private val inputs: PatternFilterable -) : DefaultTask(), VerificationTask, org.cqfn.diktat.plugin.gradle.DiktatJavaExecTaskBase { +) : DefaultTask(), VerificationTask, com.saveourtool.diktat.plugin.gradle.DiktatJavaExecTaskBase { /** * Files that will be analyzed by diktat */ diff --git a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/SarifReportMergeTask.kt b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/SarifReportMergeTask.kt similarity index 90% rename from diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/SarifReportMergeTask.kt rename to diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/SarifReportMergeTask.kt index eafaf09f84..1d5cc09fb5 100644 --- a/diktat-gradle-plugin/src/main/kotlin/org/cqfn/diktat/plugin/gradle/tasks/SarifReportMergeTask.kt +++ b/diktat-gradle-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/gradle/tasks/SarifReportMergeTask.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.plugin.gradle.tasks +package com.saveourtool.diktat.plugin.gradle.tasks -import org.cqfn.diktat.plugin.gradle.DiktatExtension -import org.cqfn.diktat.plugin.gradle.DiktatGradlePlugin.Companion.MERGE_SARIF_REPORTS_TASK_NAME -import org.cqfn.diktat.plugin.gradle.getOutputFile -import org.cqfn.diktat.plugin.gradle.getReporterType -import org.cqfn.diktat.plugin.gradle.isSarifReporterActive +import com.saveourtool.diktat.plugin.gradle.DiktatExtension +import com.saveourtool.diktat.plugin.gradle.DiktatGradlePlugin.Companion.MERGE_SARIF_REPORTS_TASK_NAME +import com.saveourtool.diktat.plugin.gradle.getOutputFile +import com.saveourtool.diktat.plugin.gradle.getReporterType +import com.saveourtool.diktat.plugin.gradle.isSarifReporterActive import io.github.detekt.sarif4k.SarifSchema210 import org.gradle.api.DefaultTask diff --git a/diktat-gradle-plugin/src/test/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginTest.kt b/diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginTest.kt similarity index 93% rename from diktat-gradle-plugin/src/test/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginTest.kt rename to diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginTest.kt index 08b92ebf7b..18c9f2a46a 100644 --- a/diktat-gradle-plugin/src/test/kotlin/org/cqfn/diktat/plugin/gradle/DiktatGradlePluginTest.kt +++ b/diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatGradlePluginTest.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle -import org.cqfn.diktat.plugin.gradle.tasks.DiktatCheckTask +import com.saveourtool.diktat.plugin.gradle.tasks.DiktatCheckTask import org.gradle.api.Project import org.gradle.testfixtures.ProjectBuilder import org.junit.jupiter.api.Assertions diff --git a/diktat-gradle-plugin/src/test/kotlin/org/cqfn/diktat/plugin/gradle/DiktatJavaExecTaskTest.kt b/diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatJavaExecTaskTest.kt similarity index 98% rename from diktat-gradle-plugin/src/test/kotlin/org/cqfn/diktat/plugin/gradle/DiktatJavaExecTaskTest.kt rename to diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatJavaExecTaskTest.kt index d8a3f087e1..a483efc615 100644 --- a/diktat-gradle-plugin/src/test/kotlin/org/cqfn/diktat/plugin/gradle/DiktatJavaExecTaskTest.kt +++ b/diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/DiktatJavaExecTaskTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle -import org.cqfn.diktat.ktlint.DiktatReporterImpl.Companion.unwrap -import org.cqfn.diktat.plugin.gradle.tasks.DiktatCheckTask +import com.saveourtool.diktat.ktlint.DiktatReporterImpl.Companion.unwrap +import com.saveourtool.diktat.plugin.gradle.tasks.DiktatCheckTask import com.pinterest.ktlint.cli.reporter.json.JsonReporter import com.pinterest.ktlint.cli.reporter.plain.PlainReporter import com.pinterest.ktlint.cli.reporter.sarif.SarifReporter diff --git a/diktat-gradle-plugin/src/test/kotlin/org/cqfn/diktat/plugin/gradle/ReporterSelectionTest.kt b/diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/ReporterSelectionTest.kt similarity index 95% rename from diktat-gradle-plugin/src/test/kotlin/org/cqfn/diktat/plugin/gradle/ReporterSelectionTest.kt rename to diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/ReporterSelectionTest.kt index b0f65c0ec0..3d9d9e71d4 100644 --- a/diktat-gradle-plugin/src/test/kotlin/org/cqfn/diktat/plugin/gradle/ReporterSelectionTest.kt +++ b/diktat-gradle-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/gradle/ReporterSelectionTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.plugin.gradle +package com.saveourtool.diktat.plugin.gradle import org.gradle.api.Project import org.gradle.api.tasks.util.PatternSet diff --git a/diktat-ktlint-engine/build.gradle.kts b/diktat-ktlint-engine/build.gradle.kts index 6aa53bf2ac..fbf4d7d870 100644 --- a/diktat-ktlint-engine/build.gradle.kts +++ b/diktat-ktlint-engine/build.gradle.kts @@ -1,9 +1,9 @@ import org.gradle.accessors.dm.LibrariesForLibs plugins { - id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") - id("org.cqfn.diktat.buildutils.publishing-signing-default-configuration") + id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.publishing-signing-default-configuration") } project.description = "This module builds diktat-api implementation using ktlint" diff --git a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatBaselineFactoryImpl.kt b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatBaselineFactoryImpl.kt similarity index 77% rename from diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatBaselineFactoryImpl.kt rename to diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatBaselineFactoryImpl.kt index e7d33321fd..75cfff3781 100644 --- a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatBaselineFactoryImpl.kt +++ b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatBaselineFactoryImpl.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ktlint +package com.saveourtool.diktat.ktlint -import org.cqfn.diktat.api.DiktatBaseline -import org.cqfn.diktat.api.DiktatBaselineFactory -import org.cqfn.diktat.api.DiktatProcessorListener -import org.cqfn.diktat.api.DiktatProcessorListener.Companion.closeAfterAllAsProcessorListener -import org.cqfn.diktat.ktlint.DiktatReporterImpl.Companion.wrap +import com.saveourtool.diktat.api.DiktatBaseline +import com.saveourtool.diktat.api.DiktatBaselineFactory +import com.saveourtool.diktat.api.DiktatProcessorListener +import com.saveourtool.diktat.api.DiktatProcessorListener.Companion.closeAfterAllAsProcessorListener +import com.saveourtool.diktat.ktlint.DiktatReporterImpl.Companion.wrap import com.pinterest.ktlint.cli.reporter.baseline.Baseline import com.pinterest.ktlint.cli.reporter.baseline.BaselineReporter diff --git a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatProcessorFactoryImpl.kt b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatProcessorFactoryImpl.kt similarity index 87% rename from diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatProcessorFactoryImpl.kt rename to diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatProcessorFactoryImpl.kt index 9f237b3947..4fc919b7ac 100644 --- a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatProcessorFactoryImpl.kt +++ b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatProcessorFactoryImpl.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ktlint +package com.saveourtool.diktat.ktlint -import org.cqfn.diktat.DiktatProcessor -import org.cqfn.diktat.DiktatProcessorFactory -import org.cqfn.diktat.api.DiktatCallback -import org.cqfn.diktat.api.DiktatRuleSet -import org.cqfn.diktat.ktlint.KtLintRuleWrapper.Companion.toKtLint +import com.saveourtool.diktat.DiktatProcessor +import com.saveourtool.diktat.DiktatProcessorFactory +import com.saveourtool.diktat.api.DiktatCallback +import com.saveourtool.diktat.api.DiktatRuleSet +import com.saveourtool.diktat.ktlint.KtLintRuleWrapper.Companion.toKtLint import com.pinterest.ktlint.rule.engine.api.Code import com.pinterest.ktlint.rule.engine.api.KtLintRuleEngine import com.pinterest.ktlint.rule.engine.api.LintError diff --git a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatReporterFactoryImpl.kt b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatReporterFactoryImpl.kt similarity index 92% rename from diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatReporterFactoryImpl.kt rename to diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatReporterFactoryImpl.kt index 5ed4e141d4..2469fdbd51 100644 --- a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatReporterFactoryImpl.kt +++ b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatReporterFactoryImpl.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.ktlint +package com.saveourtool.diktat.ktlint -import org.cqfn.diktat.api.DiktatReporter -import org.cqfn.diktat.api.DiktatReporterFactory -import org.cqfn.diktat.ktlint.DiktatReporterImpl.Companion.wrap +import com.saveourtool.diktat.api.DiktatReporter +import com.saveourtool.diktat.api.DiktatReporterFactory +import com.saveourtool.diktat.ktlint.DiktatReporterImpl.Companion.wrap import com.pinterest.ktlint.cli.reporter.checkstyle.CheckStyleReporterProvider import com.pinterest.ktlint.cli.reporter.html.HtmlReporterProvider import com.pinterest.ktlint.cli.reporter.json.JsonReporterProvider diff --git a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatReporterImpl.kt b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatReporterImpl.kt similarity index 91% rename from diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatReporterImpl.kt rename to diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatReporterImpl.kt index eba6905830..e891266f19 100644 --- a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/DiktatReporterImpl.kt +++ b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/DiktatReporterImpl.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ktlint +package com.saveourtool.diktat.ktlint -import org.cqfn.diktat.api.DiktatError -import org.cqfn.diktat.api.DiktatReporter +import com.saveourtool.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatReporter import com.pinterest.ktlint.cli.reporter.core.api.ReporterV2 import java.nio.file.Path diff --git a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/KtLintRuleWrapper.kt b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/KtLintRuleWrapper.kt similarity index 93% rename from diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/KtLintRuleWrapper.kt rename to diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/KtLintRuleWrapper.kt index 2f4560e334..6ab1e39fe2 100644 --- a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/KtLintRuleWrapper.kt +++ b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/KtLintRuleWrapper.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.ktlint +package com.saveourtool.diktat.ktlint -import org.cqfn.diktat.api.DiktatRule -import org.cqfn.diktat.api.DiktatRuleSet -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.api.DiktatRule +import com.saveourtool.diktat.api.DiktatRuleSet +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID import com.pinterest.ktlint.rule.engine.core.api.Rule import com.pinterest.ktlint.rule.engine.core.api.Rule.VisitorModifier.RunAfterRule.Mode import com.pinterest.ktlint.rule.engine.core.api.RuleId diff --git a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/KtLintUtils.kt b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/KtLintUtils.kt similarity index 94% rename from diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/KtLintUtils.kt rename to diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/KtLintUtils.kt index 926c28e2c5..b71753324f 100644 --- a/diktat-ktlint-engine/src/main/kotlin/org/cqfn/diktat/ktlint/KtLintUtils.kt +++ b/diktat-ktlint-engine/src/main/kotlin/com/saveourtool/diktat/ktlint/KtLintUtils.kt @@ -2,12 +2,12 @@ * This file contains util methods for __KtLint__ */ -package org.cqfn.diktat.ktlint +package com.saveourtool.diktat.ktlint -import org.cqfn.diktat.api.DiktatCallback -import org.cqfn.diktat.api.DiktatError -import org.cqfn.diktat.api.DiktatRuleSet -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.api.DiktatCallback +import com.saveourtool.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatRuleSet +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID import com.pinterest.ktlint.cli.reporter.core.api.KtlintCliError import com.pinterest.ktlint.rule.engine.api.LintError diff --git a/diktat-ktlint-engine/src/test/kotlin/org/cqfn/diktat/ktlint/KtLintRuleWrapperTest.kt b/diktat-ktlint-engine/src/test/kotlin/com/saveourtool/diktat/ktlint/KtLintRuleWrapperTest.kt similarity index 93% rename from diktat-ktlint-engine/src/test/kotlin/org/cqfn/diktat/ktlint/KtLintRuleWrapperTest.kt rename to diktat-ktlint-engine/src/test/kotlin/com/saveourtool/diktat/ktlint/KtLintRuleWrapperTest.kt index a7bb79a772..349e097926 100644 --- a/diktat-ktlint-engine/src/test/kotlin/org/cqfn/diktat/ktlint/KtLintRuleWrapperTest.kt +++ b/diktat-ktlint-engine/src/test/kotlin/com/saveourtool/diktat/ktlint/KtLintRuleWrapperTest.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ktlint +package com.saveourtool.diktat.ktlint -import org.cqfn.diktat.api.DiktatErrorEmitter -import org.cqfn.diktat.api.DiktatRule -import org.cqfn.diktat.api.DiktatRuleSet -import org.cqfn.diktat.ktlint.KtLintRuleWrapper.Companion.toKtLint -import org.cqfn.diktat.ktlint.KtLintRuleWrapper.Companion.unwrap +import com.saveourtool.diktat.api.DiktatErrorEmitter +import com.saveourtool.diktat.api.DiktatRule +import com.saveourtool.diktat.api.DiktatRuleSet +import com.saveourtool.diktat.ktlint.KtLintRuleWrapper.Companion.toKtLint +import com.saveourtool.diktat.ktlint.KtLintRuleWrapper.Companion.unwrap import com.pinterest.ktlint.rule.engine.api.Code import com.pinterest.ktlint.rule.engine.api.KtLintRuleEngine import com.pinterest.ktlint.rule.engine.core.api.Rule diff --git a/diktat-maven-plugin/build.gradle.kts b/diktat-maven-plugin/build.gradle.kts index e3611668bb..05ace85be0 100644 --- a/diktat-maven-plugin/build.gradle.kts +++ b/diktat-maven-plugin/build.gradle.kts @@ -2,9 +2,9 @@ import de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTa import de.benediktritter.maven.plugin.development.task.GenerateMavenPluginDescriptorTask plugins { - id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") - id("org.cqfn.diktat.buildutils.publishing-configuration") + id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.publishing-configuration") id("de.benediktritter.maven-plugin-development") version "0.4.2" `maven-publish` } diff --git a/diktat-maven-plugin/src/main/kotlin/org/cqfn/diktat/plugin/maven/DiktatBaseMojo.kt b/diktat-maven-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/maven/DiktatBaseMojo.kt similarity index 92% rename from diktat-maven-plugin/src/main/kotlin/org/cqfn/diktat/plugin/maven/DiktatBaseMojo.kt rename to diktat-maven-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/maven/DiktatBaseMojo.kt index f7c125603d..9d60b43693 100644 --- a/diktat-maven-plugin/src/main/kotlin/org/cqfn/diktat/plugin/maven/DiktatBaseMojo.kt +++ b/diktat-maven-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/maven/DiktatBaseMojo.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.plugin.maven - -import org.cqfn.diktat.DiktatRunner -import org.cqfn.diktat.DiktatRunnerArguments -import org.cqfn.diktat.DiktatRunnerFactory -import org.cqfn.diktat.ktlint.DiktatBaselineFactoryImpl -import org.cqfn.diktat.ktlint.DiktatProcessorFactoryImpl -import org.cqfn.diktat.ktlint.DiktatReporterFactoryImpl -import org.cqfn.diktat.ruleset.rules.DiktatRuleSetFactoryImpl +package com.saveourtool.diktat.plugin.maven + +import com.saveourtool.diktat.DiktatRunner +import com.saveourtool.diktat.DiktatRunnerArguments +import com.saveourtool.diktat.DiktatRunnerFactory +import com.saveourtool.diktat.ktlint.DiktatBaselineFactoryImpl +import com.saveourtool.diktat.ktlint.DiktatProcessorFactoryImpl +import com.saveourtool.diktat.ktlint.DiktatReporterFactoryImpl +import com.saveourtool.diktat.ruleset.rules.DiktatRuleSetFactoryImpl import org.apache.maven.plugin.AbstractMojo import org.apache.maven.plugin.Mojo diff --git a/diktat-maven-plugin/src/main/kotlin/org/cqfn/diktat/plugin/maven/DiktatMojo.kt b/diktat-maven-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/maven/DiktatMojo.kt similarity index 80% rename from diktat-maven-plugin/src/main/kotlin/org/cqfn/diktat/plugin/maven/DiktatMojo.kt rename to diktat-maven-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/maven/DiktatMojo.kt index 57472711b2..4770113af6 100644 --- a/diktat-maven-plugin/src/main/kotlin/org/cqfn/diktat/plugin/maven/DiktatMojo.kt +++ b/diktat-maven-plugin/src/main/kotlin/com/saveourtool/diktat/plugin/maven/DiktatMojo.kt @@ -2,11 +2,11 @@ * MOJOs for goals of diktat plugin */ -package org.cqfn.diktat.plugin.maven +package com.saveourtool.diktat.plugin.maven -import org.cqfn.diktat.DiktatRunner -import org.cqfn.diktat.DiktatRunnerArguments -import org.cqfn.diktat.ruleset.rules.DiktatRuleSetProvider +import com.saveourtool.diktat.DiktatRunner +import com.saveourtool.diktat.DiktatRunnerArguments +import com.saveourtool.diktat.ruleset.rules.DiktatRuleSetProvider import org.apache.maven.plugins.annotations.Mojo diff --git a/diktat-maven-plugin/src/test/kotlin/org/cqfn/diktat/plugin/maven/DiktatBaseMojoTest.kt b/diktat-maven-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/maven/DiktatBaseMojoTest.kt similarity index 94% rename from diktat-maven-plugin/src/test/kotlin/org/cqfn/diktat/plugin/maven/DiktatBaseMojoTest.kt rename to diktat-maven-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/maven/DiktatBaseMojoTest.kt index 48d6c8f680..20d2e89506 100644 --- a/diktat-maven-plugin/src/test/kotlin/org/cqfn/diktat/plugin/maven/DiktatBaseMojoTest.kt +++ b/diktat-maven-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/maven/DiktatBaseMojoTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.plugin.maven +package com.saveourtool.diktat.plugin.maven import org.apache.maven.execution.DefaultMavenExecutionRequest import org.apache.maven.plugin.MojoExecutionException @@ -47,14 +47,14 @@ class DiktatBaseMojoTest { xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.cqfn.diktat + com.saveourtool.diktat diktat-test 1.0.0-SNAPSHOT - org.cqfn.diktat + com.saveourtool.diktat diktat-maven-plugin @@ -87,14 +87,14 @@ class DiktatBaseMojoTest { xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.cqfn.diktat + com.saveourtool.diktat diktat-test 1.0.0-SNAPSHOT - org.cqfn.diktat + com.saveourtool.diktat diktat-maven-plugin my-diktat-config.yml diff --git a/diktat-maven-plugin/src/test/kotlin/org/cqfn/diktat/plugin/maven/DiktatMavenPluginIntegrationTest.kt b/diktat-maven-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/maven/DiktatMavenPluginIntegrationTest.kt similarity index 98% rename from diktat-maven-plugin/src/test/kotlin/org/cqfn/diktat/plugin/maven/DiktatMavenPluginIntegrationTest.kt rename to diktat-maven-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/maven/DiktatMavenPluginIntegrationTest.kt index 95d8e6f5d1..936ff62f19 100644 --- a/diktat-maven-plugin/src/test/kotlin/org/cqfn/diktat/plugin/maven/DiktatMavenPluginIntegrationTest.kt +++ b/diktat-maven-plugin/src/test/kotlin/com/saveourtool/diktat/plugin/maven/DiktatMavenPluginIntegrationTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.plugin.maven +package com.saveourtool.diktat.plugin.maven import com.soebes.itf.jupiter.extension.MavenGoal import com.soebes.itf.jupiter.extension.MavenJupiterExtension diff --git a/diktat-maven-plugin/src/test/resources/.mvn/jvm.config b/diktat-maven-plugin/src/test/resources/.mvn/jvm.config index 93a8262a0c..87e6332962 100644 --- a/diktat-maven-plugin/src/test/resources/.mvn/jvm.config +++ b/diktat-maven-plugin/src/test/resources/.mvn/jvm.config @@ -1 +1 @@ --javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=target/jacoco-it.exec,includes=org.cqfn.diktat.plugin.maven.* \ No newline at end of file +-javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=target/jacoco-it.exec,includes=com.saveourtool.diktat.plugin.maven.* diff --git a/diktat-rules/build.gradle.kts b/diktat-rules/build.gradle.kts index 88461631ec..02d3accc38 100644 --- a/diktat-rules/build.gradle.kts +++ b/diktat-rules/build.gradle.kts @@ -1,8 +1,8 @@ @Suppress("DSL_SCOPE_VIOLATION", "RUN_IN_SCRIPT") // https://github.com/gradle/gradle/issues/22797 plugins { - id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") - id("org.cqfn.diktat.buildutils.publishing-signing-default-configuration") + id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.publishing-signing-default-configuration") alias(libs.plugins.kotlin.ksp) idea } diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Chapters.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/constants/Chapters.kt similarity index 88% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Chapters.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/constants/Chapters.kt index 5833a29043..6349f132ca 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Chapters.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/constants/Chapters.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.ruleset.constants +package com.saveourtool.diktat.ruleset.constants -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getCommonConfiguration -import org.cqfn.diktat.ruleset.utils.isDigits +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getCommonConfiguration +import com.saveourtool.diktat.ruleset.utils.isDigits import org.jetbrains.kotlin.org.jline.utils.Levenshtein /** diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/constants/Warnings.kt similarity index 97% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/constants/Warnings.kt index 56c54147e6..e7ffb0228a 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/constants/Warnings.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/constants/Warnings.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.constants +package com.saveourtool.diktat.ruleset.constants -import org.cqfn.diktat.common.config.rules.Rule -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.isRuleEnabled -import org.cqfn.diktat.ruleset.generation.EnumNames -import org.cqfn.diktat.ruleset.utils.isSuppressed +import com.saveourtool.diktat.common.config.rules.Rule +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.isRuleEnabled +import com.saveourtool.diktat.ruleset.generation.EnumNames +import com.saveourtool.diktat.ruleset.utils.isSuppressed import org.jetbrains.kotlin.com.intellij.lang.ASTNode typealias EmitType = ((offset: Int, @@ -19,7 +19,7 @@ typealias ListOfPairs = MutableList> * This class represent individual inspections of diktat code style. * A [Warnings] entry contains rule name, warning message and is used in code check. * @property canBeAutoCorrected whether this inspection can automatically fix the code. Should be public to be able to use it in docs generator. - * @property ruleId number of the inspection according to []diktat code style](https://www.cqfn.org/diKTat/info/guide/diktat-coding-convention.html) + * @property ruleId number of the inspection according to [diktat code style](https://github.com/saveourtool/diktat/blob/master/info/guide/diktat-coding-convention.md) */ @Suppress( "ForbiddenComment", diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRule.kt similarity index 86% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRule.kt index 1fdfdff8ac..bc66dac9e7 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRule.kt @@ -1,15 +1,15 @@ -package org.cqfn.diktat.ruleset.rules +package com.saveourtool.diktat.ruleset.rules -import org.cqfn.diktat.api.DiktatErrorEmitter -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.isRuleEnabled -import org.cqfn.diktat.ruleset.utils.getFilePathSafely +import com.saveourtool.diktat.api.DiktatErrorEmitter +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.isRuleEnabled +import com.saveourtool.diktat.ruleset.utils.getFilePathSafely import mu.KotlinLogging import org.jetbrains.kotlin.com.intellij.lang.ASTNode -private typealias DiktatConfigRule = org.cqfn.diktat.common.config.rules.Rule -private typealias DiktatRuleApi = org.cqfn.diktat.api.DiktatRule +private typealias DiktatConfigRule = com.saveourtool.diktat.common.config.rules.Rule +private typealias DiktatRuleApi = com.saveourtool.diktat.api.DiktatRule /** * This is a wrapper around _KtLint_ `com.pinterest.ktlint.core.Rule`. diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetFactoryImpl.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRuleSetFactoryImpl.kt similarity index 67% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetFactoryImpl.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRuleSetFactoryImpl.kt index d4f04283ee..ce81d546b0 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetFactoryImpl.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRuleSetFactoryImpl.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.rules +package com.saveourtool.diktat.ruleset.rules -import org.cqfn.diktat.api.DiktatRuleSet -import org.cqfn.diktat.api.DiktatRuleSetFactory +import com.saveourtool.diktat.api.DiktatRuleSet +import com.saveourtool.diktat.api.DiktatRuleSetFactory /** * A default implementation of [DiktatRuleSetFactory] diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetProvider.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRuleSetProvider.kt similarity index 58% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetProvider.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRuleSetProvider.kt index de7dac4a29..a8db54c156 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetProvider.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRuleSetProvider.kt @@ -1,87 +1,87 @@ -package org.cqfn.diktat.ruleset.rules +package com.saveourtool.diktat.ruleset.rules -import org.cqfn.diktat.api.DiktatRuleSet -import org.cqfn.diktat.common.config.rules.DIKTAT_ANALYSIS_CONF -import org.cqfn.diktat.common.config.rules.DIKTAT_COMMON -import org.cqfn.diktat.common.config.rules.DIKTAT_CONF_PROPERTY -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.RulesConfigReader -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter1.FileNaming -import org.cqfn.diktat.ruleset.rules.chapter1.IdentifierNaming -import org.cqfn.diktat.ruleset.rules.chapter1.PackageNaming -import org.cqfn.diktat.ruleset.rules.chapter2.comments.CommentsRule -import org.cqfn.diktat.ruleset.rules.chapter2.comments.HeaderCommentRule -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.CommentsFormatting -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocComments -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocFormatting -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocMethods -import org.cqfn.diktat.ruleset.rules.chapter3.AnnotationNewLineRule -import org.cqfn.diktat.ruleset.rules.chapter3.BlockStructureBraces -import org.cqfn.diktat.ruleset.rules.chapter3.BooleanExpressionsRule -import org.cqfn.diktat.ruleset.rules.chapter3.BracesInConditionalsAndLoopsRule -import org.cqfn.diktat.ruleset.rules.chapter3.ClassLikeStructuresOrderRule -import org.cqfn.diktat.ruleset.rules.chapter3.CollapseIfStatementsRule -import org.cqfn.diktat.ruleset.rules.chapter3.ConsecutiveSpacesRule -import org.cqfn.diktat.ruleset.rules.chapter3.DebugPrintRule -import org.cqfn.diktat.ruleset.rules.chapter3.EmptyBlock -import org.cqfn.diktat.ruleset.rules.chapter3.EnumsSeparated -import org.cqfn.diktat.ruleset.rules.chapter3.LineLength -import org.cqfn.diktat.ruleset.rules.chapter3.LongNumericalValuesSeparatedRule -import org.cqfn.diktat.ruleset.rules.chapter3.MagicNumberRule -import org.cqfn.diktat.ruleset.rules.chapter3.MultipleModifiersSequence -import org.cqfn.diktat.ruleset.rules.chapter3.NullableTypeRule -import org.cqfn.diktat.ruleset.rules.chapter3.RangeConventionalRule -import org.cqfn.diktat.ruleset.rules.chapter3.SingleLineStatementsRule -import org.cqfn.diktat.ruleset.rules.chapter3.SortRule -import org.cqfn.diktat.ruleset.rules.chapter3.StringConcatenationRule -import org.cqfn.diktat.ruleset.rules.chapter3.StringTemplateFormatRule -import org.cqfn.diktat.ruleset.rules.chapter3.TrailingCommaRule -import org.cqfn.diktat.ruleset.rules.chapter3.WhenMustHaveElseRule -import org.cqfn.diktat.ruleset.rules.chapter3.files.BlankLinesRule -import org.cqfn.diktat.ruleset.rules.chapter3.files.FileSize -import org.cqfn.diktat.ruleset.rules.chapter3.files.FileStructureRule -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationRule -import org.cqfn.diktat.ruleset.rules.chapter3.files.NewlinesRule -import org.cqfn.diktat.ruleset.rules.chapter3.files.TopLevelOrderRule -import org.cqfn.diktat.ruleset.rules.chapter3.files.WhiteSpaceRule -import org.cqfn.diktat.ruleset.rules.chapter3.identifiers.LocalVariablesRule -import org.cqfn.diktat.ruleset.rules.chapter4.ImmutableValNoVarRule -import org.cqfn.diktat.ruleset.rules.chapter4.NullChecksRule -import org.cqfn.diktat.ruleset.rules.chapter4.SmartCastRule -import org.cqfn.diktat.ruleset.rules.chapter4.TypeAliasRule -import org.cqfn.diktat.ruleset.rules.chapter4.VariableGenericTypeDeclarationRule -import org.cqfn.diktat.ruleset.rules.chapter4.calculations.AccurateCalculationsRule -import org.cqfn.diktat.ruleset.rules.chapter5.AsyncAndSyncRule -import org.cqfn.diktat.ruleset.rules.chapter5.AvoidNestedFunctionsRule -import org.cqfn.diktat.ruleset.rules.chapter5.CheckInverseMethodRule -import org.cqfn.diktat.ruleset.rules.chapter5.CustomLabel -import org.cqfn.diktat.ruleset.rules.chapter5.FunctionArgumentsSize -import org.cqfn.diktat.ruleset.rules.chapter5.FunctionLength -import org.cqfn.diktat.ruleset.rules.chapter5.LambdaLengthRule -import org.cqfn.diktat.ruleset.rules.chapter5.LambdaParameterOrder -import org.cqfn.diktat.ruleset.rules.chapter5.NestedFunctionBlock -import org.cqfn.diktat.ruleset.rules.chapter5.OverloadingArgumentsFunction -import org.cqfn.diktat.ruleset.rules.chapter5.ParameterNameInOuterLambdaRule -import org.cqfn.diktat.ruleset.rules.chapter6.AvoidEmptyPrimaryConstructor -import org.cqfn.diktat.ruleset.rules.chapter6.AvoidUtilityClass -import org.cqfn.diktat.ruleset.rules.chapter6.CustomGetterSetterRule -import org.cqfn.diktat.ruleset.rules.chapter6.ExtensionFunctionsInFileRule -import org.cqfn.diktat.ruleset.rules.chapter6.ExtensionFunctionsSameNameRule -import org.cqfn.diktat.ruleset.rules.chapter6.ImplicitBackingPropertyRule -import org.cqfn.diktat.ruleset.rules.chapter6.PropertyAccessorFields -import org.cqfn.diktat.ruleset.rules.chapter6.RunInScript -import org.cqfn.diktat.ruleset.rules.chapter6.TrivialPropertyAccessors -import org.cqfn.diktat.ruleset.rules.chapter6.UseLastIndex -import org.cqfn.diktat.ruleset.rules.chapter6.UselessSupertype -import org.cqfn.diktat.ruleset.rules.chapter6.classes.AbstractClassesRule -import org.cqfn.diktat.ruleset.rules.chapter6.classes.CompactInitialization -import org.cqfn.diktat.ruleset.rules.chapter6.classes.DataClassesRule -import org.cqfn.diktat.ruleset.rules.chapter6.classes.InlineClassesRule -import org.cqfn.diktat.ruleset.rules.chapter6.classes.SingleConstructorRule -import org.cqfn.diktat.ruleset.rules.chapter6.classes.SingleInitRule -import org.cqfn.diktat.ruleset.rules.chapter6.classes.StatelessClassesRule +import com.saveourtool.diktat.api.DiktatRuleSet +import com.saveourtool.diktat.common.config.rules.DIKTAT_ANALYSIS_CONF +import com.saveourtool.diktat.common.config.rules.DIKTAT_COMMON +import com.saveourtool.diktat.common.config.rules.DIKTAT_CONF_PROPERTY +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.RulesConfigReader +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter1.FileNaming +import com.saveourtool.diktat.ruleset.rules.chapter1.IdentifierNaming +import com.saveourtool.diktat.ruleset.rules.chapter1.PackageNaming +import com.saveourtool.diktat.ruleset.rules.chapter2.comments.CommentsRule +import com.saveourtool.diktat.ruleset.rules.chapter2.comments.HeaderCommentRule +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.CommentsFormatting +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocComments +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocFormatting +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocMethods +import com.saveourtool.diktat.ruleset.rules.chapter3.AnnotationNewLineRule +import com.saveourtool.diktat.ruleset.rules.chapter3.BlockStructureBraces +import com.saveourtool.diktat.ruleset.rules.chapter3.BooleanExpressionsRule +import com.saveourtool.diktat.ruleset.rules.chapter3.BracesInConditionalsAndLoopsRule +import com.saveourtool.diktat.ruleset.rules.chapter3.ClassLikeStructuresOrderRule +import com.saveourtool.diktat.ruleset.rules.chapter3.CollapseIfStatementsRule +import com.saveourtool.diktat.ruleset.rules.chapter3.ConsecutiveSpacesRule +import com.saveourtool.diktat.ruleset.rules.chapter3.DebugPrintRule +import com.saveourtool.diktat.ruleset.rules.chapter3.EmptyBlock +import com.saveourtool.diktat.ruleset.rules.chapter3.EnumsSeparated +import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength +import com.saveourtool.diktat.ruleset.rules.chapter3.LongNumericalValuesSeparatedRule +import com.saveourtool.diktat.ruleset.rules.chapter3.MagicNumberRule +import com.saveourtool.diktat.ruleset.rules.chapter3.MultipleModifiersSequence +import com.saveourtool.diktat.ruleset.rules.chapter3.NullableTypeRule +import com.saveourtool.diktat.ruleset.rules.chapter3.RangeConventionalRule +import com.saveourtool.diktat.ruleset.rules.chapter3.SingleLineStatementsRule +import com.saveourtool.diktat.ruleset.rules.chapter3.SortRule +import com.saveourtool.diktat.ruleset.rules.chapter3.StringConcatenationRule +import com.saveourtool.diktat.ruleset.rules.chapter3.StringTemplateFormatRule +import com.saveourtool.diktat.ruleset.rules.chapter3.TrailingCommaRule +import com.saveourtool.diktat.ruleset.rules.chapter3.WhenMustHaveElseRule +import com.saveourtool.diktat.ruleset.rules.chapter3.files.BlankLinesRule +import com.saveourtool.diktat.ruleset.rules.chapter3.files.FileSize +import com.saveourtool.diktat.ruleset.rules.chapter3.files.FileStructureRule +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationRule +import com.saveourtool.diktat.ruleset.rules.chapter3.files.NewlinesRule +import com.saveourtool.diktat.ruleset.rules.chapter3.files.TopLevelOrderRule +import com.saveourtool.diktat.ruleset.rules.chapter3.files.WhiteSpaceRule +import com.saveourtool.diktat.ruleset.rules.chapter3.identifiers.LocalVariablesRule +import com.saveourtool.diktat.ruleset.rules.chapter4.ImmutableValNoVarRule +import com.saveourtool.diktat.ruleset.rules.chapter4.NullChecksRule +import com.saveourtool.diktat.ruleset.rules.chapter4.SmartCastRule +import com.saveourtool.diktat.ruleset.rules.chapter4.TypeAliasRule +import com.saveourtool.diktat.ruleset.rules.chapter4.VariableGenericTypeDeclarationRule +import com.saveourtool.diktat.ruleset.rules.chapter4.calculations.AccurateCalculationsRule +import com.saveourtool.diktat.ruleset.rules.chapter5.AsyncAndSyncRule +import com.saveourtool.diktat.ruleset.rules.chapter5.AvoidNestedFunctionsRule +import com.saveourtool.diktat.ruleset.rules.chapter5.CheckInverseMethodRule +import com.saveourtool.diktat.ruleset.rules.chapter5.CustomLabel +import com.saveourtool.diktat.ruleset.rules.chapter5.FunctionArgumentsSize +import com.saveourtool.diktat.ruleset.rules.chapter5.FunctionLength +import com.saveourtool.diktat.ruleset.rules.chapter5.LambdaLengthRule +import com.saveourtool.diktat.ruleset.rules.chapter5.LambdaParameterOrder +import com.saveourtool.diktat.ruleset.rules.chapter5.NestedFunctionBlock +import com.saveourtool.diktat.ruleset.rules.chapter5.OverloadingArgumentsFunction +import com.saveourtool.diktat.ruleset.rules.chapter5.ParameterNameInOuterLambdaRule +import com.saveourtool.diktat.ruleset.rules.chapter6.AvoidEmptyPrimaryConstructor +import com.saveourtool.diktat.ruleset.rules.chapter6.AvoidUtilityClass +import com.saveourtool.diktat.ruleset.rules.chapter6.CustomGetterSetterRule +import com.saveourtool.diktat.ruleset.rules.chapter6.ExtensionFunctionsInFileRule +import com.saveourtool.diktat.ruleset.rules.chapter6.ExtensionFunctionsSameNameRule +import com.saveourtool.diktat.ruleset.rules.chapter6.ImplicitBackingPropertyRule +import com.saveourtool.diktat.ruleset.rules.chapter6.PropertyAccessorFields +import com.saveourtool.diktat.ruleset.rules.chapter6.RunInScript +import com.saveourtool.diktat.ruleset.rules.chapter6.TrivialPropertyAccessors +import com.saveourtool.diktat.ruleset.rules.chapter6.UseLastIndex +import com.saveourtool.diktat.ruleset.rules.chapter6.UselessSupertype +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.AbstractClassesRule +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.CompactInitialization +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.DataClassesRule +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.InlineClassesRule +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.SingleConstructorRule +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.SingleInitRule +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.StatelessClassesRule import mu.KotlinLogging import org.jetbrains.kotlin.org.jline.utils.Levenshtein diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter1/FileNaming.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter1/FileNaming.kt similarity index 82% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter1/FileNaming.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter1/FileNaming.kt index 92aab18b33..56c0ba4bb3 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter1/FileNaming.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter1/FileNaming.kt @@ -1,14 +1,14 @@ -package org.cqfn.diktat.ruleset.rules.chapter1 +package com.saveourtool.diktat.ruleset.rules.chapter1 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_NAME_INCORRECT -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_NAME_MATCH_CLASS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getFilePath -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.isPascalCase -import org.cqfn.diktat.util.isKotlinScript +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_NAME_INCORRECT +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_NAME_MATCH_CLASS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getFilePath +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.isPascalCase +import com.saveourtool.diktat.util.isKotlinScript import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter1/IdentifierNaming.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter1/IdentifierNaming.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter1/IdentifierNaming.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter1/IdentifierNaming.kt index d32844c98c..9e6974a7be 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter1/IdentifierNaming.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter1/IdentifierNaming.kt @@ -1,28 +1,28 @@ @file:Suppress("FILE_WILDCARD_IMPORTS") -package org.cqfn.diktat.ruleset.rules.chapter1 - -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.BACKTICKS_PROHIBITED -import org.cqfn.diktat.ruleset.constants.Warnings.CLASS_NAME_INCORRECT -import org.cqfn.diktat.ruleset.constants.Warnings.CONFUSING_IDENTIFIER_NAMING -import org.cqfn.diktat.ruleset.constants.Warnings.CONSTANT_UPPERCASE -import org.cqfn.diktat.ruleset.constants.Warnings.ENUM_VALUE -import org.cqfn.diktat.ruleset.constants.Warnings.EXCEPTION_SUFFIX -import org.cqfn.diktat.ruleset.constants.Warnings.FUNCTION_BOOLEAN_PREFIX -import org.cqfn.diktat.ruleset.constants.Warnings.FUNCTION_NAME_INCORRECT_CASE -import org.cqfn.diktat.ruleset.constants.Warnings.GENERIC_NAME -import org.cqfn.diktat.ruleset.constants.Warnings.IDENTIFIER_LENGTH -import org.cqfn.diktat.ruleset.constants.Warnings.OBJECT_NAME_INCORRECT -import org.cqfn.diktat.ruleset.constants.Warnings.TYPEALIAS_NAME_INCORRECT_CASE -import org.cqfn.diktat.ruleset.constants.Warnings.VARIABLE_HAS_PREFIX -import org.cqfn.diktat.ruleset.constants.Warnings.VARIABLE_NAME_INCORRECT -import org.cqfn.diktat.ruleset.constants.Warnings.VARIABLE_NAME_INCORRECT_FORMAT -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* -import org.cqfn.diktat.ruleset.utils.search.findAllVariablesWithUsages +package com.saveourtool.diktat.ruleset.rules.chapter1 + +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.BACKTICKS_PROHIBITED +import com.saveourtool.diktat.ruleset.constants.Warnings.CLASS_NAME_INCORRECT +import com.saveourtool.diktat.ruleset.constants.Warnings.CONFUSING_IDENTIFIER_NAMING +import com.saveourtool.diktat.ruleset.constants.Warnings.CONSTANT_UPPERCASE +import com.saveourtool.diktat.ruleset.constants.Warnings.ENUM_VALUE +import com.saveourtool.diktat.ruleset.constants.Warnings.EXCEPTION_SUFFIX +import com.saveourtool.diktat.ruleset.constants.Warnings.FUNCTION_BOOLEAN_PREFIX +import com.saveourtool.diktat.ruleset.constants.Warnings.FUNCTION_NAME_INCORRECT_CASE +import com.saveourtool.diktat.ruleset.constants.Warnings.GENERIC_NAME +import com.saveourtool.diktat.ruleset.constants.Warnings.IDENTIFIER_LENGTH +import com.saveourtool.diktat.ruleset.constants.Warnings.OBJECT_NAME_INCORRECT +import com.saveourtool.diktat.ruleset.constants.Warnings.TYPEALIAS_NAME_INCORRECT_CASE +import com.saveourtool.diktat.ruleset.constants.Warnings.VARIABLE_HAS_PREFIX +import com.saveourtool.diktat.ruleset.constants.Warnings.VARIABLE_NAME_INCORRECT +import com.saveourtool.diktat.ruleset.constants.Warnings.VARIABLE_NAME_INCORRECT_FORMAT +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* +import com.saveourtool.diktat.ruleset.utils.search.findAllVariablesWithUsages import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes.CATCH diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter1/PackageNaming.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter1/PackageNaming.kt similarity index 94% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter1/PackageNaming.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter1/PackageNaming.kt index 74197e3750..871bfc7cdb 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter1/PackageNaming.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter1/PackageNaming.kt @@ -1,17 +1,17 @@ -package org.cqfn.diktat.ruleset.rules.chapter1 - -import org.cqfn.diktat.common.config.rules.CommonConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getCommonConfiguration -import org.cqfn.diktat.ruleset.constants.Warnings.INCORRECT_PACKAGE_SEPARATOR -import org.cqfn.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_CASE -import org.cqfn.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_PATH -import org.cqfn.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_PREFIX -import org.cqfn.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_SYMBOLS -import org.cqfn.diktat.ruleset.constants.Warnings.PACKAGE_NAME_MISSING -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* -import org.cqfn.diktat.util.isKotlinScript +package com.saveourtool.diktat.ruleset.rules.chapter1 + +import com.saveourtool.diktat.common.config.rules.CommonConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getCommonConfiguration +import com.saveourtool.diktat.ruleset.constants.Warnings.INCORRECT_PACKAGE_SEPARATOR +import com.saveourtool.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_CASE +import com.saveourtool.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_PATH +import com.saveourtool.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_PREFIX +import com.saveourtool.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_SYMBOLS +import com.saveourtool.diktat.ruleset.constants.Warnings.PACKAGE_NAME_MISSING +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* +import com.saveourtool.diktat.util.isKotlinScript import mu.KotlinLogging import org.jetbrains.kotlin.KtNodeTypes.DOT_QUALIFIED_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/comments/CommentsRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/comments/CommentsRule.kt similarity index 94% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/comments/CommentsRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/comments/CommentsRule.kt index f00cc37cec..73312a1f28 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/comments/CommentsRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/comments/CommentsRule.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.rules.chapter2.comments +package com.saveourtool.diktat.ruleset.rules.chapter2.comments -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.ListOfPairs -import org.cqfn.diktat.ruleset.constants.Warnings.COMMENTED_OUT_CODE -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.getFilePath -import org.cqfn.diktat.ruleset.utils.prevSibling +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.ListOfPairs +import com.saveourtool.diktat.ruleset.constants.Warnings.COMMENTED_OUT_CODE +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getFilePath +import com.saveourtool.diktat.ruleset.utils.prevSibling import mu.KotlinLogging import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/comments/HeaderCommentRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/comments/HeaderCommentRule.kt similarity index 90% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/comments/HeaderCommentRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/comments/HeaderCommentRule.kt index dfa2bed3c9..6cb3d739a6 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/comments/HeaderCommentRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/comments/HeaderCommentRule.kt @@ -1,23 +1,23 @@ -package org.cqfn.diktat.ruleset.rules.chapter2.comments +package com.saveourtool.diktat.ruleset.rules.chapter2.comments -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_NOT_BEFORE_PACKAGE -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_WRONG_FORMAT -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_COPYRIGHT_YEAR -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.copyrightWords -import org.cqfn.diktat.ruleset.utils.findChildAfter -import org.cqfn.diktat.ruleset.utils.findChildBefore -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getFilePath -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.isGradleScript -import org.cqfn.diktat.ruleset.utils.isWhiteSpace -import org.cqfn.diktat.ruleset.utils.moveChildBefore +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_NOT_BEFORE_PACKAGE +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_WRONG_FORMAT +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_COPYRIGHT_YEAR +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.copyrightWords +import com.saveourtool.diktat.ruleset.utils.findChildAfter +import com.saveourtool.diktat.ruleset.utils.findChildBefore +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getFilePath +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.isGradleScript +import com.saveourtool.diktat.ruleset.utils.isWhiteSpace +import com.saveourtool.diktat.ruleset.utils.moveChildBefore import mu.KotlinLogging import org.jetbrains.kotlin.KtNodeTypes diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/CommentsFormatting.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/CommentsFormatting.kt similarity index 92% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/CommentsFormatting.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/CommentsFormatting.kt index eb1419499c..4c1ea6055f 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/CommentsFormatting.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/CommentsFormatting.kt @@ -1,25 +1,25 @@ -package org.cqfn.diktat.ruleset.rules.chapter2.kdoc +package com.saveourtool.diktat.ruleset.rules.chapter2.kdoc -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.COMMENT_WHITE_SPACE -import org.cqfn.diktat.ruleset.constants.Warnings.FIRST_COMMENT_NO_BLANK_LINE -import org.cqfn.diktat.ruleset.constants.Warnings.IF_ELSE_COMMENTS -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_NEWLINES_AROUND_KDOC -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.commentType -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.findChildrenMatching -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.isWhiteSpace -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline -import org.cqfn.diktat.ruleset.utils.leaveOnlyOneNewLine -import org.cqfn.diktat.ruleset.utils.numNewLines -import org.cqfn.diktat.ruleset.utils.prevNodeUntilNode -import org.cqfn.diktat.ruleset.utils.prevSibling +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.COMMENT_WHITE_SPACE +import com.saveourtool.diktat.ruleset.constants.Warnings.FIRST_COMMENT_NO_BLANK_LINE +import com.saveourtool.diktat.ruleset.constants.Warnings.IF_ELSE_COMMENTS +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_NEWLINES_AROUND_KDOC +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.commentType +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.findChildrenMatching +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.isWhiteSpace +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline +import com.saveourtool.diktat.ruleset.utils.leaveOnlyOneNewLine +import com.saveourtool.diktat.ruleset.utils.numNewLines +import com.saveourtool.diktat.ruleset.utils.prevNodeUntilNode +import com.saveourtool.diktat.ruleset.utils.prevSibling import org.jetbrains.kotlin.KtNodeTypes.BLOCK import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.CLASS_BODY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/KdocComments.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/KdocComments.kt similarity index 95% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/KdocComments.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/KdocComments.kt index c61b36f3d8..b49b366b8e 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/KdocComments.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/KdocComments.kt @@ -1,17 +1,17 @@ -package org.cqfn.diktat.ruleset.rules.chapter2.kdoc +package com.saveourtool.diktat.ruleset.rules.chapter2.kdoc -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getCommonConfiguration -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_DUPLICATE_PROPERTY -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_EXTRA_PROPERTY -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_CONSTRUCTOR_PROPERTY -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_CONSTRUCTOR_PROPERTY_WITH_COMMENT -import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_CLASS_ELEMENTS -import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_TOP_LEVEL -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getCommonConfiguration +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_DUPLICATE_PROPERTY +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_EXTRA_PROPERTY +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_CONSTRUCTOR_PROPERTY +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_CONSTRUCTOR_PROPERTY_WITH_COMMENT +import com.saveourtool.diktat.ruleset.constants.Warnings.MISSING_KDOC_CLASS_ELEMENTS +import com.saveourtool.diktat.ruleset.constants.Warnings.MISSING_KDOC_TOP_LEVEL +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes.BLOCK import org.jetbrains.kotlin.KtNodeTypes.CLASS diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/KdocFormatting.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/KdocFormatting.kt similarity index 90% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/KdocFormatting.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/KdocFormatting.kt index a92067c939..be151632d6 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/KdocFormatting.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/KdocFormatting.kt @@ -1,32 +1,32 @@ -package org.cqfn.diktat.ruleset.rules.chapter2.kdoc - -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_CONTAINS_DATE_OR_AUTHOR -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_EMPTY_KDOC -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NEWLINES_BEFORE_BASIC_TAGS -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_DEPRECATED_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_EMPTY_TAGS -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_NEWLINES_BETWEEN_BASIC_TAGS -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_NEWLINE_AFTER_SPECIAL_TAGS -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WRONG_SPACES_AFTER_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WRONG_TAGS_ORDER -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.allSiblings -import org.cqfn.diktat.ruleset.utils.findChildAfter -import org.cqfn.diktat.ruleset.utils.findChildBefore -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.getIdentifierName -import org.cqfn.diktat.ruleset.utils.hasChildMatching -import org.cqfn.diktat.ruleset.utils.hasTrailingNewlineInTagBody -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline -import org.cqfn.diktat.ruleset.utils.kDocTags -import org.cqfn.diktat.ruleset.utils.leaveOnlyOneNewLine -import org.cqfn.diktat.ruleset.utils.nextSibling -import org.cqfn.diktat.ruleset.utils.prevSibling -import org.cqfn.diktat.ruleset.utils.reversedChildren +package com.saveourtool.diktat.ruleset.rules.chapter2.kdoc + +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_CONTAINS_DATE_OR_AUTHOR +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_EMPTY_KDOC +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NEWLINES_BEFORE_BASIC_TAGS +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_DEPRECATED_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_EMPTY_TAGS +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_NEWLINES_BETWEEN_BASIC_TAGS +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_NEWLINE_AFTER_SPECIAL_TAGS +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WRONG_SPACES_AFTER_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WRONG_TAGS_ORDER +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.allSiblings +import com.saveourtool.diktat.ruleset.utils.findChildAfter +import com.saveourtool.diktat.ruleset.utils.findChildBefore +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.getIdentifierName +import com.saveourtool.diktat.ruleset.utils.hasChildMatching +import com.saveourtool.diktat.ruleset.utils.hasTrailingNewlineInTagBody +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline +import com.saveourtool.diktat.ruleset.utils.kDocTags +import com.saveourtool.diktat.ruleset.utils.leaveOnlyOneNewLine +import com.saveourtool.diktat.ruleset.utils.nextSibling +import com.saveourtool.diktat.ruleset.utils.prevSibling +import com.saveourtool.diktat.ruleset.utils.reversedChildren import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/KdocMethods.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/KdocMethods.kt similarity index 88% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/KdocMethods.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/KdocMethods.kt index 914bb3177f..0a34e66966 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter2/kdoc/KdocMethods.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter2/kdoc/KdocMethods.kt @@ -1,34 +1,34 @@ -package org.cqfn.diktat.ruleset.rules.chapter2.kdoc +package com.saveourtool.diktat.ruleset.rules.chapter2.kdoc -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getCommonConfiguration -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_TRIVIAL_KDOC_ON_FUNCTION -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_PARAM_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_RETURN_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_THROWS_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_ON_FUNCTION -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.KotlinParser -import org.cqfn.diktat.ruleset.utils.appendNewlineMergingWhiteSpace -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.findChildAfter -import org.cqfn.diktat.ruleset.utils.getBodyLines -import org.cqfn.diktat.ruleset.utils.getFilePath -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.getIdentifierName -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.hasKnownKdocTag -import org.cqfn.diktat.ruleset.utils.hasTestAnnotation -import org.cqfn.diktat.ruleset.utils.insertTagBefore -import org.cqfn.diktat.ruleset.utils.isAccessibleOutside -import org.cqfn.diktat.ruleset.utils.isAnonymousFunction -import org.cqfn.diktat.ruleset.utils.isGetterOrSetter -import org.cqfn.diktat.ruleset.utils.isLocatedInTest -import org.cqfn.diktat.ruleset.utils.isOverridden -import org.cqfn.diktat.ruleset.utils.isStandardMethod -import org.cqfn.diktat.ruleset.utils.kDocTags -import org.cqfn.diktat.ruleset.utils.parameterNames -import org.cqfn.diktat.ruleset.utils.splitPathToDirs +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getCommonConfiguration +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_TRIVIAL_KDOC_ON_FUNCTION +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_PARAM_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_RETURN_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_THROWS_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.MISSING_KDOC_ON_FUNCTION +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.KotlinParser +import com.saveourtool.diktat.ruleset.utils.appendNewlineMergingWhiteSpace +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.findChildAfter +import com.saveourtool.diktat.ruleset.utils.getBodyLines +import com.saveourtool.diktat.ruleset.utils.getFilePath +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.getIdentifierName +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.hasKnownKdocTag +import com.saveourtool.diktat.ruleset.utils.hasTestAnnotation +import com.saveourtool.diktat.ruleset.utils.insertTagBefore +import com.saveourtool.diktat.ruleset.utils.isAccessibleOutside +import com.saveourtool.diktat.ruleset.utils.isAnonymousFunction +import com.saveourtool.diktat.ruleset.utils.isGetterOrSetter +import com.saveourtool.diktat.ruleset.utils.isLocatedInTest +import com.saveourtool.diktat.ruleset.utils.isOverridden +import com.saveourtool.diktat.ruleset.utils.isStandardMethod +import com.saveourtool.diktat.ruleset.utils.kDocTags +import com.saveourtool.diktat.ruleset.utils.parameterNames +import com.saveourtool.diktat.ruleset.utils.splitPathToDirs import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes.BLOCK diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/AnnotationNewLineRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/AnnotationNewLineRule.kt similarity index 90% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/AnnotationNewLineRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/AnnotationNewLineRule.kt index ecdd9a80d2..cc4612e6cf 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/AnnotationNewLineRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/AnnotationNewLineRule.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.ANNOTATION_NEW_LINE -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.ANNOTATION_NEW_LINE +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes.ANNOTATION_ENTRY import org.jetbrains.kotlin.KtNodeTypes.CLASS diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/BlockStructureBraces.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/BlockStructureBraces.kt similarity index 96% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/BlockStructureBraces.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/BlockStructureBraces.kt index a190ab239c..65b29b0c74 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/BlockStructureBraces.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/BlockStructureBraces.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.BRACES_BLOCK_STRUCTURE_ERROR -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.BRACES_BLOCK_STRUCTURE_ERROR +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline import org.jetbrains.kotlin.KtNodeTypes.BLOCK import org.jetbrains.kotlin.KtNodeTypes.BODY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/BooleanExpressionsRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/BooleanExpressionsRule.kt similarity index 95% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/BooleanExpressionsRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/BooleanExpressionsRule.kt index 94d6fc66a0..178e9cc404 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/BooleanExpressionsRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/BooleanExpressionsRule.kt @@ -1,14 +1,14 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.COMPLEX_BOOLEAN_EXPRESSION -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.KotlinParser -import org.cqfn.diktat.ruleset.utils.findAllNodesWithCondition -import org.cqfn.diktat.ruleset.utils.isLeaf -import org.cqfn.diktat.ruleset.utils.isPartOfComment -import org.cqfn.diktat.ruleset.utils.logicalInfixMethodMapping -import org.cqfn.diktat.ruleset.utils.logicalInfixMethods +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.COMPLEX_BOOLEAN_EXPRESSION +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.KotlinParser +import com.saveourtool.diktat.ruleset.utils.findAllNodesWithCondition +import com.saveourtool.diktat.ruleset.utils.isLeaf +import com.saveourtool.diktat.ruleset.utils.isPartOfComment +import com.saveourtool.diktat.ruleset.utils.logicalInfixMethodMapping +import com.saveourtool.diktat.ruleset.utils.logicalInfixMethods import com.bpodgursky.jbool_expressions.Expression import com.bpodgursky.jbool_expressions.options.ExprOptions diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/BracesInConditionalsAndLoopsRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/BracesInConditionalsAndLoopsRule.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/BracesInConditionalsAndLoopsRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/BracesInConditionalsAndLoopsRule.kt index a782f05693..013c5a5678 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/BracesInConditionalsAndLoopsRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/BracesInConditionalsAndLoopsRule.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.NO_BRACES_IN_CONDITIONALS_AND_LOOPS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findChildrenMatching -import org.cqfn.diktat.ruleset.utils.isPartOfComment -import org.cqfn.diktat.ruleset.utils.isSingleLineIfElse -import org.cqfn.diktat.ruleset.utils.loopType -import org.cqfn.diktat.ruleset.utils.prevSibling +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.NO_BRACES_IN_CONDITIONALS_AND_LOOPS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findChildrenMatching +import com.saveourtool.diktat.ruleset.utils.isPartOfComment +import com.saveourtool.diktat.ruleset.utils.isSingleLineIfElse +import com.saveourtool.diktat.ruleset.utils.loopType +import com.saveourtool.diktat.ruleset.utils.prevSibling import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes.BLOCK diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/ClassLikeStructuresOrderRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/ClassLikeStructuresOrderRule.kt similarity index 95% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/ClassLikeStructuresOrderRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/ClassLikeStructuresOrderRule.kt index 2b38e97976..8823f15481 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/ClassLikeStructuresOrderRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/ClassLikeStructuresOrderRule.kt @@ -1,14 +1,14 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.BLANK_LINE_BETWEEN_PROPERTIES -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* -import org.cqfn.diktat.ruleset.utils.isPartOfComment -import org.cqfn.diktat.ruleset.utils.nextSibling -import org.cqfn.diktat.ruleset.utils.parent -import org.cqfn.diktat.ruleset.utils.prevSibling +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.BLANK_LINE_BETWEEN_PROPERTIES +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* +import com.saveourtool.diktat.ruleset.utils.isPartOfComment +import com.saveourtool.diktat.ruleset.utils.nextSibling +import com.saveourtool.diktat.ruleset.utils.parent +import com.saveourtool.diktat.ruleset.utils.prevSibling import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.CLASS_BODY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/CollapseIfStatementsRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/CollapseIfStatementsRule.kt similarity index 95% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/CollapseIfStatementsRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/CollapseIfStatementsRule.kt index 8b7f4398e2..cb213c9e24 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/CollapseIfStatementsRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/CollapseIfStatementsRule.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 - -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.KotlinParser +package com.saveourtool.diktat.ruleset.rules.chapter3 + +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.KotlinParser import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.IF diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/ConsecutiveSpacesRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/ConsecutiveSpacesRule.kt similarity index 85% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/ConsecutiveSpacesRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/ConsecutiveSpacesRule.kt index ee38c3b3bb..0bf0708ef0 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/ConsecutiveSpacesRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/ConsecutiveSpacesRule.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TOO_MANY_CONSECUTIVE_SPACES -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline -import org.cqfn.diktat.ruleset.utils.parent +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TOO_MANY_CONSECUTIVE_SPACES +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline +import com.saveourtool.diktat.ruleset.utils.parent import org.jetbrains.kotlin.KtNodeTypes.ENUM_ENTRY import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/DebugPrintRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/DebugPrintRule.kt similarity index 92% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/DebugPrintRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/DebugPrintRule.kt index 03ec93a3d2..6858adc994 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/DebugPrintRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/DebugPrintRule.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.DiktatRule import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EmptyBlock.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/EmptyBlock.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EmptyBlock.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/EmptyBlock.kt index 0744eeb4ba..31c074b132 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EmptyBlock.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/EmptyBlock.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.EMPTY_BLOCK_STRUCTURE_ERROR -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.EMPTY_BLOCK_STRUCTURE_ERROR +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EnumsSeparated.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/EnumsSeparated.kt similarity index 87% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EnumsSeparated.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/EnumsSeparated.kt index 22bb507c96..95c009a9a8 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/EnumsSeparated.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/EnumsSeparated.kt @@ -1,15 +1,15 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.ENUMS_SEPARATED -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.AstNodePredicate -import org.cqfn.diktat.ruleset.utils.allSiblings -import org.cqfn.diktat.ruleset.utils.appendNewlineMergingWhiteSpace -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.isClassEnum -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.ENUMS_SEPARATED +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.AstNodePredicate +import com.saveourtool.diktat.ruleset.utils.allSiblings +import com.saveourtool.diktat.ruleset.utils.appendNewlineMergingWhiteSpace +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.isClassEnum +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.CLASS_BODY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/LineLength.kt similarity index 96% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/LineLength.kt index 6bd0c1f55b..ad8d96597a 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LineLength.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/LineLength.kt @@ -1,21 +1,21 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 - -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.LONG_LINE -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.KotlinParser -import org.cqfn.diktat.ruleset.utils.appendNewlineMergingWhiteSpace -import org.cqfn.diktat.ruleset.utils.calculateLineColByOffset -import org.cqfn.diktat.ruleset.utils.findAllNodesWithConditionOnLine -import org.cqfn.diktat.ruleset.utils.findParentNodeWithSpecificType -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.getLineNumber -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.isWhiteSpace -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline +package com.saveourtool.diktat.ruleset.rules.chapter3 + +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.LONG_LINE +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.KotlinParser +import com.saveourtool.diktat.ruleset.utils.appendNewlineMergingWhiteSpace +import com.saveourtool.diktat.ruleset.utils.calculateLineColByOffset +import com.saveourtool.diktat.ruleset.utils.findAllNodesWithConditionOnLine +import com.saveourtool.diktat.ruleset.utils.findParentNodeWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.getLineNumber +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.isWhiteSpace +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.BLOCK diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LongNumericalValuesSeparatedRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/LongNumericalValuesSeparatedRule.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LongNumericalValuesSeparatedRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/LongNumericalValuesSeparatedRule.kt index c36864c373..fd760e4586 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/LongNumericalValuesSeparatedRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/LongNumericalValuesSeparatedRule.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.LONG_NUMERICAL_VALUES_SEPARATED -import org.cqfn.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.LONG_NUMERICAL_VALUES_SEPARATED +import com.saveourtool.diktat.ruleset.rules.DiktatRule import org.jetbrains.kotlin.com.intellij.lang.ASTNode import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.LeafPsiElement diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/MagicNumberRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/MagicNumberRule.kt similarity index 91% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/MagicNumberRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/MagicNumberRule.kt index b6f69332a3..f64a46424d 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/MagicNumberRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/MagicNumberRule.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getCommonConfiguration -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.MAGIC_NUMBER -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* -import org.cqfn.diktat.ruleset.utils.parent +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getCommonConfiguration +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.MAGIC_NUMBER +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* +import com.saveourtool.diktat.ruleset.utils.parent import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.ENUM_ENTRY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/MultipleModifiersSequence.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/MultipleModifiersSequence.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/MultipleModifiersSequence.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/MultipleModifiersSequence.kt index f1ccc935c7..0bc32d5e34 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/MultipleModifiersSequence.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/MultipleModifiersSequence.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_MULTIPLE_MODIFIERS_ORDER -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_MULTIPLE_MODIFIERS_ORDER +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType import org.jetbrains.kotlin.KtNodeTypes.ANNOTATION_ENTRY import org.jetbrains.kotlin.KtNodeTypes.FUN diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/NullableTypeRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/NullableTypeRule.kt similarity index 94% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/NullableTypeRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/NullableTypeRule.kt index f141417fc1..44214f5d41 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/NullableTypeRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/NullableTypeRule.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.NULLABLE_PROPERTY_TYPE -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.KotlinParser -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.NULLABLE_PROPERTY_TYPE +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.KotlinParser +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType import org.jetbrains.kotlin.KtNodeTypes.BOOLEAN_CONSTANT import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/RangeConventionalRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/RangeConventionalRule.kt similarity index 87% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/RangeConventionalRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/RangeConventionalRule.kt index 0d64737189..e865dd917d 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/RangeConventionalRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/RangeConventionalRule.kt @@ -1,16 +1,16 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.CONVENTIONAL_RANGE -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.KotlinParser -import org.cqfn.diktat.ruleset.utils.getIdentifierName -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.isWhiteSpace -import org.cqfn.diktat.ruleset.utils.parent -import org.cqfn.diktat.ruleset.utils.takeByChainOfTypes +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.CONVENTIONAL_RANGE +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.KotlinParser +import com.saveourtool.diktat.ruleset.utils.getIdentifierName +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.isWhiteSpace +import com.saveourtool.diktat.ruleset.utils.parent +import com.saveourtool.diktat.ruleset.utils.takeByChainOfTypes import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.DOT_QUALIFIED_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/SingleLineStatementsRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/SingleLineStatementsRule.kt similarity index 74% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/SingleLineStatementsRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/SingleLineStatementsRule.kt index 3daa4a7e45..15b3f2b2bc 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/SingleLineStatementsRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/SingleLineStatementsRule.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.MORE_THAN_ONE_STATEMENT_PER_LINE -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.appendNewlineMergingWhiteSpace -import org.cqfn.diktat.ruleset.utils.extractLineOfText -import org.cqfn.diktat.ruleset.utils.isBeginByNewline -import org.cqfn.diktat.ruleset.utils.isFollowedByNewline -import org.cqfn.diktat.ruleset.utils.parent +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.MORE_THAN_ONE_STATEMENT_PER_LINE +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.appendNewlineMergingWhiteSpace +import com.saveourtool.diktat.ruleset.utils.extractLineOfText +import com.saveourtool.diktat.ruleset.utils.isBeginByNewline +import com.saveourtool.diktat.ruleset.utils.isFollowedByNewline +import com.saveourtool.diktat.ruleset.utils.parent import org.jetbrains.kotlin.KtNodeTypes.ENUM_ENTRY import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/SortRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/SortRule.kt similarity index 90% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/SortRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/SortRule.kt index a94f460668..c6bdd821d4 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/SortRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/SortRule.kt @@ -1,17 +1,17 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_DECLARATIONS_ORDER -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.isClassEnum -import org.cqfn.diktat.ruleset.utils.isPartOfComment -import org.cqfn.diktat.ruleset.utils.isWhiteSpace -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline -import org.cqfn.diktat.ruleset.utils.nextSibling +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_DECLARATIONS_ORDER +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.isClassEnum +import com.saveourtool.diktat.ruleset.utils.isPartOfComment +import com.saveourtool.diktat.ruleset.utils.isWhiteSpace +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline +import com.saveourtool.diktat.ruleset.utils.nextSibling import org.jetbrains.kotlin.KtNodeTypes.CLASS_BODY import org.jetbrains.kotlin.KtNodeTypes.ENUM_ENTRY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/StringConcatenationRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/StringConcatenationRule.kt similarity index 97% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/StringConcatenationRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/StringConcatenationRule.kt index 10d692956d..bc9a5374e8 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/StringConcatenationRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/StringConcatenationRule.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.STRING_CONCATENATION -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.STRING_CONCATENATION +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.DOT_QUALIFIED_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/StringTemplateFormatRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/StringTemplateFormatRule.kt similarity index 91% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/StringTemplateFormatRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/StringTemplateFormatRule.kt index afdcb42c6c..78699ae7ee 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/StringTemplateFormatRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/StringTemplateFormatRule.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.STRING_TEMPLATE_CURLY_BRACES -import org.cqfn.diktat.ruleset.constants.Warnings.STRING_TEMPLATE_QUOTES -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.hasAnyChildOfTypes +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.STRING_TEMPLATE_CURLY_BRACES +import com.saveourtool.diktat.ruleset.constants.Warnings.STRING_TEMPLATE_QUOTES +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.hasAnyChildOfTypes import org.jetbrains.kotlin.KtNodeTypes.ARRAY_ACCESS_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.FLOAT_CONSTANT diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/TrailingCommaRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/TrailingCommaRule.kt similarity index 91% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/TrailingCommaRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/TrailingCommaRule.kt index 0d23ca4eba..2a6ed5c4e0 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/TrailingCommaRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/TrailingCommaRule.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 +package com.saveourtool.diktat.ruleset.rules.chapter3 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getCommonConfiguration -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TRAILING_COMMA -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.isPartOfComment -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getCommonConfiguration +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TRAILING_COMMA +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.isPartOfComment +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline import mu.KotlinLogging import org.jetbrains.kotlin.KtNodeTypes.COLLECTION_LITERAL_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/WhenMustHaveElseRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/WhenMustHaveElseRule.kt similarity index 90% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/WhenMustHaveElseRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/WhenMustHaveElseRule.kt index 868596c496..fb3aa3e806 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/WhenMustHaveElseRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/WhenMustHaveElseRule.kt @@ -1,15 +1,15 @@ -package org.cqfn.diktat.ruleset.rules.chapter3 - -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.WHEN_WITHOUT_ELSE -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.appendNewlineMergingWhiteSpace -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.hasParent -import org.cqfn.diktat.ruleset.utils.isBeginByNewline -import org.cqfn.diktat.ruleset.utils.prevSibling +package com.saveourtool.diktat.ruleset.rules.chapter3 + +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.WHEN_WITHOUT_ELSE +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.appendNewlineMergingWhiteSpace +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.hasParent +import com.saveourtool.diktat.ruleset.utils.isBeginByNewline +import com.saveourtool.diktat.ruleset.utils.prevSibling import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/BlankLinesRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/BlankLinesRule.kt similarity index 91% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/BlankLinesRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/BlankLinesRule.kt index 2c414a5fbb..1bc44ad663 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/BlankLinesRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/BlankLinesRule.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.files +package com.saveourtool.diktat.ruleset.rules.chapter3.files -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TOO_MANY_BLANK_LINES -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TOO_MANY_BLANK_LINES +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes.BLOCK import org.jetbrains.kotlin.KtNodeTypes.CLASS_BODY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/FileSize.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/FileSize.kt similarity index 78% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/FileSize.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/FileSize.kt index 4e497fead1..1e410f52bf 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/FileSize.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/FileSize.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.files +package com.saveourtool.diktat.ruleset.rules.chapter3.files -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_IS_TOO_LONG -import org.cqfn.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_IS_TOO_LONG +import com.saveourtool.diktat.ruleset.rules.DiktatRule import org.jetbrains.kotlin.com.intellij.lang.ASTNode import org.jetbrains.kotlin.psi.stubs.elements.KtFileElementType diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/FileStructureRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/FileStructureRule.kt similarity index 91% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/FileStructureRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/FileStructureRule.kt index 1ab50ec75d..792594e280 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/FileStructureRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/FileStructureRule.kt @@ -1,29 +1,29 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.files +package com.saveourtool.diktat.ruleset.rules.chapter3.files -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getCommonConfiguration -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_CONTAINS_ONLY_COMMENTS -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_INCORRECT_BLOCKS_ORDER -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_NO_BLANK_LINE_BETWEEN_BLOCKS -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_UNORDERED_IMPORTS -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_WILDCARD_IMPORTS -import org.cqfn.diktat.ruleset.constants.Warnings.UNUSED_IMPORT -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.rules.chapter1.PackageNaming.Companion.PACKAGE_SEPARATOR -import org.cqfn.diktat.ruleset.utils.StandardPlatforms -import org.cqfn.diktat.ruleset.utils.copyrightWords -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.handleIncorrectOrder -import org.cqfn.diktat.ruleset.utils.ignoreImports -import org.cqfn.diktat.ruleset.utils.isPartOf -import org.cqfn.diktat.ruleset.utils.isPartOfComment -import org.cqfn.diktat.ruleset.utils.isWhiteSpace -import org.cqfn.diktat.ruleset.utils.moveChildBefore -import org.cqfn.diktat.ruleset.utils.nextSibling -import org.cqfn.diktat.ruleset.utils.operatorMap -import org.cqfn.diktat.ruleset.utils.prevSibling +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getCommonConfiguration +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_CONTAINS_ONLY_COMMENTS +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_INCORRECT_BLOCKS_ORDER +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_NO_BLANK_LINE_BETWEEN_BLOCKS +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_UNORDERED_IMPORTS +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_WILDCARD_IMPORTS +import com.saveourtool.diktat.ruleset.constants.Warnings.UNUSED_IMPORT +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.rules.chapter1.PackageNaming.Companion.PACKAGE_SEPARATOR +import com.saveourtool.diktat.ruleset.utils.StandardPlatforms +import com.saveourtool.diktat.ruleset.utils.copyrightWords +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.handleIncorrectOrder +import com.saveourtool.diktat.ruleset.utils.ignoreImports +import com.saveourtool.diktat.ruleset.utils.isPartOf +import com.saveourtool.diktat.ruleset.utils.isPartOfComment +import com.saveourtool.diktat.ruleset.utils.isWhiteSpace +import com.saveourtool.diktat.ruleset.utils.moveChildBefore +import com.saveourtool.diktat.ruleset.utils.nextSibling +import com.saveourtool.diktat.ruleset.utils.operatorMap +import com.saveourtool.diktat.ruleset.utils.prevSibling import org.jetbrains.kotlin.KtNodeTypes.FILE_ANNOTATION_LIST import org.jetbrains.kotlin.KtNodeTypes.IMPORT_DIRECTIVE diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationAmount.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationAmount.kt similarity index 91% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationAmount.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationAmount.kt index 81ef4910a3..0d614e6a64 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationAmount.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationAmount.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.files +package com.saveourtool.diktat.ruleset.rules.chapter3.files -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig /** * Encapsulates the change in the indentation level. diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationAware.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationAware.kt similarity index 79% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationAware.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationAware.kt index 730edc039c..b89de7f83c 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationAware.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationAware.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.files +package com.saveourtool.diktat.ruleset.rules.chapter3.files /** * A contract for types which encapsulate the indentation level. diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationConfigAware.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationConfigAware.kt similarity index 97% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationConfigAware.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationConfigAware.kt index 4cbad184c2..98d8e52ae7 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationConfigAware.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationConfigAware.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.files +package com.saveourtool.diktat.ruleset.rules.chapter3.files -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig /** * Higher-level abstractions on top of the [indentation size][IndentationConfig.indentationSize]. diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationError.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationError.kt similarity index 77% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationError.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationError.kt index ff00e2b5cd..9aa5e08736 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationError.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationError.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.files +package com.saveourtool.diktat.ruleset.rules.chapter3.files /** * @property expected expected indentation as a number of spaces diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationRule.kt similarity index 94% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationRule.kt index e491b5b33c..5351999283 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentationRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentationRule.kt @@ -4,38 +4,38 @@ @file:Suppress("FILE_UNORDERED_IMPORTS")// False positives, see #1494. -package org.cqfn.diktat.ruleset.rules.chapter3.files - -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_INDENTATION -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationAmount.NONE -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationAmount.SINGLE -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationConfigAware.Factory.withIndentationConfig -import org.cqfn.diktat.ruleset.utils.NEWLINE -import org.cqfn.diktat.ruleset.utils.SPACE -import org.cqfn.diktat.ruleset.utils.TAB -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getAllLeafsWithSpecificType -import org.cqfn.diktat.ruleset.utils.getFilePath -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.indentBy -import org.cqfn.diktat.ruleset.utils.indentation.ArrowInWhenChecker -import org.cqfn.diktat.ruleset.utils.indentation.AssignmentOperatorChecker -import org.cqfn.diktat.ruleset.utils.indentation.ConditionalsAndLoopsWithoutBracesChecker -import org.cqfn.diktat.ruleset.utils.indentation.CustomGettersAndSettersChecker -import org.cqfn.diktat.ruleset.utils.indentation.CustomIndentationChecker -import org.cqfn.diktat.ruleset.utils.indentation.DotCallChecker -import org.cqfn.diktat.ruleset.utils.indentation.ExpressionIndentationChecker -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig -import org.cqfn.diktat.ruleset.utils.indentation.KdocIndentationChecker -import org.cqfn.diktat.ruleset.utils.indentation.SuperTypeListChecker -import org.cqfn.diktat.ruleset.utils.indentation.ValueParameterListChecker -import org.cqfn.diktat.ruleset.utils.lastIndent -import org.cqfn.diktat.ruleset.utils.leadingSpaceCount -import org.cqfn.diktat.ruleset.utils.leaveOnlyOneNewLine -import org.cqfn.diktat.ruleset.utils.visit +package com.saveourtool.diktat.ruleset.rules.chapter3.files + +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_INDENTATION +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationAmount.NONE +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationAmount.SINGLE +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationConfigAware.Factory.withIndentationConfig +import com.saveourtool.diktat.ruleset.utils.NEWLINE +import com.saveourtool.diktat.ruleset.utils.SPACE +import com.saveourtool.diktat.ruleset.utils.TAB +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getAllLeafsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getFilePath +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.indentBy +import com.saveourtool.diktat.ruleset.utils.indentation.ArrowInWhenChecker +import com.saveourtool.diktat.ruleset.utils.indentation.AssignmentOperatorChecker +import com.saveourtool.diktat.ruleset.utils.indentation.ConditionalsAndLoopsWithoutBracesChecker +import com.saveourtool.diktat.ruleset.utils.indentation.CustomGettersAndSettersChecker +import com.saveourtool.diktat.ruleset.utils.indentation.CustomIndentationChecker +import com.saveourtool.diktat.ruleset.utils.indentation.DotCallChecker +import com.saveourtool.diktat.ruleset.utils.indentation.ExpressionIndentationChecker +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig +import com.saveourtool.diktat.ruleset.utils.indentation.KdocIndentationChecker +import com.saveourtool.diktat.ruleset.utils.indentation.SuperTypeListChecker +import com.saveourtool.diktat.ruleset.utils.indentation.ValueParameterListChecker +import com.saveourtool.diktat.ruleset.utils.lastIndent +import com.saveourtool.diktat.ruleset.utils.leadingSpaceCount +import com.saveourtool.diktat.ruleset.utils.leaveOnlyOneNewLine +import com.saveourtool.diktat.ruleset.utils.visit import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION @@ -64,7 +64,7 @@ import org.jetbrains.kotlin.KtNodeTypes.VALUE_ARGUMENT import org.jetbrains.kotlin.KtNodeTypes.VALUE_ARGUMENT_LIST import org.jetbrains.kotlin.KtNodeTypes.VALUE_PARAMETER_LIST import org.jetbrains.kotlin.lexer.KtTokens.WHITE_SPACE -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline import mu.KotlinLogging import org.jetbrains.kotlin.com.intellij.lang.ASTNode import org.jetbrains.kotlin.com.intellij.psi.PsiWhiteSpace diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentedElementType.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentedElementType.kt similarity index 91% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentedElementType.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentedElementType.kt index caa1f15a6c..a44a396c09 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/IndentedElementType.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/IndentedElementType.kt @@ -1,6 +1,6 @@ @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package org.cqfn.diktat.ruleset.rules.chapter3.files +package com.saveourtool.diktat.ruleset.rules.chapter3.files import org.jetbrains.kotlin.com.intellij.psi.tree.IElementType diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt similarity index 94% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt index 38bb21f308..bdb5510195 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/NewlinesRule.kt @@ -1,34 +1,34 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.files - -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.ListOfList -import org.cqfn.diktat.ruleset.constants.Warnings.COMPLEX_EXPRESSION -import org.cqfn.diktat.ruleset.constants.Warnings.REDUNDANT_SEMICOLON -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_NEWLINES -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.appendNewlineMergingWhiteSpace -import org.cqfn.diktat.ruleset.utils.emptyBlockList -import org.cqfn.diktat.ruleset.utils.extractLineOfText -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.findAllNodesWithCondition -import org.cqfn.diktat.ruleset.utils.findParentNodeWithSpecificType -import org.cqfn.diktat.ruleset.utils.getFilePath -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.getIdentifierName -import org.cqfn.diktat.ruleset.utils.getRootNode -import org.cqfn.diktat.ruleset.utils.hasParent -import org.cqfn.diktat.ruleset.utils.isBeginByNewline -import org.cqfn.diktat.ruleset.utils.isEol -import org.cqfn.diktat.ruleset.utils.isFollowedByNewline -import org.cqfn.diktat.ruleset.utils.isGradleScript -import org.cqfn.diktat.ruleset.utils.isSingleLineIfElse -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline -import org.cqfn.diktat.ruleset.utils.leaveOnlyOneNewLine -import org.cqfn.diktat.ruleset.utils.nextCodeSibling -import org.cqfn.diktat.ruleset.utils.parent -import org.cqfn.diktat.ruleset.utils.prevCodeSibling +package com.saveourtool.diktat.ruleset.rules.chapter3.files + +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.ListOfList +import com.saveourtool.diktat.ruleset.constants.Warnings.COMPLEX_EXPRESSION +import com.saveourtool.diktat.ruleset.constants.Warnings.REDUNDANT_SEMICOLON +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_NEWLINES +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.appendNewlineMergingWhiteSpace +import com.saveourtool.diktat.ruleset.utils.emptyBlockList +import com.saveourtool.diktat.ruleset.utils.extractLineOfText +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.findAllNodesWithCondition +import com.saveourtool.diktat.ruleset.utils.findParentNodeWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getFilePath +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.getIdentifierName +import com.saveourtool.diktat.ruleset.utils.getRootNode +import com.saveourtool.diktat.ruleset.utils.hasParent +import com.saveourtool.diktat.ruleset.utils.isBeginByNewline +import com.saveourtool.diktat.ruleset.utils.isEol +import com.saveourtool.diktat.ruleset.utils.isFollowedByNewline +import com.saveourtool.diktat.ruleset.utils.isGradleScript +import com.saveourtool.diktat.ruleset.utils.isSingleLineIfElse +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline +import com.saveourtool.diktat.ruleset.utils.leaveOnlyOneNewLine +import com.saveourtool.diktat.ruleset.utils.nextCodeSibling +import com.saveourtool.diktat.ruleset.utils.parent +import com.saveourtool.diktat.ruleset.utils.prevCodeSibling import mu.KotlinLogging import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/TopLevelOrderRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/TopLevelOrderRule.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/TopLevelOrderRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/TopLevelOrderRule.kt index 0e61817472..93b36e9df3 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/TopLevelOrderRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/TopLevelOrderRule.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.files +package com.saveourtool.diktat.ruleset.rules.chapter3.files -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TOP_LEVEL_ORDER -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* -import org.cqfn.diktat.ruleset.utils.isPartOfComment +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TOP_LEVEL_ORDER +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* +import com.saveourtool.diktat.ruleset.utils.isPartOfComment import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.FUN diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/WhiteSpaceRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/WhiteSpaceRule.kt similarity index 95% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/WhiteSpaceRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/WhiteSpaceRule.kt index 0a30b205f8..e7c106d419 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/files/WhiteSpaceRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/files/WhiteSpaceRule.kt @@ -1,21 +1,21 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.files +package com.saveourtool.diktat.ruleset.rules.chapter3.files -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.LONG_LINE -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_INDENTATION -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_WHITESPACE -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.rules.chapter3.LineLength -import org.cqfn.diktat.ruleset.utils.appendNewlineMergingWhiteSpace -import org.cqfn.diktat.ruleset.utils.calculateLineColByOffset -import org.cqfn.diktat.ruleset.utils.findParentNodeWithSpecificType -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.isPartOfComment -import org.cqfn.diktat.ruleset.utils.isWhiteSpace -import org.cqfn.diktat.ruleset.utils.nextCodeLeaf -import org.cqfn.diktat.ruleset.utils.parent -import org.cqfn.diktat.ruleset.utils.prevSibling +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.LONG_LINE +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_INDENTATION +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_WHITESPACE +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength +import com.saveourtool.diktat.ruleset.utils.appendNewlineMergingWhiteSpace +import com.saveourtool.diktat.ruleset.utils.calculateLineColByOffset +import com.saveourtool.diktat.ruleset.utils.findParentNodeWithSpecificType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.isPartOfComment +import com.saveourtool.diktat.ruleset.utils.isWhiteSpace +import com.saveourtool.diktat.ruleset.utils.nextCodeLeaf +import com.saveourtool.diktat.ruleset.utils.parent +import com.saveourtool.diktat.ruleset.utils.prevSibling import mu.KotlinLogging import org.jetbrains.kotlin.KtNodeTypes.ANNOTATION_ENTRY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/identifiers/LocalVariablesRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/identifiers/LocalVariablesRule.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/identifiers/LocalVariablesRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/identifiers/LocalVariablesRule.kt index b4a4ac6e7e..8e9357ea6e 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter3/identifiers/LocalVariablesRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter3/identifiers/LocalVariablesRule.kt @@ -1,15 +1,15 @@ -package org.cqfn.diktat.ruleset.rules.chapter3.identifiers - -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.LOCAL_VARIABLE_EARLY_DECLARATION -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.containsOnlyConstants -import org.cqfn.diktat.ruleset.utils.getDeclarationScope -import org.cqfn.diktat.ruleset.utils.getLineNumber -import org.cqfn.diktat.ruleset.utils.isPartOfComment -import org.cqfn.diktat.ruleset.utils.lastLineNumber -import org.cqfn.diktat.ruleset.utils.numNewLines -import org.cqfn.diktat.ruleset.utils.search.findAllVariablesWithUsages +package com.saveourtool.diktat.ruleset.rules.chapter3.identifiers + +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.LOCAL_VARIABLE_EARLY_DECLARATION +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.containsOnlyConstants +import com.saveourtool.diktat.ruleset.utils.getDeclarationScope +import com.saveourtool.diktat.ruleset.utils.getLineNumber +import com.saveourtool.diktat.ruleset.utils.isPartOfComment +import com.saveourtool.diktat.ruleset.utils.lastLineNumber +import com.saveourtool.diktat.ruleset.utils.numNewLines +import com.saveourtool.diktat.ruleset.utils.search.findAllVariablesWithUsages import org.jetbrains.kotlin.com.intellij.lang.ASTNode import org.jetbrains.kotlin.com.intellij.psi.PsiElement diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/ImmutableValNoVarRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/ImmutableValNoVarRule.kt similarity index 85% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/ImmutableValNoVarRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/ImmutableValNoVarRule.kt index 88f1cf7ba5..3a341b4496 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/ImmutableValNoVarRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/ImmutableValNoVarRule.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter4 +package com.saveourtool.diktat.ruleset.rules.chapter4 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.SAY_NO_TO_VAR -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.search.findAllVariablesWithAssignments -import org.cqfn.diktat.ruleset.utils.search.findAllVariablesWithUsages +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.SAY_NO_TO_VAR +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.search.findAllVariablesWithAssignments +import com.saveourtool.diktat.ruleset.utils.search.findAllVariablesWithUsages import org.jetbrains.kotlin.com.intellij.lang.ASTNode import org.jetbrains.kotlin.psi.KtBlockExpression diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/NullChecksRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/NullChecksRule.kt similarity index 97% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/NullChecksRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/NullChecksRule.kt index 4fe7f46fd8..23198c35cd 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/NullChecksRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/NullChecksRule.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter4 +package com.saveourtool.diktat.ruleset.rules.chapter4 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.AVOID_NULL_CHECKS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* -import org.cqfn.diktat.ruleset.utils.parent +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.AVOID_NULL_CHECKS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* +import com.saveourtool.diktat.ruleset.utils.parent import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.BLOCK diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/SmartCastRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/SmartCastRule.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/SmartCastRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/SmartCastRule.kt index 63efd61ca9..23091b03db 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/SmartCastRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/SmartCastRule.kt @@ -1,14 +1,14 @@ -package org.cqfn.diktat.ruleset.rules.chapter4 +package com.saveourtool.diktat.ruleset.rules.chapter4 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.SMART_CAST_NEEDED -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.KotlinParser -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.findParentNodeWithSpecificType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.hasParent -import org.cqfn.diktat.ruleset.utils.search.findAllVariablesWithUsages +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.SMART_CAST_NEEDED +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.KotlinParser +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.findParentNodeWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.hasParent +import com.saveourtool.diktat.ruleset.utils.search.findAllVariablesWithUsages import org.jetbrains.kotlin.KtNodeTypes.BINARY_WITH_TYPE import org.jetbrains.kotlin.KtNodeTypes.BLOCK diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/TypeAliasRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/TypeAliasRule.kt similarity index 83% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/TypeAliasRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/TypeAliasRule.kt index 75d7b5200b..1a465447c9 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/TypeAliasRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/TypeAliasRule.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.rules.chapter4 +package com.saveourtool.diktat.ruleset.rules.chapter4 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TYPE_ALIAS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TYPE_ALIAS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes.SUPER_TYPE_LIST import org.jetbrains.kotlin.KtNodeTypes.TYPEALIAS diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/VariableGenericTypeDeclarationRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/VariableGenericTypeDeclarationRule.kt similarity index 90% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/VariableGenericTypeDeclarationRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/VariableGenericTypeDeclarationRule.kt index 9338c73b29..b374a3f373 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/VariableGenericTypeDeclarationRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/VariableGenericTypeDeclarationRule.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.rules.chapter4 +package com.saveourtool.diktat.ruleset.rules.chapter4 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.GENERIC_VARIABLE_WRONG_DECLARATION -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.GENERIC_VARIABLE_WRONG_DECLARATION +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.DOT_QUALIFIED_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/calculations/AccurateCalculationsRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/calculations/AccurateCalculationsRule.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/calculations/AccurateCalculationsRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/calculations/AccurateCalculationsRule.kt index 8460121682..be7201e2e3 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter4/calculations/AccurateCalculationsRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter4/calculations/AccurateCalculationsRule.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter4.calculations +package com.saveourtool.diktat.ruleset.rules.chapter4.calculations -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.FLOAT_IN_ACCURATE_CALCULATIONS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findLocalDeclaration -import org.cqfn.diktat.ruleset.utils.getFunctionName +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.FLOAT_IN_ACCURATE_CALCULATIONS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findLocalDeclaration +import com.saveourtool.diktat.ruleset.utils.getFunctionName import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/AsyncAndSyncRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/AsyncAndSyncRule.kt similarity index 80% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/AsyncAndSyncRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/AsyncAndSyncRule.kt index e8bda1cbbe..1ee42d8a95 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/AsyncAndSyncRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/AsyncAndSyncRule.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.RUN_BLOCKING_INSIDE_ASYNC -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.parent +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.RUN_BLOCKING_INSIDE_ASYNC +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.parent import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.FUN diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/AvoidNestedFunctionsRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/AvoidNestedFunctionsRule.kt similarity index 86% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/AvoidNestedFunctionsRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/AvoidNestedFunctionsRule.kt index d57f91b211..532afa4b8e 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/AvoidNestedFunctionsRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/AvoidNestedFunctionsRule.kt @@ -1,14 +1,14 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.AVOID_NESTED_FUNCTIONS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.hasParent -import org.cqfn.diktat.ruleset.utils.isAnonymousFunction -import org.cqfn.diktat.ruleset.utils.isWhiteSpaceWithNewline +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.AVOID_NESTED_FUNCTIONS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.hasParent +import com.saveourtool.diktat.ruleset.utils.isAnonymousFunction +import com.saveourtool.diktat.ruleset.utils.isWhiteSpaceWithNewline import org.jetbrains.kotlin.KtNodeTypes.CLASS_BODY import org.jetbrains.kotlin.KtNodeTypes.FUN diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/CheckInverseMethodRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/CheckInverseMethodRule.kt similarity index 91% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/CheckInverseMethodRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/CheckInverseMethodRule.kt index 75161d5e72..c166fa0a8d 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/CheckInverseMethodRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/CheckInverseMethodRule.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.INVERSE_FUNCTION_PREFERRED -import org.cqfn.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.INVERSE_FUNCTION_PREFERRED +import com.saveourtool.diktat.ruleset.rules.DiktatRule import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.OPERATION_REFERENCE diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/CustomLabel.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/CustomLabel.kt similarity index 83% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/CustomLabel.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/CustomLabel.kt index f9cebcabce..661db831ad 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/CustomLabel.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/CustomLabel.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.CUSTOM_LABEL -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.loopType +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.CUSTOM_LABEL +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.loopType import org.jetbrains.kotlin.KtNodeTypes.BREAK import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/FunctionArgumentsSize.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/FunctionArgumentsSize.kt similarity index 82% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/FunctionArgumentsSize.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/FunctionArgumentsSize.kt index abb2a9dd10..6b29eab6c3 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/FunctionArgumentsSize.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/FunctionArgumentsSize.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TOO_MANY_PARAMETERS -import org.cqfn.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TOO_MANY_PARAMETERS +import com.saveourtool.diktat.ruleset.rules.DiktatRule import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/FunctionLength.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/FunctionLength.kt similarity index 82% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/FunctionLength.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/FunctionLength.kt index f196cf3cd4..ccf5256583 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/FunctionLength.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/FunctionLength.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TOO_LONG_FUNCTION -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TOO_LONG_FUNCTION +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes.FUN import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/LambdaLengthRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/LambdaLengthRule.kt similarity index 78% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/LambdaLengthRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/LambdaLengthRule.kt index 530f2d918d..14503c1726 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/LambdaLengthRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/LambdaLengthRule.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TOO_MANY_LINES_IN_LAMBDA -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TOO_MANY_LINES_IN_LAMBDA +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/LambdaParameterOrder.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/LambdaParameterOrder.kt similarity index 83% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/LambdaParameterOrder.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/LambdaParameterOrder.kt index 6bfb20734c..365582a06f 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/LambdaParameterOrder.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/LambdaParameterOrder.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.LAMBDA_IS_NOT_LAST_PARAMETER -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.LAMBDA_IS_NOT_LAST_PARAMETER +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.hasChildOfType import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes.FUNCTION_TYPE diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/NestedFunctionBlock.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/NestedFunctionBlock.kt similarity index 82% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/NestedFunctionBlock.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/NestedFunctionBlock.kt index e7f92e09f2..ef8b026a6d 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/NestedFunctionBlock.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/NestedFunctionBlock.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RuleConfiguration -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings.NESTED_BLOCK -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.NESTED_BLOCK +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.FUN diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/OverloadingArgumentsFunction.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/OverloadingArgumentsFunction.kt similarity index 90% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/OverloadingArgumentsFunction.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/OverloadingArgumentsFunction.kt index d7b80fc9c2..b583541e8a 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/OverloadingArgumentsFunction.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/OverloadingArgumentsFunction.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_OVERLOADING_FUNCTION_ARGUMENTS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.allSiblings -import org.cqfn.diktat.ruleset.utils.findChildAfter -import org.cqfn.diktat.ruleset.utils.findChildBefore +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_OVERLOADING_FUNCTION_ARGUMENTS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.allSiblings +import com.saveourtool.diktat.ruleset.utils.findChildAfter +import com.saveourtool.diktat.ruleset.utils.findChildBefore import org.jetbrains.kotlin.KtNodeTypes.FUN import org.jetbrains.kotlin.KtNodeTypes.TYPE_REFERENCE diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/ParameterNameInOuterLambdaRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/ParameterNameInOuterLambdaRule.kt similarity index 72% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/ParameterNameInOuterLambdaRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/ParameterNameInOuterLambdaRule.kt index e1430717df..d51f5f3461 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter5/ParameterNameInOuterLambdaRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter5/ParameterNameInOuterLambdaRule.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter5 +package com.saveourtool.diktat.ruleset.rules.chapter5 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.PARAMETER_NAME_IN_OUTER_LAMBDA -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.doesLambdaContainIt -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.PARAMETER_NAME_IN_OUTER_LAMBDA +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.doesLambdaContainIt +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/AvoidEmptyPrimaryConstructor.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/AvoidEmptyPrimaryConstructor.kt similarity index 81% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/AvoidEmptyPrimaryConstructor.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/AvoidEmptyPrimaryConstructor.kt index a0869c5715..ed617cc7cd 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/AvoidEmptyPrimaryConstructor.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/AvoidEmptyPrimaryConstructor.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 +package com.saveourtool.diktat.ruleset.rules.chapter6 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.EMPTY_PRIMARY_CONSTRUCTOR -import org.cqfn.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.EMPTY_PRIMARY_CONSTRUCTOR +import com.saveourtool.diktat.ruleset.rules.DiktatRule import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/AvoidUtilityClass.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/AvoidUtilityClass.kt similarity index 87% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/AvoidUtilityClass.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/AvoidUtilityClass.kt index 19db7a630f..07849541e2 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/AvoidUtilityClass.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/AvoidUtilityClass.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 +package com.saveourtool.diktat.ruleset.rules.chapter6 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getCommonConfiguration -import org.cqfn.diktat.ruleset.constants.Warnings.AVOID_USING_UTILITY_CLASS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getCommonConfiguration +import com.saveourtool.diktat.ruleset.constants.Warnings.AVOID_USING_UTILITY_CLASS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.CLASS_BODY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/CustomGetterSetterRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/CustomGetterSetterRule.kt similarity index 85% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/CustomGetterSetterRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/CustomGetterSetterRule.kt index fc3cc13ecb..ed74b601ea 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/CustomGetterSetterRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/CustomGetterSetterRule.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 +package com.saveourtool.diktat.ruleset.rules.chapter6 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.CUSTOM_GETTERS_SETTERS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.CUSTOM_GETTERS_SETTERS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes.MODIFIER_LIST import org.jetbrains.kotlin.KtNodeTypes.PROPERTY_ACCESSOR diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/ExtensionFunctionsInFileRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/ExtensionFunctionsInFileRule.kt similarity index 87% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/ExtensionFunctionsInFileRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/ExtensionFunctionsInFileRule.kt index 2b27820d7e..2a3268ca3a 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/ExtensionFunctionsInFileRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/ExtensionFunctionsInFileRule.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 +package com.saveourtool.diktat.ruleset.rules.chapter6 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.EXTENSION_FUNCTION_WITH_CLASS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.prevSibling +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.EXTENSION_FUNCTION_WITH_CLASS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.prevSibling import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.FUN diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/ExtensionFunctionsSameNameRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/ExtensionFunctionsSameNameRule.kt similarity index 89% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/ExtensionFunctionsSameNameRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/ExtensionFunctionsSameNameRule.kt index 07f33670ea..ffa7a5cf09 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/ExtensionFunctionsSameNameRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/ExtensionFunctionsSameNameRule.kt @@ -1,15 +1,15 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 - -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.EXTENSION_FUNCTION_SAME_SIGNATURE -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.findChildAfter -import org.cqfn.diktat.ruleset.utils.findChildBefore -import org.cqfn.diktat.ruleset.utils.findLeafWithSpecificType -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.hasChildOfType +package com.saveourtool.diktat.ruleset.rules.chapter6 + +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.EXTENSION_FUNCTION_SAME_SIGNATURE +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.findChildAfter +import com.saveourtool.diktat.ruleset.utils.findChildBefore +import com.saveourtool.diktat.ruleset.utils.findLeafWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.FUN diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/ImplicitBackingPropertyRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/ImplicitBackingPropertyRule.kt similarity index 89% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/ImplicitBackingPropertyRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/ImplicitBackingPropertyRule.kt index 35b7382cef..2b7207cd2c 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/ImplicitBackingPropertyRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/ImplicitBackingPropertyRule.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 +package com.saveourtool.diktat.ruleset.rules.chapter6 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.NO_CORRESPONDING_PROPERTY -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.hasAnyChildOfTypes -import org.cqfn.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.NO_CORRESPONDING_PROPERTY +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.hasAnyChildOfTypes +import com.saveourtool.diktat.ruleset.utils.hasChildOfType import org.jetbrains.kotlin.KtNodeTypes.BLOCK import org.jetbrains.kotlin.KtNodeTypes.CLASS_BODY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/PropertyAccessorFields.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/PropertyAccessorFields.kt similarity index 86% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/PropertyAccessorFields.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/PropertyAccessorFields.kt index 2c81a6e326..bf0dcccc9d 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/PropertyAccessorFields.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/PropertyAccessorFields.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 +package com.saveourtool.diktat.ruleset.rules.chapter6 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_NAME_OF_VARIABLE_INSIDE_ACCESSOR -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.isGoingAfter +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_NAME_OF_VARIABLE_INSIDE_ACCESSOR +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.isGoingAfter import org.jetbrains.kotlin.KtNodeTypes.BLOCK import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/RunInScript.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/RunInScript.kt similarity index 89% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/RunInScript.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/RunInScript.kt index 80a36476e5..ff34ab335e 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/RunInScript.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/RunInScript.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 +package com.saveourtool.diktat.ruleset.rules.chapter6 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.RUN_IN_SCRIPT -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* -import org.cqfn.diktat.util.isKotlinScript +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.RUN_IN_SCRIPT +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* +import com.saveourtool.diktat.util.isKotlinScript import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.DOT_QUALIFIED_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/TrivialPropertyAccessors.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/TrivialPropertyAccessors.kt similarity index 85% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/TrivialPropertyAccessors.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/TrivialPropertyAccessors.kt index 282e5610b2..e384676506 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/TrivialPropertyAccessors.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/TrivialPropertyAccessors.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 +package com.saveourtool.diktat.ruleset.rules.chapter6 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TRIVIAL_ACCESSORS_ARE_NOT_RECOMMENDED -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.getIdentifierName -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.isWhiteSpace +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TRIVIAL_ACCESSORS_ARE_NOT_RECOMMENDED +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.getIdentifierName +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.isWhiteSpace import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.BLOCK diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/UseLastIndex.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/UseLastIndex.kt similarity index 87% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/UseLastIndex.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/UseLastIndex.kt index c71507ffb5..beae5221f6 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/UseLastIndex.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/UseLastIndex.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 +package com.saveourtool.diktat.ruleset.rules.chapter6 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.DOT_QUALIFIED_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/UselessSupertype.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/UselessSupertype.kt similarity index 94% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/UselessSupertype.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/UselessSupertype.kt index 70aeaf6518..254574edce 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/UselessSupertype.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/UselessSupertype.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.rules.chapter6 +package com.saveourtool.diktat.ruleset.rules.chapter6 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.USELESS_SUPERTYPE -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* -import org.cqfn.diktat.ruleset.utils.parent +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.USELESS_SUPERTYPE +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* +import com.saveourtool.diktat.ruleset.utils.parent import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.CLASS diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/AbstractClassesRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/AbstractClassesRule.kt similarity index 86% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/AbstractClassesRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/AbstractClassesRule.kt index 48c0404b08..1742f6b4a2 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/AbstractClassesRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/AbstractClassesRule.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.rules.chapter6.classes +package com.saveourtool.diktat.ruleset.rules.chapter6.classes -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.CLASS_SHOULD_NOT_BE_ABSTRACT -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.CLASS_SHOULD_NOT_BE_ABSTRACT +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.CLASS_BODY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/CompactInitialization.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/CompactInitialization.kt similarity index 94% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/CompactInitialization.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/CompactInitialization.kt index d99954b2e9..c16af22cf1 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/CompactInitialization.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/CompactInitialization.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.ruleset.rules.chapter6.classes +package com.saveourtool.diktat.ruleset.rules.chapter6.classes -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.COMPACT_OBJECT_INITIALIZATION -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.KotlinParser -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.findLeafWithSpecificType -import org.cqfn.diktat.ruleset.utils.getFunctionName -import org.cqfn.diktat.ruleset.utils.isPartOfComment +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.COMPACT_OBJECT_INITIALIZATION +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.KotlinParser +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.findLeafWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getFunctionName +import com.saveourtool.diktat.ruleset.utils.isPartOfComment import mu.KotlinLogging import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/DataClassesRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/DataClassesRule.kt similarity index 95% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/DataClassesRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/DataClassesRule.kt index 166f365a67..fd7b75d84f 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/DataClassesRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/DataClassesRule.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.rules.chapter6.classes +package com.saveourtool.diktat.ruleset.rules.chapter6.classes -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.USE_DATA_CLASS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.* +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.USE_DATA_CLASS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.* import org.jetbrains.kotlin.KtNodeTypes.BLOCK import org.jetbrains.kotlin.KtNodeTypes.CLASS diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/InlineClassesRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/InlineClassesRule.kt similarity index 88% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/InlineClassesRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/InlineClassesRule.kt index 8c33377cfe..02fb6aafb1 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/InlineClassesRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/InlineClassesRule.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.rules.chapter6.classes +package com.saveourtool.diktat.ruleset.rules.chapter6.classes -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getCommonConfiguration -import org.cqfn.diktat.ruleset.constants.Warnings.INLINE_CLASS_CAN_BE_USED -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getCommonConfiguration +import com.saveourtool.diktat.ruleset.constants.Warnings.INLINE_CLASS_CAN_BE_USED +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.CONSTRUCTOR_CALLEE diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/SingleConstructorRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/SingleConstructorRule.kt similarity index 94% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/SingleConstructorRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/SingleConstructorRule.kt index 29eb781d1c..7745376572 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/SingleConstructorRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/SingleConstructorRule.kt @@ -1,15 +1,15 @@ -package org.cqfn.diktat.ruleset.rules.chapter6.classes +package com.saveourtool.diktat.ruleset.rules.chapter6.classes -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.SINGLE_CONSTRUCTOR_SHOULD_BE_PRIMARY -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.KotlinParser -import org.cqfn.diktat.ruleset.utils.findChildrenMatching -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getIdentifierName -import org.cqfn.diktat.ruleset.utils.hasChildOfType -import org.cqfn.diktat.ruleset.utils.isGoingAfter -import org.cqfn.diktat.ruleset.utils.nextCodeSibling +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.SINGLE_CONSTRUCTOR_SHOULD_BE_PRIMARY +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.KotlinParser +import com.saveourtool.diktat.ruleset.utils.findChildrenMatching +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getIdentifierName +import com.saveourtool.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.ruleset.utils.isGoingAfter +import com.saveourtool.diktat.ruleset.utils.nextCodeSibling import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.CLASS_BODY diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/SingleInitRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/SingleInitRule.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/SingleInitRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/SingleInitRule.kt index 51de74e76d..4681de60af 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/SingleInitRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/SingleInitRule.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.rules.chapter6.classes +package com.saveourtool.diktat.ruleset.rules.chapter6.classes -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.MULTIPLE_INIT_BLOCKS -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getIdentifierName -import org.cqfn.diktat.ruleset.utils.parent +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.MULTIPLE_INIT_BLOCKS +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getIdentifierName +import com.saveourtool.diktat.ruleset.utils.parent import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes.BLOCK diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/StatelessClassesRule.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/StatelessClassesRule.kt similarity index 88% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/StatelessClassesRule.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/StatelessClassesRule.kt index 09a94fd695..dea7417374 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/chapter6/classes/StatelessClassesRule.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/chapter6/classes/StatelessClassesRule.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.rules.chapter6.classes +package com.saveourtool.diktat.ruleset.rules.chapter6.classes -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.OBJECT_IS_PREFERRED -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.getAllChildrenWithType -import org.cqfn.diktat.ruleset.utils.getFirstChildWithType -import org.cqfn.diktat.ruleset.utils.hasChildOfType +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.OBJECT_IS_PREFERRED +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getAllChildrenWithType +import com.saveourtool.diktat.ruleset.utils.getFirstChildWithType +import com.saveourtool.diktat.ruleset.utils.hasChildOfType import org.jetbrains.kotlin.KtNodeTypes.CLASS import org.jetbrains.kotlin.KtNodeTypes.FUN diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/AstConstants.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstConstants.kt similarity index 98% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/AstConstants.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstConstants.kt index 9055dbe0ae..58b07c189c 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/AstConstants.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstConstants.kt @@ -1,6 +1,6 @@ @file:Suppress("FILE_NAME_MATCH_CLASS") -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils import org.jetbrains.kotlin.KtNodeTypes.DO_WHILE import org.jetbrains.kotlin.KtNodeTypes.FOR diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtils.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtils.kt similarity index 99% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtils.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtils.kt index 31dade76f5..280b613f78 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtils.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtils.kt @@ -10,13 +10,13 @@ "MatchingDeclarationName", ) -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.common.config.rules.DIKTAT -import org.cqfn.diktat.common.config.rules.Rule -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.isAnnotatedWithIgnoredAnnotation -import org.cqfn.diktat.ruleset.rules.chapter1.PackageNaming +import com.saveourtool.diktat.common.config.rules.DIKTAT +import com.saveourtool.diktat.common.config.rules.Rule +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.isAnnotatedWithIgnoredAnnotation +import com.saveourtool.diktat.ruleset.rules.chapter1.PackageNaming import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes.ANNOTATED_EXPRESSION diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtilsFromKtLint.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtilsFromKtLint.kt similarity index 98% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtilsFromKtLint.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtilsFromKtLint.kt index 7af2c4f2b6..7032dc03f8 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtilsFromKtLint.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtilsFromKtLint.kt @@ -3,7 +3,7 @@ * Copied from KtLint for backward compatibility */ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils import org.jetbrains.kotlin.com.intellij.lang.ASTNode import org.jetbrains.kotlin.com.intellij.psi.PsiComment diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/FileUtils.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/FileUtils.kt similarity index 92% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/FileUtils.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/FileUtils.kt index 5f1c069678..389c16a1a2 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/FileUtils.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/FileUtils.kt @@ -2,7 +2,7 @@ * Utility methods to work with file paths. */ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils internal const val SRC_DIRECTORY_NAME = "src" diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/FunctionAstNodeUtils.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/FunctionAstNodeUtils.kt similarity index 98% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/FunctionAstNodeUtils.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/FunctionAstNodeUtils.kt index f59daa549f..0e84ab0c0b 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/FunctionAstNodeUtils.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/FunctionAstNodeUtils.kt @@ -2,7 +2,7 @@ * Various utility methods to work with AST nodes containing functions */ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes.BLOCK diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KdocUtils.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/KdocUtils.kt similarity index 98% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KdocUtils.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/KdocUtils.kt index 154f4918e9..6bfa3aeea4 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KdocUtils.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/KdocUtils.kt @@ -2,7 +2,7 @@ * Various utility methods to work with KDoc representation in AST */ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils import org.jetbrains.kotlin.com.intellij.lang.ASTNode import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.CompositeElement diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParseException.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/KotlinParseException.kt similarity index 75% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParseException.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/KotlinParseException.kt index 5eafd03e57..2d79e97401 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParseException.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/KotlinParseException.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils /** * An [Exception] that can be thrown during parsing of kotlin code diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParser.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/KotlinParser.kt similarity index 99% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParser.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/KotlinParser.kt index 1a8aa70226..31cc0f3cbf 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParser.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/KotlinParser.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils import org.jetbrains.kotlin.KtNodeTypes.BLOCK import org.jetbrains.kotlin.KtNodeTypes.IMPORT_LIST diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/PositionInTextLocator.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/PositionInTextLocator.kt similarity index 98% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/PositionInTextLocator.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/PositionInTextLocator.kt index 8bde7ec106..ce1cc18c1b 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/PositionInTextLocator.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/PositionInTextLocator.kt @@ -3,7 +3,7 @@ * fixme: this code is copy-pasted from ktlint. Change it */ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils internal typealias LineAndColumn = Pair diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/PsiUtils.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/PsiUtils.kt similarity index 98% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/PsiUtils.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/PsiUtils.kt index 2c24fe2975..8f2fe545ed 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/PsiUtils.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/PsiUtils.kt @@ -2,7 +2,7 @@ * Utility methods to work with PSI code representation */ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils import org.jetbrains.kotlin.psi.KtBinaryExpression import org.jetbrains.kotlin.psi.KtBlockExpression diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/StringCaseUtils.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/StringCaseUtils.kt similarity index 99% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/StringCaseUtils.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/StringCaseUtils.kt index f1f059f351..5bfa54ef2f 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/StringCaseUtils.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/StringCaseUtils.kt @@ -1,6 +1,6 @@ @file:Suppress("FILE_NAME_MATCH_CLASS", "MatchingDeclarationName") -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils import com.google.common.base.CaseFormat import mu.KotlinLogging diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/StringUtils.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/StringUtils.kt similarity index 98% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/StringUtils.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/StringUtils.kt index a87343297d..9e69793d8c 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/StringUtils.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/StringUtils.kt @@ -2,7 +2,7 @@ * Utility methods and constants to work with strings */ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils import org.jetbrains.kotlin.lexer.KtTokens diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/Checkers.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/indentation/Checkers.kt similarity index 96% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/Checkers.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/indentation/Checkers.kt index 7b73f9c1fd..484a3988f3 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/Checkers.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/indentation/Checkers.kt @@ -2,19 +2,19 @@ * Implementations of CustomIndentationChecker for IndentationRule */ -package org.cqfn.diktat.ruleset.utils.indentation +package com.saveourtool.diktat.ruleset.utils.indentation -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationAmount -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationAmount.SINGLE -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationError -import org.cqfn.diktat.ruleset.utils.hasParent -import org.cqfn.diktat.ruleset.utils.isBooleanExpression -import org.cqfn.diktat.ruleset.utils.isDotBeforeCallOrReference -import org.cqfn.diktat.ruleset.utils.isElvisOperationReference -import org.cqfn.diktat.ruleset.utils.isLongStringTemplateEntry -import org.cqfn.diktat.ruleset.utils.lastIndent -import org.cqfn.diktat.ruleset.utils.nextCodeSibling -import org.cqfn.diktat.ruleset.utils.prevSibling +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationAmount +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationAmount.SINGLE +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationError +import com.saveourtool.diktat.ruleset.utils.hasParent +import com.saveourtool.diktat.ruleset.utils.isBooleanExpression +import com.saveourtool.diktat.ruleset.utils.isDotBeforeCallOrReference +import com.saveourtool.diktat.ruleset.utils.isElvisOperationReference +import com.saveourtool.diktat.ruleset.utils.isLongStringTemplateEntry +import com.saveourtool.diktat.ruleset.utils.lastIndent +import com.saveourtool.diktat.ruleset.utils.nextCodeSibling +import com.saveourtool.diktat.ruleset.utils.prevSibling import org.jetbrains.kotlin.KtNodeTypes.BINARY_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.BINARY_WITH_TYPE diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/CustomIndentationChecker.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/indentation/CustomIndentationChecker.kt similarity index 88% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/CustomIndentationChecker.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/indentation/CustomIndentationChecker.kt index c1cae755ae..2965d5d324 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/CustomIndentationChecker.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/indentation/CustomIndentationChecker.kt @@ -2,11 +2,11 @@ * Utility classes for IndentationRule */ -package org.cqfn.diktat.ruleset.utils.indentation +package com.saveourtool.diktat.ruleset.utils.indentation -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationConfigAware -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationError -import org.cqfn.diktat.ruleset.utils.NEWLINE +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationConfigAware +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationError +import com.saveourtool.diktat.ruleset.utils.NEWLINE import org.jetbrains.kotlin.com.intellij.psi.PsiWhiteSpace diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/IndentationConfig.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/indentation/IndentationConfig.kt similarity index 97% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/IndentationConfig.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/indentation/IndentationConfig.kt index fc416e69c5..215bed3d24 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/indentation/IndentationConfig.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/indentation/IndentationConfig.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.utils.indentation +package com.saveourtool.diktat.ruleset.utils.indentation -import org.cqfn.diktat.common.config.rules.RuleConfiguration +import com.saveourtool.diktat.common.config.rules.RuleConfiguration /** * [RuleConfiguration] for indentation logic diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/search/VariablesSearch.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/search/VariablesSearch.kt similarity index 95% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/search/VariablesSearch.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/search/VariablesSearch.kt index 89bd2b4f66..3dff301113 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/search/VariablesSearch.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/search/VariablesSearch.kt @@ -6,11 +6,11 @@ "KDOC_WITHOUT_RETURN_TAG" ) -package org.cqfn.diktat.ruleset.utils.search +package com.saveourtool.diktat.ruleset.utils.search -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.getDeclarationScope -import org.cqfn.diktat.ruleset.utils.isGoingAfter +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.getDeclarationScope +import com.saveourtool.diktat.ruleset.utils.isGoingAfter import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/search/VariablesWithAssignmentSearch.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/search/VariablesWithAssignmentSearch.kt similarity index 93% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/search/VariablesWithAssignmentSearch.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/search/VariablesWithAssignmentSearch.kt index 6ac19612eb..9868f05bad 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/search/VariablesWithAssignmentSearch.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/search/VariablesWithAssignmentSearch.kt @@ -8,10 +8,10 @@ "KDOC_NO_EMPTY_TAGS" ) -package org.cqfn.diktat.ruleset.utils.search +package com.saveourtool.diktat.ruleset.utils.search -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.isGoingAfter +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.isGoingAfter import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/search/VariablesWithUsagesSearch.kt b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/search/VariablesWithUsagesSearch.kt similarity index 90% rename from diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/search/VariablesWithUsagesSearch.kt rename to diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/search/VariablesWithUsagesSearch.kt index a6634fe31f..6167fcda08 100644 --- a/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/utils/search/VariablesWithUsagesSearch.kt +++ b/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/utils/search/VariablesWithUsagesSearch.kt @@ -8,10 +8,10 @@ "KDOC_NO_EMPTY_TAGS" ) -package org.cqfn.diktat.ruleset.utils.search +package com.saveourtool.diktat.ruleset.utils.search -import org.cqfn.diktat.ruleset.utils.findAllDescendantsWithSpecificType -import org.cqfn.diktat.ruleset.utils.isGoingAfter +import com.saveourtool.diktat.ruleset.utils.findAllDescendantsWithSpecificType +import com.saveourtool.diktat.ruleset.utils.isGoingAfter import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.com.intellij.lang.ASTNode diff --git a/diktat-rules/src/main/resources/diktat-analysis-huawei.yml b/diktat-rules/src/main/resources/diktat-analysis-huawei.yml index 6a901b175f..5b0723f785 100644 --- a/diktat-rules/src/main/resources/diktat-analysis-huawei.yml +++ b/diktat-rules/src/main/resources/diktat-analysis-huawei.yml @@ -175,7 +175,7 @@ - name: FILE_WILDCARD_IMPORTS enabled: true configuration: - allowedWildcards: "" # Allowed wildcards for imports (e.g. "import org.cqfn.diktat.*, import org.jetbrains.kotlin.*") + allowedWildcards: "" # Allowed wildcards for imports (e.g. "import com.saveourtool.diktat.*, import org.jetbrains.kotlin.*") useRecommendedImportsOrder: true # Checks unused imports - name: UNUSED_IMPORT diff --git a/diktat-rules/src/main/resources/diktat-analysis.yml b/diktat-rules/src/main/resources/diktat-analysis.yml index ca09aa67e6..d9e19e9afb 100644 --- a/diktat-rules/src/main/resources/diktat-analysis.yml +++ b/diktat-rules/src/main/resources/diktat-analysis.yml @@ -175,7 +175,7 @@ - name: FILE_WILDCARD_IMPORTS enabled: true configuration: - allowedWildcards: "" # Allowed wildcards for imports (e.g. "import org.cqfn.diktat.*, import org.jetbrains.kotlin.*") + allowedWildcards: "" # Allowed wildcards for imports (e.g. "import com.saveourtool.diktat.*, import org.jetbrains.kotlin.*") useRecommendedImportsOrder: true # Checks unused imports - name: UNUSED_IMPORT diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/EnumValueCaseTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/EnumValueCaseTest.kt similarity index 81% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/EnumValueCaseTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/EnumValueCaseTest.kt index e083ee5c5f..bea9e9e48b 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/EnumValueCaseTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/EnumValueCaseTest.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.chapter1 +package com.saveourtool.diktat.ruleset.chapter1 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter1.IdentifierNaming -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter1.IdentifierNaming +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/IdentifierNamingFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/IdentifierNamingFixTest.kt similarity index 91% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/IdentifierNamingFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/IdentifierNamingFixTest.kt index 200cc3a4be..9367c97055 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/IdentifierNamingFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/IdentifierNamingFixTest.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.ruleset.chapter1 +package com.saveourtool.diktat.ruleset.chapter1 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.rules.chapter1.IdentifierNaming -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.rules.chapter1.IdentifierNaming +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/IdentifierNamingWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/IdentifierNamingWarnTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/IdentifierNamingWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/IdentifierNamingWarnTest.kt index b88c733f5c..721c8adac4 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/IdentifierNamingWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/IdentifierNamingWarnTest.kt @@ -1,24 +1,24 @@ -package org.cqfn.diktat.ruleset.chapter1 - -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.BACKTICKS_PROHIBITED -import org.cqfn.diktat.ruleset.constants.Warnings.CLASS_NAME_INCORRECT -import org.cqfn.diktat.ruleset.constants.Warnings.CONFUSING_IDENTIFIER_NAMING -import org.cqfn.diktat.ruleset.constants.Warnings.CONSTANT_UPPERCASE -import org.cqfn.diktat.ruleset.constants.Warnings.ENUM_VALUE -import org.cqfn.diktat.ruleset.constants.Warnings.EXCEPTION_SUFFIX -import org.cqfn.diktat.ruleset.constants.Warnings.FUNCTION_BOOLEAN_PREFIX -import org.cqfn.diktat.ruleset.constants.Warnings.GENERIC_NAME -import org.cqfn.diktat.ruleset.constants.Warnings.IDENTIFIER_LENGTH -import org.cqfn.diktat.ruleset.constants.Warnings.OBJECT_NAME_INCORRECT -import org.cqfn.diktat.ruleset.constants.Warnings.VARIABLE_HAS_PREFIX -import org.cqfn.diktat.ruleset.constants.Warnings.VARIABLE_NAME_INCORRECT -import org.cqfn.diktat.ruleset.constants.Warnings.VARIABLE_NAME_INCORRECT_FORMAT -import org.cqfn.diktat.ruleset.rules.chapter1.IdentifierNaming -import org.cqfn.diktat.util.LintTestBase - -import org.cqfn.diktat.api.DiktatError +package com.saveourtool.diktat.ruleset.chapter1 + +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.BACKTICKS_PROHIBITED +import com.saveourtool.diktat.ruleset.constants.Warnings.CLASS_NAME_INCORRECT +import com.saveourtool.diktat.ruleset.constants.Warnings.CONFUSING_IDENTIFIER_NAMING +import com.saveourtool.diktat.ruleset.constants.Warnings.CONSTANT_UPPERCASE +import com.saveourtool.diktat.ruleset.constants.Warnings.ENUM_VALUE +import com.saveourtool.diktat.ruleset.constants.Warnings.EXCEPTION_SUFFIX +import com.saveourtool.diktat.ruleset.constants.Warnings.FUNCTION_BOOLEAN_PREFIX +import com.saveourtool.diktat.ruleset.constants.Warnings.GENERIC_NAME +import com.saveourtool.diktat.ruleset.constants.Warnings.IDENTIFIER_LENGTH +import com.saveourtool.diktat.ruleset.constants.Warnings.OBJECT_NAME_INCORRECT +import com.saveourtool.diktat.ruleset.constants.Warnings.VARIABLE_HAS_PREFIX +import com.saveourtool.diktat.ruleset.constants.Warnings.VARIABLE_NAME_INCORRECT +import com.saveourtool.diktat.ruleset.constants.Warnings.VARIABLE_NAME_INCORRECT_FORMAT +import com.saveourtool.diktat.ruleset.rules.chapter1.IdentifierNaming +import com.saveourtool.diktat.util.LintTestBase + +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Tags @@ -37,7 +37,7 @@ class IdentifierNamingWarnTest : LintTestBase(::IdentifierNaming) { fun `generic class - single capital letter, can be followed by a number (check - positive1)`() { val code = """ - package org.cqfn.diktat.test + package com.saveourtool.diktat.test class TreeNode(val value: T?, val next: TreeNode? = null) @@ -50,7 +50,7 @@ class IdentifierNamingWarnTest : LintTestBase(::IdentifierNaming) { fun `generic class - single capital letter, can be followed by a number (check - positive2)`() { val code = """ - package org.cqfn.diktat.test + package com.saveourtool.diktat.test class TreeNode(val value: T?, val next: TreeNode? = null) @@ -62,7 +62,7 @@ class IdentifierNamingWarnTest : LintTestBase(::IdentifierNaming) { @Tag(WarningNames.GENERIC_NAME) fun `anonymous function`() { val code = """ - package org.cqfn.diktat.test + package com.saveourtool.diktat.test fun foo() { val sum: (Int) -> Int = fun(x): Int = x + x @@ -77,7 +77,7 @@ class IdentifierNamingWarnTest : LintTestBase(::IdentifierNaming) { fun `generic class - single capital letter, can be followed by a number (check - negative1)`() { val code = """ - package org.cqfn.diktat.test + package com.saveourtool.diktat.test class TreeNode(val value: T?, val next: TreeNode? = null) @@ -92,7 +92,7 @@ class IdentifierNamingWarnTest : LintTestBase(::IdentifierNaming) { fun `generic class - single capital letter, can be followed by a number (check - negative2)`() { val code = """ - package org.cqfn.diktat.test + package com.saveourtool.diktat.test class TreeNode(val value: T?, val next: TreeNode? = null) @@ -107,7 +107,7 @@ class IdentifierNamingWarnTest : LintTestBase(::IdentifierNaming) { fun `generic method - single capital letter, can be followed by a number (check)`() { val code = """ - package org.cqfn.diktat.test + package com.saveourtool.diktat.test fun makeLinkedList(vararg elements: T): TreeNode? { var node: TreeNode? = null diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/MethodNamingWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/MethodNamingWarnTest.kt similarity index 87% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/MethodNamingWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/MethodNamingWarnTest.kt index d4d672852a..24b240947a 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/MethodNamingWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/MethodNamingWarnTest.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.ruleset.chapter1 +package com.saveourtool.diktat.ruleset.chapter1 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.FUNCTION_BOOLEAN_PREFIX -import org.cqfn.diktat.ruleset.constants.Warnings.FUNCTION_NAME_INCORRECT_CASE -import org.cqfn.diktat.ruleset.constants.Warnings.TYPEALIAS_NAME_INCORRECT_CASE -import org.cqfn.diktat.ruleset.rules.chapter1.IdentifierNaming -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.FUNCTION_BOOLEAN_PREFIX +import com.saveourtool.diktat.ruleset.constants.Warnings.FUNCTION_NAME_INCORRECT_CASE +import com.saveourtool.diktat.ruleset.constants.Warnings.TYPEALIAS_NAME_INCORRECT_CASE +import com.saveourtool.diktat.ruleset.rules.chapter1.IdentifierNaming +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/PackageNamingFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/PackageNamingFixTest.kt similarity index 76% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/PackageNamingFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/PackageNamingFixTest.kt index 4c61ed6e52..9f61107c4d 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/PackageNamingFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/PackageNamingFixTest.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.ruleset.chapter1 +package com.saveourtool.diktat.ruleset.chapter1 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.rules.chapter1.PackageNaming -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.rules.chapter1.PackageNaming +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag @@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test class PackageNamingFixTest : FixTestBase( "test/paragraph1/naming/package", ::PackageNaming, - listOf(RulesConfig("DIKTAT_COMMON", true, mapOf("domainName" to "org.cqfn.diktat"))) + listOf(RulesConfig("DIKTAT_COMMON", true, mapOf("domainName" to "com.saveourtool.diktat"))) ) { @Test @Tag(WarningNames.PACKAGE_NAME_INCORRECT_CASE) diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/PackageNamingWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/PackageNamingWarnTest.kt similarity index 69% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/PackageNamingWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/PackageNamingWarnTest.kt index e99131a5ef..267b52e5fc 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/PackageNamingWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/PackageNamingWarnTest.kt @@ -1,18 +1,18 @@ -package org.cqfn.diktat.ruleset.chapter1 - -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.INCORRECT_PACKAGE_SEPARATOR -import org.cqfn.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_CASE -import org.cqfn.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_PATH -import org.cqfn.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_PREFIX -import org.cqfn.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_SYMBOLS -import org.cqfn.diktat.ruleset.constants.Warnings.PACKAGE_NAME_MISSING -import org.cqfn.diktat.ruleset.rules.chapter1.PackageNaming -import org.cqfn.diktat.util.LintTestBase -import org.cqfn.diktat.util.TEST_FILE_NAME - -import org.cqfn.diktat.api.DiktatError +package com.saveourtool.diktat.ruleset.chapter1 + +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.INCORRECT_PACKAGE_SEPARATOR +import com.saveourtool.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_CASE +import com.saveourtool.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_PATH +import com.saveourtool.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_PREFIX +import com.saveourtool.diktat.ruleset.constants.Warnings.PACKAGE_NAME_INCORRECT_SYMBOLS +import com.saveourtool.diktat.ruleset.constants.Warnings.PACKAGE_NAME_MISSING +import com.saveourtool.diktat.ruleset.rules.chapter1.PackageNaming +import com.saveourtool.diktat.util.LintTestBase +import com.saveourtool.diktat.util.TEST_FILE_NAME + +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -22,14 +22,14 @@ import java.nio.file.Path class PackageNamingWarnTest : LintTestBase(::PackageNaming) { private val ruleId: String = "$DIKTAT_RULE_SET_ID:${PackageNaming.NAME_ID}" private val rulesConfigList: List = listOf( - RulesConfig("DIKTAT_COMMON", true, mapOf("domainName" to "org.cqfn.diktat")) + RulesConfig("DIKTAT_COMMON", true, mapOf("domainName" to "com.saveourtool.diktat")) ) private val rulesConfigListEmptyDomainName: List = listOf( RulesConfig("DIKTAT_COMMON", true, mapOf("domainName" to "")) ) private val rulesConfigSourceDirectories: List = listOf( RulesConfig("DIKTAT_COMMON", true, mapOf( - "domainName" to "org.cqfn.diktat", + "domainName" to "com.saveourtool.diktat", "srcDirectories" to "nativeMain, mobileMain", "testDirs" to "nativeTest" )) @@ -40,7 +40,7 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { fun `missing package name (check)`(@TempDir tempDir: Path) { lintMethodWithFile( """ - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -62,7 +62,7 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { """ @file:Suppress("CONSTANT_UPPERCASE") - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -82,7 +82,7 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { fun `don't add the package name to the file in buildSrc path`(@TempDir tempDir: Path) { lintMethodWithFile( """ - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -101,9 +101,9 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { fun `package name should be in a lower case (check)`() { lintMethod( """ - package /* AAA */ org.cqfn.diktat.SPECIALTEST.test + package /* AAA */ com.saveourtool.diktat.SPECIALTEST.test - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -111,7 +111,7 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { class TestPackageName { } """.trimIndent(), - DiktatError(1, 35, ruleId, "${PACKAGE_NAME_INCORRECT_CASE.warnText()} SPECIALTEST", true), + DiktatError(1, 42, ruleId, "${PACKAGE_NAME_INCORRECT_CASE.warnText()} SPECIALTEST", true), rulesConfigList = rulesConfigList ) } @@ -124,7 +124,7 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { """ package some.incorrect.domain.test - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -132,7 +132,7 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { class TestPackageName { } """.trimIndent(), - DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PREFIX.warnText()} org.cqfn.diktat", true), + DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PREFIX.warnText()} com.saveourtool.diktat", true), rulesConfigList = rulesConfigList ) } @@ -143,9 +143,9 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { lintMethod( """ - package org.cqfn.diktat.domain.test_ + package com.saveourtool.diktat.domain.test_ - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -153,7 +153,7 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { class TestPackageName { } """.trimIndent(), - DiktatError(1, 32, ruleId, "${INCORRECT_PACKAGE_SEPARATOR.warnText()} test_", true), + DiktatError(1, 39, ruleId, "${INCORRECT_PACKAGE_SEPARATOR.warnText()} test_", true), rulesConfigList = rulesConfigList ) } @@ -164,9 +164,9 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { lintMethod( """ - package org.cqfn.diktat.domain.testш + package com.saveourtool.diktat.domain.testш - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -174,7 +174,7 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { class TestPackageName { } """.trimIndent(), - DiktatError(1, 32, ruleId, "${PACKAGE_NAME_INCORRECT_SYMBOLS.warnText()} testш"), + DiktatError(1, 39, ruleId, "${PACKAGE_NAME_INCORRECT_SYMBOLS.warnText()} testш"), rulesConfigList = rulesConfigList ) } @@ -185,9 +185,9 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { lintMethod( """ - package org.cqfn.diktat.domain.int_ + package com.saveourtool.diktat.domain.int_ - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -205,9 +205,9 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { lintMethodWithFile( """ - package org.cqfn.diktat.domain + package com.saveourtool.diktat.domain - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -216,16 +216,16 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { """.trimIndent(), tempDir = tempDir, - fileName = "diktat/diktat-rules/src/nativeMain/kotlin/org/cqfn/diktat/domain/BlaBla.kt", + fileName = "diktat/diktat-rules/src/nativeMain/kotlin/com/saveourtool/diktat/domain/BlaBla.kt", rulesConfigList = rulesConfigSourceDirectories ) lintMethodWithFile( """ - package org.cqfn.diktat.domain + package com.saveourtool.diktat.domain - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -234,8 +234,8 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { """.trimIndent(), tempDir = tempDir, - fileName = "diktat/diktat-rules/src/main/kotlin/org/cqfn/diktat/domain/BlaBla.kt", - DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} org.cqfn.diktat.main.kotlin.org.cqfn.diktat.domain", true), + fileName = "diktat/diktat-rules/src/main/kotlin/com/saveourtool/diktat/domain/BlaBla.kt", + DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} com.saveourtool.diktat.main.kotlin.com.saveourtool.diktat.domain", true), rulesConfigList = rulesConfigSourceDirectories ) } @@ -246,9 +246,9 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { lintMethodWithFile( """ - package org.cqfn.diktat.domain + package com.saveourtool.diktat.domain - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -257,16 +257,16 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { """.trimIndent(), tempDir = tempDir, - fileName = "diktat/diktat-rules/src/nativeTest/kotlin/org/cqfn/diktat/domain/BlaBla.kt", + fileName = "diktat/diktat-rules/src/nativeTest/kotlin/com/saveourtool/diktat/domain/BlaBla.kt", rulesConfigList = rulesConfigSourceDirectories ) lintMethodWithFile( """ - package org.cqfn.diktat.domain + package com.saveourtool.diktat.domain - import org.cqfn.diktat.a.b.c + import com.saveourtool.diktat.a.b.c /** * testComment @@ -275,8 +275,8 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { """.trimIndent(), tempDir = tempDir, - fileName = "diktat/diktat-rules/src/test/kotlin/org/cqfn/diktat/domain/BlaBla.kt", - DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} org.cqfn.diktat.test.kotlin.org.cqfn.diktat.domain", true), + fileName = "diktat/diktat-rules/src/test/kotlin/com/saveourtool/diktat/domain/BlaBla.kt", + DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} com.saveourtool.diktat.test.kotlin.com.saveourtool.diktat.domain", true), rulesConfigList = rulesConfigSourceDirectories ) } @@ -286,20 +286,20 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { fun `regression - incorrect warning on file under test directory`(@TempDir tempDir: Path) { lintMethodWithFile( """ - package org.cqfn.diktat.ruleset.chapter1 + package com.saveourtool.diktat.ruleset.chapter1 """.trimIndent(), tempDir = tempDir, - fileName = "diktat/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/EnumValueCaseTest.kt", + fileName = "diktat/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/EnumValueCaseTest.kt", rulesConfigList = rulesConfigList ) lintMethodWithFile( """ - package org.cqfn.diktat.chapter1 + package com.saveourtool.diktat.chapter1 """.trimIndent(), tempDir = tempDir, - fileName = "diktat/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/EnumValueCaseTest.kt", - DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} org.cqfn.diktat.ruleset.chapter1", true), + fileName = "diktat/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/EnumValueCaseTest.kt", + DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} com.saveourtool.diktat.ruleset.chapter1", true), rulesConfigList = rulesConfigList ) } @@ -309,10 +309,10 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { fun `regression - should not remove special words from file path`(@TempDir tempDir: Path) { lintMethodWithFile( """ - |package org.cqfn.diktat.test.processing + |package com.saveourtool.diktat.test.processing """.trimMargin(), tempDir = tempDir, - fileName = "project/module/src/test/kotlin/org/cqfn/diktat/test/processing/SpecialPackageNaming.kt", + fileName = "project/module/src/test/kotlin/com/saveourtool/diktat/test/processing/SpecialPackageNaming.kt", rulesConfigList = rulesConfigList ) @@ -334,10 +334,10 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { listOf("main", "test", "jvmMain", "jvmTest", "androidMain", "androidTest", "iosMain", "iosTest", "jsMain", "jsTest", "commonMain", "commonTest").forEach { lintMethodWithFile( """ - |package org.cqfn.diktat + |package com.saveourtool.diktat """.trimMargin(), tempDir = tempDir, - fileName = "project/src/$it/kotlin/org/cqfn/diktat/Example.kt", + fileName = "project/src/$it/kotlin/com/saveourtool/diktat/Example.kt", rulesConfigList = rulesConfigList ) } @@ -349,11 +349,11 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { listOf("main", "test", "jvmMain", "jvmTest", "androidMain", "androidTest", "iosMain", "iosTest", "jsMain", "jsTest", "commonMain", "commonTest").forEach { lintMethodWithFile( """ - |package org.cqfn.diktat + |package com.saveourtool.diktat """.trimMargin(), tempDir = tempDir, - fileName = "project/src/$it/kotlin/org/cqfn/diktat/example/Example.kt", - DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} org.cqfn.diktat.example", true), + fileName = "project/src/$it/kotlin/com/saveourtool/diktat/example/Example.kt", + DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} com.saveourtool.diktat.example", true), rulesConfigList = rulesConfigList ) } @@ -364,11 +364,11 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { fun `should respect KMP project structure - illegal source set name`(@TempDir tempDir: Path) { lintMethodWithFile( """ - |package org.cqfn.diktat + |package com.saveourtool.diktat """.trimMargin(), tempDir = tempDir, - fileName = "project/src/myProjectMain/kotlin/org/cqfn/diktat/example/Example.kt", - DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} org.cqfn.diktat.myProjectMain.kotlin.org.cqfn.diktat.example", true), + fileName = "project/src/myProjectMain/kotlin/com/saveourtool/diktat/example/Example.kt", + DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} com.saveourtool.diktat.myProjectMain.kotlin.com.saveourtool.diktat.example", true), rulesConfigList = rulesConfigList ) } @@ -378,12 +378,12 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { fun `should warn if there is empty domain name`(@TempDir tempDir: Path) { lintMethodWithFile( """ - |package org.cqfn.diktat + |package com.saveourtool.diktat """.trimMargin(), tempDir = tempDir, - fileName = "project/src/main/kotlin/org/cqfn/diktat/example/Example.kt", + fileName = "project/src/main/kotlin/com/saveourtool/diktat/example/Example.kt", DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PREFIX.warnText()} ", true), - DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} org.cqfn.diktat.example", true), + DiktatError(1, 9, ruleId, "${PACKAGE_NAME_INCORRECT_PATH.warnText()} com.saveourtool.diktat.example", true), rulesConfigList = rulesConfigListEmptyDomainName ) } @@ -393,10 +393,10 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { fun `shouldn't trigger if path contains dot`(@TempDir tempDir: Path) { lintMethodWithFile( """ - |package org.cqfn.diktat.test.utils + |package com.saveourtool.diktat.test.utils """.trimMargin(), tempDir = tempDir, - fileName = "project/src/main/kotlin/org/cqfn/diktat/test.utils/Example.kt", + fileName = "project/src/main/kotlin/com/saveourtool/diktat/test.utils/Example.kt", ) } @@ -405,7 +405,7 @@ class PackageNamingWarnTest : LintTestBase(::PackageNaming) { fun `shouldn't trigger for gradle script`(@TempDir tempDir: Path) { lintMethodWithFile( """ - |import org.cqfn.diktat.generation.docs.generateAvailableRules + |import com.saveourtool.diktat.generation.docs.generateAvailableRules """.trimMargin(), tempDir = tempDir, fileName = "project/build.gradle.kts", diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/PackagePathFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/PackagePathFixTest.kt similarity index 58% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/PackagePathFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/PackagePathFixTest.kt index 5bd83cc205..8402488e08 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter1/PackagePathFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter1/PackagePathFixTest.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.ruleset.chapter1 +package com.saveourtool.diktat.ruleset.chapter1 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.rules.chapter1.PackageNaming -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.rules.chapter1.PackageNaming +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag @@ -11,18 +11,18 @@ import org.junit.jupiter.api.Test class PackagePathFixTest : FixTestBase( "test/paragraph1/naming/package/src/main/kotlin", ::PackageNaming, - listOf(RulesConfig("DIKTAT_COMMON", true, mapOf("domainName" to "org.cqfn.diktat"))) + listOf(RulesConfig("DIKTAT_COMMON", true, mapOf("domainName" to "com.saveourtool.diktat"))) ) { @Test @Tag(WarningNames.PACKAGE_NAME_INCORRECT_PATH) fun `fixing package name that differs from a path`() { - fixAndCompare("org/cqfn/diktat/some/name/FixIncorrectExpected.kt", "org/cqfn/diktat/some/name/FixIncorrectTest.kt") + fixAndCompare("com/saveourtool/diktat/some/name/FixIncorrectExpected.kt", "com/saveourtool/diktat/some/name/FixIncorrectTest.kt") } @Test @Tag(WarningNames.PACKAGE_NAME_INCORRECT_PATH) fun `fixing package name that differs from a path - regression one-word package name`() { - fixAndCompare("org/cqfn/diktat/some/name/FixPackageRegressionExpected.kt", "org/cqfn/diktat/some/name/FixPackageRegressionTest.kt") + fixAndCompare("com/saveourtool/diktat/some/name/FixPackageRegressionExpected.kt", "com/saveourtool/diktat/some/name/FixPackageRegressionTest.kt") } @Test @@ -34,19 +34,19 @@ class PackagePathFixTest : FixTestBase( @Test @Tag(WarningNames.PACKAGE_NAME_MISSING) fun `fix missing package name with file annotation`() { - fixAndCompare("org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected.kt", "org/cqfn/diktat/some/name/FixMissingWithAnnotationTest.kt") + fixAndCompare("com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected.kt", "com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest.kt") } @Test @Tag(WarningNames.PACKAGE_NAME_MISSING) fun `fix missing package name with file annotation and comments`() { - fixAndCompare("org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected2.kt", "org/cqfn/diktat/some/name/FixMissingWithAnnotationTest2.kt") + fixAndCompare("com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected2.kt", "com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest2.kt") } @Test @Tag(WarningNames.PACKAGE_NAME_MISSING) fun `fix missing package name with file annotation and comments 2`() { - fixAndCompare("org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected3.kt", "org/cqfn/diktat/some/name/FixMissingWithAnnotationTest3.kt") + fixAndCompare("com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected3.kt", "com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest3.kt") } // If there is no import list in code, the node is still present in the AST, but without any whitespaces around @@ -54,7 +54,7 @@ class PackagePathFixTest : FixTestBase( @Test @Tag(WarningNames.PACKAGE_NAME_MISSING) fun `fix missing package name without import list`() { - fixAndCompare("org/cqfn/diktat/some/name/FixMissingWithoutImportExpected.kt", "org/cqfn/diktat/some/name/FixMissingWithoutImportTest.kt") + fixAndCompare("com/saveourtool/diktat/some/name/FixMissingWithoutImportExpected.kt", "com/saveourtool/diktat/some/name/FixMissingWithoutImportTest.kt") } @Test @@ -66,6 +66,6 @@ class PackagePathFixTest : FixTestBase( @Test @Tag(WarningNames.PACKAGE_NAME_MISSING) fun `fix missing package name with a proper location`() { - fixAndCompare("org/cqfn/diktat/some/name/FixMissingExpected.kt", "org/cqfn/diktat/some/name/FixMissingTest.kt") + fixAndCompare("com/saveourtool/diktat/some/name/FixMissingExpected.kt", "com/saveourtool/diktat/some/name/FixMissingTest.kt") } } diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/CommentsFormattingFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/CommentsFormattingFixTest.kt similarity index 85% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/CommentsFormattingFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/CommentsFormattingFixTest.kt index 867c2d5433..bd74136d70 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/CommentsFormattingFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/CommentsFormattingFixTest.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.chapter2 +package com.saveourtool.diktat.ruleset.chapter2 -import org.cqfn.diktat.ruleset.chapter2.CommentsFormattingTest.Companion.indentStyleComment -import org.cqfn.diktat.ruleset.chapter3.spaces.describe -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.CommentsFormatting -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.chapter2.CommentsFormattingTest.Companion.indentStyleComment +import com.saveourtool.diktat.ruleset.chapter3.spaces.describe +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.CommentsFormatting +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames.COMMENT_WHITE_SPACE import generated.WarningNames.FIRST_COMMENT_NO_BLANK_LINE diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/CommentsFormattingTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/CommentsFormattingTest.kt similarity index 88% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/CommentsFormattingTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/CommentsFormattingTest.kt index e1b246fd79..51500929e4 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/CommentsFormattingTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/CommentsFormattingTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter2 +package com.saveourtool.diktat.ruleset.chapter2 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.constants.Warnings.IF_ELSE_COMMENTS -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.CommentsFormatting -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.constants.Warnings.IF_ELSE_COMMENTS +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.CommentsFormatting +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.intellij.lang.annotations.Language import org.junit.jupiter.api.Tag @@ -20,7 +20,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check white space before comment good`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | // First Comment @@ -36,7 +36,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check white space before comment bad 2`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | val s = RulesConfig(WRONG_INDENTATION.name, true, @@ -59,7 +59,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check white space before comment bad 3`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |@Suppress("RULE") // asdasd |class Example { @@ -76,7 +76,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check white space before comment good2`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |/* This is a comment */ |class Example { @@ -107,7 +107,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { val code = """ |// This is a comment before package - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |// This is a comment |class Example { @@ -123,7 +123,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check white space before comment bad`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | //First Comment @@ -147,7 +147,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check new line above comment good`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | private val log = LoggerFactory.getLogger(Example.javaClass) @@ -186,7 +186,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check file new line above comment good`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |// Some comment |class Example { @@ -207,7 +207,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check file new line above comment bad`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 |// Some comment |class Example { | @@ -228,7 +228,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check file new line above comment bad - block and kDOC comments`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 |/* Some comment */ |class Example { | @@ -253,7 +253,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check right side comments - good`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |/* Some comment */ |class Example { @@ -269,7 +269,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check right side comments - bad`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |/* Some comment */ |class Example { @@ -286,7 +286,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `if - else comments good`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | fun someFunc() { @@ -310,7 +310,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `if - else comments good 2`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | fun someFunc() { @@ -332,7 +332,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `if - else comments bad`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | fun someFunc() { @@ -357,7 +357,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `if - else comments bad 3`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | fun someFunc() { @@ -380,7 +380,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `if - else comments bad 4`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | fun someFunc() { @@ -402,7 +402,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `should not trigger on comment`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | fun someFunc() { @@ -424,7 +424,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `first comment no space in if - else bad`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | fun someFunc() { @@ -447,7 +447,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { fun `check comment in class bad`() { val code = """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { | // First Comment @@ -466,7 +466,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { | /* | * heh | */ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { |} @@ -484,7 +484,7 @@ class CommentsFormattingTest : LintTestBase(::CommentsFormatting) { |/* | * heh | */ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | |class Example { |} diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/HeaderCommentRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/HeaderCommentRuleFixTest.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/HeaderCommentRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/HeaderCommentRuleFixTest.kt index 649d4c9bf0..eddec48bd0 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/HeaderCommentRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/HeaderCommentRuleFixTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter2 - -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_WRONG_FORMAT -import org.cqfn.diktat.ruleset.rules.chapter2.comments.HeaderCommentRule -import org.cqfn.diktat.test.framework.processing.ResourceReader -import org.cqfn.diktat.util.FixTestBase +package com.saveourtool.diktat.ruleset.chapter2 + +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_WRONG_FORMAT +import com.saveourtool.diktat.ruleset.rules.chapter2.comments.HeaderCommentRule +import com.saveourtool.diktat.test.framework.processing.ResourceReader +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import generated.WarningNames.WRONG_COPYRIGHT_YEAR diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/HeaderCommentRuleTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/HeaderCommentRuleTest.kt similarity index 85% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/HeaderCommentRuleTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/HeaderCommentRuleTest.kt index 95628901b0..69c22a7f8e 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/HeaderCommentRuleTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/HeaderCommentRuleTest.kt @@ -1,16 +1,16 @@ -package org.cqfn.diktat.ruleset.chapter2 - -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_NOT_BEFORE_PACKAGE -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_WRONG_FORMAT -import org.cqfn.diktat.ruleset.rules.chapter2.comments.HeaderCommentRule -import org.cqfn.diktat.util.LintTestBase - -import org.cqfn.diktat.api.DiktatError +package com.saveourtool.diktat.ruleset.chapter2 + +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_MISSING_OR_WRONG_COPYRIGHT +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_NOT_BEFORE_PACKAGE +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_WRONG_FORMAT +import com.saveourtool.diktat.ruleset.rules.chapter2.comments.HeaderCommentRule +import com.saveourtool.diktat.util.LintTestBase + +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -68,7 +68,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -91,7 +91,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -114,7 +114,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -138,7 +138,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -160,7 +160,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -184,7 +184,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -207,7 +207,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -230,7 +230,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -253,7 +253,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -276,7 +276,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -299,7 +299,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -322,7 +322,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -346,7 +346,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { * foo bar baz */ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -362,7 +362,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { fun `file with zero classes should have header KDoc`() { lintMethod( """ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example val CONSTANT = 42 @@ -378,7 +378,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { fun `file with multiple classes should have header KDoc`() { lintMethod( """ - package org.cqfn.diktat.example + package com.saveourtool.diktat.example class Example1 { } @@ -399,7 +399,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { | * Very useful description | * foo bar baz | */ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |class Example { } """.trimMargin(), @@ -413,9 +413,9 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { fun `header KDoc should be placed before package and imports`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.example.Foo + |import com.saveourtool.diktat.example.Foo | |/** | * This is a code snippet for tests @@ -436,14 +436,14 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { fun `header KDoc object check`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.example.Foo + |import com.saveourtool.diktat.example.Foo | |object TestEntry { |@JvmStatic |fun main(args: Array) { - | val properties = TestFrameworkProperties("org/cqfn/diktat/test/framework/test_framework.properties") + | val properties = TestFrameworkProperties("com/saveourtool/diktat/test/framework/test_framework.properties") | TestProcessingFactory(TestArgumentsReader(args, properties, javaClass.classLoader)).processTests() | } |} @@ -457,14 +457,14 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { fun `header KDoc object and class check`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.example.Foo + |import com.saveourtool.diktat.example.Foo | |object TestEntry { |@JvmStatic |fun main(args: Array) { - | val properties = TestFrameworkProperties("org/cqfn/diktat/test/framework/test_framework.properties") + | val properties = TestFrameworkProperties("com/saveourtool/diktat/test/framework/test_framework.properties") | TestProcessingFactory(TestArgumentsReader(args, properties, javaClass.classLoader)).processTests() | } |} @@ -485,7 +485,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { | """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/builds.gradle.kts" + fileName = "src/main/kotlin/com/saveourtool/diktat/builds.gradle.kts" ) } @@ -498,7 +498,7 @@ class HeaderCommentRuleTest : LintTestBase(::HeaderCommentRule) { | """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts", + fileName = "src/main/kotlin/com/saveourtool/diktat/Example.kts", DiktatError(1, 1, ruleId, "${HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE.warnText()} there are 0 declared classes and/or objects") ) } diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocCommentsFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocCommentsFixTest.kt similarity index 86% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocCommentsFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocCommentsFixTest.kt index ae2c1ef8a7..01cac5e5c2 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocCommentsFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocCommentsFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter2 +package com.saveourtool.diktat.ruleset.chapter2 -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocComments -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocComments +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocCommentsWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocCommentsWarnTest.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocCommentsWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocCommentsWarnTest.kt index 55076b6aee..261d88d580 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocCommentsWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocCommentsWarnTest.kt @@ -1,18 +1,18 @@ -package org.cqfn.diktat.ruleset.chapter2 - -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_DUPLICATE_PROPERTY -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_EXTRA_PROPERTY -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_CONSTRUCTOR_PROPERTY -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_CONSTRUCTOR_PROPERTY_WITH_COMMENT -import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_CLASS_ELEMENTS -import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_TOP_LEVEL -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocComments -import org.cqfn.diktat.util.LintTestBase - -import org.cqfn.diktat.api.DiktatError +package com.saveourtool.diktat.ruleset.chapter2 + +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_DUPLICATE_PROPERTY +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_EXTRA_PROPERTY +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_CLASS_BODY_PROPERTIES_IN_HEADER +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_CONSTRUCTOR_PROPERTY +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_CONSTRUCTOR_PROPERTY_WITH_COMMENT +import com.saveourtool.diktat.ruleset.constants.Warnings.MISSING_KDOC_CLASS_ELEMENTS +import com.saveourtool.diktat.ruleset.constants.Warnings.MISSING_KDOC_TOP_LEVEL +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocComments +import com.saveourtool.diktat.util.LintTestBase + +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Tags @@ -27,7 +27,7 @@ class KdocCommentsWarnTest : LintTestBase(::KdocComments) { fun `Should warn if kdoc comment is inside code block`() { val code = """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |/** | * right place for kdoc diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocFormattingFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocFormattingFixTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocFormattingFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocFormattingFixTest.kt index 8dc34df986..a4fbdddafa 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocFormattingFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocFormattingFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter2 +package com.saveourtool.diktat.ruleset.chapter2 -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocFormatting -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocFormatting +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocFormattingTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocFormattingTest.kt similarity index 91% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocFormattingTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocFormattingTest.kt index 67ad6e5e4d..d333855c6e 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocFormattingTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocFormattingTest.kt @@ -1,20 +1,20 @@ -package org.cqfn.diktat.ruleset.chapter2 - -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_EMPTY_KDOC -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NEWLINES_BEFORE_BASIC_TAGS -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_DEPRECATED_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_EMPTY_TAGS -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_NEWLINES_BETWEEN_BASIC_TAGS -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_NEWLINE_AFTER_SPECIAL_TAGS -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WRONG_SPACES_AFTER_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WRONG_TAGS_ORDER -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocFormatting -import org.cqfn.diktat.util.LintTestBase - -import org.cqfn.diktat.api.DiktatError +package com.saveourtool.diktat.ruleset.chapter2 + +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_EMPTY_KDOC +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NEWLINES_BEFORE_BASIC_TAGS +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_DEPRECATED_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_EMPTY_TAGS +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_NEWLINES_BETWEEN_BASIC_TAGS +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_NEWLINE_AFTER_SPECIAL_TAGS +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WRONG_SPACES_AFTER_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WRONG_TAGS_ORDER +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocFormatting +import com.saveourtool.diktat.util.LintTestBase + +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -359,7 +359,7 @@ class KdocFormattingTest : LintTestBase(::KdocFormatting) { | * @author anonymous | */ | - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |/** | * Description of this class @@ -391,7 +391,7 @@ class KdocFormattingTest : LintTestBase(::KdocFormatting) { | * @since 1.2.3.RELEASE | */ | - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |/** | * Description of this file @@ -422,7 +422,7 @@ class KdocFormattingTest : LintTestBase(::KdocFormatting) { | * @since 1.2.3.RELEASE | */ | - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |/** | * Description of this file diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocMethodsFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocMethodsFixTest.kt similarity index 89% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocMethodsFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocMethodsFixTest.kt index 6fe6014cef..d5fade6004 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocMethodsFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocMethodsFixTest.kt @@ -1,14 +1,14 @@ -package org.cqfn.diktat.ruleset.chapter2 +package com.saveourtool.diktat.ruleset.chapter2 -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocMethods -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocMethods +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Tags import org.junit.jupiter.api.Test -class KdocMethodsFixTest : FixTestBase("test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods", +class KdocMethodsFixTest : FixTestBase("test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods", ::KdocMethods) { @Test @Tag(WarningNames.MISSING_KDOC_TOP_LEVEL) diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocMethodsTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocMethodsTest.kt similarity index 91% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocMethodsTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocMethodsTest.kt index f2bc5e8bbb..aba16246fc 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocMethodsTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocMethodsTest.kt @@ -1,17 +1,17 @@ -package org.cqfn.diktat.ruleset.chapter2 - -import org.cqfn.diktat.common.config.rules.DIKTAT_COMMON -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_TRIVIAL_KDOC_ON_FUNCTION -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_PARAM_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_RETURN_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_THROWS_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_ON_FUNCTION -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocMethods -import org.cqfn.diktat.util.LintTestBase - -import org.cqfn.diktat.api.DiktatError +package com.saveourtool.diktat.ruleset.chapter2 + +import com.saveourtool.diktat.common.config.rules.DIKTAT_COMMON +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_TRIVIAL_KDOC_ON_FUNCTION +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_PARAM_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_RETURN_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_THROWS_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.MISSING_KDOC_ON_FUNCTION +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocMethods +import com.saveourtool.diktat.util.LintTestBase + +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Tags @@ -60,7 +60,7 @@ class KdocMethodsTest : LintTestBase(::KdocMethods) { @Tag(WarningNames.MISSING_KDOC_TOP_LEVEL) fun `anonymous function`() { val code = """ - package org.cqfn.diktat.test + package com.saveourtool.diktat.test fun foo() { val sum: (Int) -> Int = fun(x): Int = x + x @@ -84,23 +84,23 @@ class KdocMethodsTest : LintTestBase(::KdocMethods) { val complexAnnotationCode = "@Anno(test = [\"args\"]) $funCode" // do not force KDoc on annotated function - lintMethodWithFile(validCode, tempDir = tempDir, fileName = "src/main/kotlin/org/cqfn/diktat/Example.kt") + lintMethodWithFile(validCode, tempDir = tempDir, fileName = "src/main/kotlin/com/saveourtool/diktat/Example.kt") // no false positive triggers on annotations lintMethodWithFile(complexAnnotationCode, tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/Example.kt", + fileName = "src/main/kotlin/com/saveourtool/diktat/Example.kt", DiktatError(1, 1, ruleId, "${MISSING_KDOC_ON_FUNCTION.warnText()} doubleInt", true) ) // should check all .kt files unless both conditions on location and name are true lintMethodWithFile(funCode, tempDir = tempDir, - fileName = "src/test/kotlin/org/cqfn/diktat/Example.kt", + fileName = "src/test/kotlin/com/saveourtool/diktat/Example.kt", DiktatError(1, 1, ruleId, "${MISSING_KDOC_ON_FUNCTION.warnText()} doubleInt", true) ) // should allow to set custom test dirs lintMethodWithFile(funCode, tempDir = tempDir, - fileName = "src/jvmTest/kotlin/org/cqfn/diktat/ExampleTest.kt", + fileName = "src/jvmTest/kotlin/com/saveourtool/diktat/ExampleTest.kt", rulesConfigList = listOf(RulesConfig(DIKTAT_COMMON, true, mapOf("testDirs" to "test,jvmTest"))) ) } diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocParamPresentWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocParamPresentWarnTest.kt similarity index 87% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocParamPresentWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocParamPresentWarnTest.kt index 2340758068..b66ebc2f7b 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/KdocParamPresentWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/KdocParamPresentWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter2 +package com.saveourtool.diktat.ruleset.chapter2 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_PARAM_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_ON_FUNCTION -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocMethods -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_PARAM_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.MISSING_KDOC_ON_FUNCTION +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocMethods +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Tags diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt similarity index 96% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt index 99c23304b3..8032e08869 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter2/comments/CommentedCodeTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter2.comments +package com.saveourtool.diktat.ruleset.chapter2.comments -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.COMMENTED_OUT_CODE -import org.cqfn.diktat.ruleset.rules.chapter2.comments.CommentsRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.COMMENTED_OUT_CODE +import com.saveourtool.diktat.ruleset.rules.chapter2.comments.CommentsRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -18,13 +18,13 @@ class CommentedCodeTest : LintTestBase(::CommentsRule) { fun `Should warn if commented out import or package directive is detected (single line comments)`() { lintMethod( """ - |//package org.cqfn.diktat.example + |//package com.saveourtool.diktat.example | |import org.junit.Test |// this is an actual comment |//import org.junit.Ignore """.trimMargin(), - DiktatError(1, 1, ruleId, "${COMMENTED_OUT_CODE.warnText()} package org.cqfn.diktat.example", false), + DiktatError(1, 1, ruleId, "${COMMENTED_OUT_CODE.warnText()} package com.saveourtool.diktat.example", false), DiktatError(5, 1, ruleId, "${COMMENTED_OUT_CODE.warnText()} import org.junit.Ignore", false) ) } @@ -410,7 +410,7 @@ class CommentedCodeTest : LintTestBase(::CommentsRule) { Copyright (c) Your Company Name Here. 2010-2021 */ - package org.cqfn.diktat + package com.saveourtool.diktat /* x = 2 + 4 + 1 diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/AnnotationNewLineRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/AnnotationNewLineRuleFixTest.kt similarity index 82% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/AnnotationNewLineRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/AnnotationNewLineRuleFixTest.kt index 9f8df60fea..6c677bdf97 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/AnnotationNewLineRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/AnnotationNewLineRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.AnnotationNewLineRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.AnnotationNewLineRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/AnnotationNewLineRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/AnnotationNewLineRuleWarnTest.kt similarity index 96% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/AnnotationNewLineRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/AnnotationNewLineRuleWarnTest.kt index 2de03272df..14636de917 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/AnnotationNewLineRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/AnnotationNewLineRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.AnnotationNewLineRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.AnnotationNewLineRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BlockStructureBracesFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BlockStructureBracesFixTest.kt similarity index 89% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BlockStructureBracesFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BlockStructureBracesFixTest.kt index ca19b19536..4816e20dc7 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BlockStructureBracesFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BlockStructureBracesFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.BlockStructureBraces -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.BlockStructureBraces +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BlockStructureBracesWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BlockStructureBracesWarnTest.kt similarity index 97% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BlockStructureBracesWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BlockStructureBracesWarnTest.kt index 8322213ee8..68cc2c8846 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BlockStructureBracesWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BlockStructureBracesWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.BRACES_BLOCK_STRUCTURE_ERROR -import org.cqfn.diktat.ruleset.rules.chapter3.BlockStructureBraces -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.BRACES_BLOCK_STRUCTURE_ERROR +import com.saveourtool.diktat.ruleset.rules.chapter3.BlockStructureBraces +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BooleanExpressionsRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BooleanExpressionsRuleFixTest.kt similarity index 90% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BooleanExpressionsRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BooleanExpressionsRuleFixTest.kt index fbd015f7a5..acc81c7661 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BooleanExpressionsRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BooleanExpressionsRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.BooleanExpressionsRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.BooleanExpressionsRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BooleanExpressionsRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BooleanExpressionsRuleWarnTest.kt similarity index 96% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BooleanExpressionsRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BooleanExpressionsRuleWarnTest.kt index 123f3a49b7..d1444af7eb 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BooleanExpressionsRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BooleanExpressionsRuleWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.BooleanExpressionsRule -import org.cqfn.diktat.ruleset.utils.KotlinParser -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.BooleanExpressionsRule +import com.saveourtool.diktat.ruleset.utils.KotlinParser +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BracesRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BracesRuleFixTest.kt similarity index 85% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BracesRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BracesRuleFixTest.kt index 98e0bcfdc5..14cd51c814 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BracesRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BracesRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.BracesInConditionalsAndLoopsRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.BracesInConditionalsAndLoopsRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BracesRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BracesRuleWarnTest.kt similarity index 96% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BracesRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BracesRuleWarnTest.kt index 8fe1ff7bdc..4f65c5b461 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/BracesRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/BracesRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.NO_BRACES_IN_CONDITIONALS_AND_LOOPS -import org.cqfn.diktat.ruleset.rules.chapter3.BracesInConditionalsAndLoopsRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.NO_BRACES_IN_CONDITIONALS_AND_LOOPS +import com.saveourtool.diktat.ruleset.rules.chapter3.BracesInConditionalsAndLoopsRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ClassLikeStructuresOrderFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ClassLikeStructuresOrderFixTest.kt similarity index 87% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ClassLikeStructuresOrderFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ClassLikeStructuresOrderFixTest.kt index 7666177329..9cc42d3575 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ClassLikeStructuresOrderFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ClassLikeStructuresOrderFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.ClassLikeStructuresOrderRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.ClassLikeStructuresOrderRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ClassLikeStructuresOrderRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ClassLikeStructuresOrderRuleWarnTest.kt similarity index 94% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ClassLikeStructuresOrderRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ClassLikeStructuresOrderRuleWarnTest.kt index b693cf749b..8aaed21cdf 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ClassLikeStructuresOrderRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ClassLikeStructuresOrderRuleWarnTest.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.chapter3.spaces.describe -import org.cqfn.diktat.ruleset.constants.Warnings.BLANK_LINE_BETWEEN_PROPERTIES -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES -import org.cqfn.diktat.ruleset.rules.chapter3.ClassLikeStructuresOrderRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.chapter3.spaces.describe +import com.saveourtool.diktat.ruleset.constants.Warnings.BLANK_LINE_BETWEEN_PROPERTIES +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES +import com.saveourtool.diktat.ruleset.rules.chapter3.ClassLikeStructuresOrderRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.assertj.core.api.Assertions.assertThat import org.intellij.lang.annotations.Language diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/CollapseIfStatementsRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/CollapseIfStatementsRuleFixTest.kt similarity index 62% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/CollapseIfStatementsRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/CollapseIfStatementsRuleFixTest.kt index 3cb6833f82..63b9e22c76 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/CollapseIfStatementsRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/CollapseIfStatementsRuleFixTest.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.CollapseIfStatementsRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.CollapseIfStatementsRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/CollapseIfStatementsRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/CollapseIfStatementsRuleWarnTest.kt similarity index 97% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/CollapseIfStatementsRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/CollapseIfStatementsRuleWarnTest.kt index 739605c57c..a29dcf7a8c 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/CollapseIfStatementsRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/CollapseIfStatementsRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.COLLAPSE_IF_STATEMENTS -import org.cqfn.diktat.ruleset.rules.chapter3.CollapseIfStatementsRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.COLLAPSE_IF_STATEMENTS +import com.saveourtool.diktat.ruleset.rules.chapter3.CollapseIfStatementsRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ConsecutiveSpacesRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ConsecutiveSpacesRuleFixTest.kt similarity index 73% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ConsecutiveSpacesRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ConsecutiveSpacesRuleFixTest.kt index 7ea87ddde6..a169c66390 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ConsecutiveSpacesRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ConsecutiveSpacesRuleFixTest.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.ConsecutiveSpacesRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.ConsecutiveSpacesRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ConsecutiveSpacesRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ConsecutiveSpacesRuleWarnTest.kt similarity index 94% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ConsecutiveSpacesRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ConsecutiveSpacesRuleWarnTest.kt index f936794bad..5bbb41bf7c 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/ConsecutiveSpacesRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/ConsecutiveSpacesRuleWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TOO_MANY_CONSECUTIVE_SPACES -import org.cqfn.diktat.ruleset.rules.chapter3.ConsecutiveSpacesRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TOO_MANY_CONSECUTIVE_SPACES +import com.saveourtool.diktat.ruleset.rules.chapter3.ConsecutiveSpacesRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/DebugPrintRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/DebugPrintRuleWarnTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/DebugPrintRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/DebugPrintRuleWarnTest.kt index 99ccb37c0b..d74d367914 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/DebugPrintRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/DebugPrintRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.DebugPrintRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.DebugPrintRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EmptyBlockFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EmptyBlockFixTest.kt similarity index 69% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EmptyBlockFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EmptyBlockFixTest.kt index 2a5e899323..6cbe0ea7d5 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EmptyBlockFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EmptyBlockFixTest.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.EmptyBlock -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.EmptyBlock +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EmptyBlockWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EmptyBlockWarnTest.kt similarity index 94% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EmptyBlockWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EmptyBlockWarnTest.kt index 5cf036ed03..94e386b66d 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EmptyBlockWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EmptyBlockWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.EMPTY_BLOCK_STRUCTURE_ERROR -import org.cqfn.diktat.ruleset.rules.chapter3.EmptyBlock -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.EMPTY_BLOCK_STRUCTURE_ERROR +import com.saveourtool.diktat.ruleset.rules.chapter3.EmptyBlock +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EnumsSeparatedFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EnumsSeparatedFixTest.kt similarity index 76% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EnumsSeparatedFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EnumsSeparatedFixTest.kt index 0617b45687..a915c360bf 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EnumsSeparatedFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EnumsSeparatedFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.EnumsSeparated -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.EnumsSeparated +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EnumsSeparatedWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EnumsSeparatedWarnTest.kt similarity index 94% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EnumsSeparatedWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EnumsSeparatedWarnTest.kt index 97aa566d1c..2d2867f9a6 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/EnumsSeparatedWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/EnumsSeparatedWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.ENUMS_SEPARATED -import org.cqfn.diktat.ruleset.rules.chapter3.EnumsSeparated -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.ENUMS_SEPARATED +import com.saveourtool.diktat.ruleset.rules.chapter3.EnumsSeparated +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/FileSizeWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/FileSizeWarnTest.kt similarity index 86% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/FileSizeWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/FileSizeWarnTest.kt index b8794979de..27c17bdcc6 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/FileSizeWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/FileSizeWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.files.FileSize -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.files.FileSize +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/FileStructureRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/FileStructureRuleFixTest.kt similarity index 88% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/FileStructureRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/FileStructureRuleFixTest.kt index 72f7680a58..642c8ad00b 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/FileStructureRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/FileStructureRuleFixTest.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_COMMON -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.files.FileStructureRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_COMMON +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.files.FileStructureRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag @@ -63,7 +63,7 @@ class FileStructureRuleFixTest : FixTestBase("test/paragraph3/file_structure", : overrideRulesConfigList = listOf( RulesConfig( DIKTAT_COMMON, true, - mapOf("domainName" to "org.cqfn.diktat") + mapOf("domainName" to "com.saveourtool.diktat") ), RulesConfig( Warnings.FILE_UNORDERED_IMPORTS.name, true, diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/FileStructureRuleTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/FileStructureRuleTest.kt similarity index 81% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/FileStructureRuleTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/FileStructureRuleTest.kt index 1b4e5db81a..1064e30a47 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/FileStructureRuleTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/FileStructureRuleTest.kt @@ -1,17 +1,17 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_CONTAINS_ONLY_COMMENTS -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_INCORRECT_BLOCKS_ORDER -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_NO_BLANK_LINE_BETWEEN_BLOCKS -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_UNORDERED_IMPORTS -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_WILDCARD_IMPORTS -import org.cqfn.diktat.ruleset.rules.chapter3.files.FileStructureRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_CONTAINS_ONLY_COMMENTS +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_INCORRECT_BLOCKS_ORDER +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_NO_BLANK_LINE_BETWEEN_BLOCKS +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_UNORDERED_IMPORTS +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_WILDCARD_IMPORTS +import com.saveourtool.diktat.ruleset.rules.chapter3.files.FileStructureRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Tag @@ -23,11 +23,11 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { private val ruleId = "$DIKTAT_RULE_SET_ID:${FileStructureRule.NAME_ID}" private val rulesConfigListWildCardImport: List = listOf( RulesConfig(FILE_WILDCARD_IMPORTS.name, true, - mapOf("allowedWildcards" to "org.cqfn.diktat.*")) + mapOf("allowedWildcards" to "com.saveourtool.diktat.*")) ) private val rulesConfigListWildCardImports: List = listOf( RulesConfig(FILE_WILDCARD_IMPORTS.name, true, - mapOf("allowedWildcards" to "org.cqfn.diktat.*, org.cqfn.diktat.ruleset.constants.Warnings.*")) + mapOf("allowedWildcards" to "com.saveourtool.diktat.*, com.saveourtool.diktat.ruleset.constants.Warnings.*")) ) private val rulesConfigListEmptyDomainName: List = listOf( RulesConfig("DIKTAT_COMMON", true, mapOf("domainName" to "")) @@ -38,7 +38,7 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `should warn if file contains only comments`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |/** | * This file appears to be empty @@ -62,7 +62,7 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { | * This is an example file | */ | - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |class Example { } """.trimMargin(), @@ -76,17 +76,17 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `should warn if imports are not sorted alphabetically`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |import org.junit.Test - |import org.cqfn.diktat.Foo + |import com.saveourtool.diktat.Foo | |class Example { |val x: Test = null |val y: Foo = null |} """.trimMargin(), - DiktatError(3, 1, ruleId, "${FILE_UNORDERED_IMPORTS.warnText()} import org.cqfn.diktat.Foo...", true) + DiktatError(3, 1, ruleId, "${FILE_UNORDERED_IMPORTS.warnText()} import com.saveourtool.diktat.Foo...", true) ) } @@ -95,13 +95,13 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `should warn if wildcard imports are used`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.* + |import com.saveourtool.diktat.* | |class Example { } """.trimMargin(), - DiktatError(3, 1, ruleId, "${FILE_WILDCARD_IMPORTS.warnText()} import org.cqfn.diktat.*", false), + DiktatError(3, 1, ruleId, "${FILE_WILDCARD_IMPORTS.warnText()} import com.saveourtool.diktat.*", false), ) } @@ -116,16 +116,16 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { |@file:JvmName("Foo") | | - |package org.cqfn.diktat.example - |import org.cqfn.diktat.Foo + |package com.saveourtool.diktat.example + |import com.saveourtool.diktat.Foo |class Example{ |val x: Foo = null |} """.trimMargin(), DiktatError(1, 1, ruleId, "${FILE_NO_BLANK_LINE_BETWEEN_BLOCKS.warnText()} /**", true), DiktatError(4, 1, ruleId, "${FILE_NO_BLANK_LINE_BETWEEN_BLOCKS.warnText()} @file:JvmName(\"Foo\")", true), - DiktatError(7, 1, ruleId, "${FILE_NO_BLANK_LINE_BETWEEN_BLOCKS.warnText()} package org.cqfn.diktat.example", true), - DiktatError(8, 1, ruleId, "${FILE_NO_BLANK_LINE_BETWEEN_BLOCKS.warnText()} import org.cqfn.diktat.Foo", true) + DiktatError(7, 1, ruleId, "${FILE_NO_BLANK_LINE_BETWEEN_BLOCKS.warnText()} package com.saveourtool.diktat.example", true), + DiktatError(8, 1, ruleId, "${FILE_NO_BLANK_LINE_BETWEEN_BLOCKS.warnText()} import com.saveourtool.diktat.Foo", true) ) } @@ -134,9 +134,9 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `wildcard imports are used but with config`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.* + |import com.saveourtool.diktat.* | |class Example { } """.trimMargin(), rulesConfigList = rulesConfigListWildCardImport @@ -148,10 +148,10 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `wildcard imports are used but with several imports in config`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.* - |import org.cqfn.diktat.ruleset.constants.Warnings.* + |import com.saveourtool.diktat.* + |import com.saveourtool.diktat.ruleset.constants.Warnings.* | |class Example { } """.trimMargin(), rulesConfigList = rulesConfigListWildCardImports @@ -168,9 +168,9 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { | */ | |// some notes on this file - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.Foo + |import com.saveourtool.diktat.Foo | |class Example{ |val x: Foo = null @@ -189,9 +189,9 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { | * This is an example | */ | - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.Foo + |import com.saveourtool.diktat.Foo | |class Example{ |val x: Foo = null @@ -213,9 +213,9 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { | |@file:Annotation | - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.Foo + |import com.saveourtool.diktat.Foo | |class Example{ |val x: Foo = null @@ -234,9 +234,9 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { | */ |@file:Annotation | - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.Foo + |import com.saveourtool.diktat.Foo | |class Example{ |val x: Foo = null @@ -251,9 +251,9 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `test with empty domain name in config`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.Foo + |import com.saveourtool.diktat.Foo |import com.pinterest.ktlint.core.LintError | |class Example{ @@ -271,14 +271,14 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `import from the package`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.example.Foo + |import com.saveourtool.diktat.example.Foo | |class Example { |} """.trimMargin(), - DiktatError(1, 1, ruleId, "${Warnings.UNUSED_IMPORT.warnText()} org.cqfn.diktat.example.Foo - unused import", true) + DiktatError(1, 1, ruleId, "${Warnings.UNUSED_IMPORT.warnText()} com.saveourtool.diktat.example.Foo - unused import", true) ) } @@ -287,14 +287,14 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `unused import`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.Foo + |import com.saveourtool.diktat.Foo | |class Example { |} """.trimMargin(), - DiktatError(1, 1, ruleId, "${Warnings.UNUSED_IMPORT.warnText()} org.cqfn.diktat.Foo - unused import", true) + DiktatError(1, 1, ruleId, "${Warnings.UNUSED_IMPORT.warnText()} com.saveourtool.diktat.Foo - unused import", true) ) } @@ -303,9 +303,9 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `used import`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.Foo + |import com.saveourtool.diktat.Foo | |class Example { |val x: Foo = null @@ -319,7 +319,7 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `Operator overloading`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |import kotlin.io.path.div | @@ -336,9 +336,9 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `Should correctly check infix functions`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.utils.logAndExit + |import com.saveourtool.diktat.utils.logAndExit | |fun main() { |"Type is not supported yet" logAndExit 1 @@ -352,15 +352,15 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `unused import to infix functions`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.utils.logAndExit + |import com.saveourtool.diktat.utils.logAndExit | |fun main() { |println("Type is not supported yet") |} """.trimMargin(), - DiktatError(1, 1, ruleId, "${Warnings.UNUSED_IMPORT.warnText()} org.cqfn.diktat.utils.logAndExit - unused import", true) + DiktatError(1, 1, ruleId, "${Warnings.UNUSED_IMPORT.warnText()} com.saveourtool.diktat.utils.logAndExit - unused import", true) ) } @@ -369,7 +369,7 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `Acute import`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |import js.externals.jquery.`${'$'}` | @@ -385,7 +385,7 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `Ignore Imports`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |import com.example.get |import com.example.invoke @@ -403,7 +403,7 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `check by #1`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |import com.example.get |import com.example.invoke @@ -422,7 +422,7 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `check by #2 should not trigger`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |import com.example.equals |import com.example.get @@ -446,7 +446,7 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `check by #3 should trigger`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |import Delegate |import com.example.equals @@ -470,7 +470,7 @@ class FileStructureRuleTest : LintTestBase(::FileStructureRule) { fun `check by #4 should trigger`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | |import com.example.get |import com.example.invoke diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LineLengthFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LineLengthFixTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LineLengthFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LineLengthFixTest.kt index ea9e61916e..d9a5cb172a 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LineLengthFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LineLengthFixTest.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.LONG_LINE -import org.cqfn.diktat.ruleset.rules.chapter3.LineLength -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.LONG_LINE +import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength +import com.saveourtool.diktat.util.FixTestBase import org.junit.jupiter.api.Test class LineLengthFixTest : FixTestBase("test/paragraph3/long_line", ::LineLength) { diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LineLengthWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LineLengthWarnTest.kt similarity index 82% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LineLengthWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LineLengthWarnTest.kt index a12281b153..3dbc6019f0 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LineLengthWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LineLengthWarnTest.kt @@ -1,14 +1,14 @@ @file:Suppress("LONG_LINE") -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.LONG_LINE -import org.cqfn.diktat.ruleset.rules.chapter3.LineLength -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.LONG_LINE +import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -35,10 +35,10 @@ class LineLengthWarnTest : LintTestBase(::LineLength) { fun `check correct example with long URL in KDOC and long import`() { lintMethod( """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | - |import org.cqfn.diktat.ruleset.rules.LineLength.sdfsdfsf.sdfsdfsdfsdfdghdf.gfhdf.hdstst.dh.dsgfdfgdgs.rhftheryryj.cgh - |import org.cqfn.diktat.util.lintMethod + |import com.saveourtool.diktat.ruleset.rules.LineLength.sdfsdfsf.sdfsdfsdfsdfdghdf.gfhdf.hdstst.dh.dsgfdfgdgs.rhftheryryj.cgh + |import com.saveourtool.diktat.util.lintMethod | |/** | * https://www.google.com/search?q=djfhvkdfhvkdh+gthtdj%3Bb&rlz=1C1GCEU_enRU909RU909&oq=posible+gthtdj%3Bb&aqs=chrome..69i57j0l3.2680j1j7&sourceid=chrome&ie=UTF-8 @@ -63,10 +63,10 @@ class LineLengthWarnTest : LintTestBase(::LineLength) { fun `check wrong example with wrong URL in KDOC`() { lintMethod( """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | - |import org.cqfn.diktat.ruleset.rules.chapter3.LineLength - |import org.cqfn.diktat.util.lintMethod + |import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength + |import com.saveourtool.diktat.util.lintMethod | |/** | * https://github.com/pinterest/ktlint/blob/master/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/MaxLineLengthRule.kt @@ -92,10 +92,10 @@ class LineLengthWarnTest : LintTestBase(::LineLength) { fun `check wrong example with wrong URL in KDOC with configuration`() { lintMethod( """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | - |import org.cqfn.diktat.ruleset.rules.chapter3.LineLength - |import org.cqfn.diktat.util.lintMethod + |import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength + |import com.saveourtool.diktat.util.lintMethod | |/** | * $wrongUrl @@ -120,10 +120,10 @@ class LineLengthWarnTest : LintTestBase(::LineLength) { fun `check wrong example with long line`() { lintMethod( """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | - |import org.cqfn.diktat.ruleset.rules.chapter3.LineLength - |import org.cqfn.diktat.util.lintMethod + |import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength + |import com.saveourtool.diktat.util.lintMethod | |/** | * https://www.google.com/search?q=djfhvkdfhvkdh+gthtdj%3Bb&rlz=1C1GCEU_enRU909RU909&oq=posible+gthtdj%3Bb&aqs=chrome..69i57j0l3.2680j1j7&sourceid=chrome&ie=UTF-8 @@ -151,10 +151,10 @@ class LineLengthWarnTest : LintTestBase(::LineLength) { fun `check wrong example with long line but with configuration`() { lintMethod( """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | - |import org.cqfn.diktat.ruleset.rules.chapter3.LineLength - |import org.cqfn.diktat.util.lintMethod + |import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength + |import com.saveourtool.diktat.util.lintMethod | |/** | * This is very important URL https://www.google.com/search?q=djfhvkdfhvkdh+gthtdj%3Bb&rlz=1C1GCEU_enRU909RU909&oq=posible+gthtdj%3Bb&aqs=chrome..69i57j0l3.2680j1j7&sourceid=chrome&ie=UTF-8 @@ -182,10 +182,10 @@ class LineLengthWarnTest : LintTestBase(::LineLength) { fun `check correct example with long URL in KDOC in class`() { lintMethod( """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | - |import org.cqfn.diktat.ruleset.rules.chapter3.LineLength - |import org.cqfn.diktat.util.lintMethod + |import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength + |import com.saveourtool.diktat.util.lintMethod | | |class A { @@ -209,10 +209,10 @@ class LineLengthWarnTest : LintTestBase(::LineLength) { fun `check wrong examples with long function name and properties`() { lintMethod( """ - |package org.cqfn.diktat.ruleset.chapter3 + |package com.saveourtool.diktat.ruleset.chapter3 | - |import org.cqfn.diktat.ruleset.rules.chapter3.LineLength - |import org.cqfn.diktat.util.lintMethod + |import com.saveourtool.diktat.ruleset.rules.chapter3.LineLength + |import com.saveourtool.diktat.util.lintMethod | | |class A { diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LocalVariablesWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LocalVariablesWarnTest.kt similarity index 98% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LocalVariablesWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LocalVariablesWarnTest.kt index f91bcc3995..7f082c8a35 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LocalVariablesWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LocalVariablesWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.identifiers.LocalVariablesRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.identifiers.LocalVariablesRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.LOCAL_VARIABLE_EARLY_DECLARATION import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LongNumericalValuesSeparatedFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LongNumericalValuesSeparatedFixTest.kt similarity index 68% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LongNumericalValuesSeparatedFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LongNumericalValuesSeparatedFixTest.kt index 75f680085f..c9c23a5765 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LongNumericalValuesSeparatedFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LongNumericalValuesSeparatedFixTest.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.LongNumericalValuesSeparatedRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.LongNumericalValuesSeparatedRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames.LONG_NUMERICAL_VALUES_SEPARATED import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LongNumericalValuesSeparatedWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LongNumericalValuesSeparatedWarnTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LongNumericalValuesSeparatedWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LongNumericalValuesSeparatedWarnTest.kt index 36f0510428..f07f06c52c 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/LongNumericalValuesSeparatedWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/LongNumericalValuesSeparatedWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.LongNumericalValuesSeparatedRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.LongNumericalValuesSeparatedRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.LONG_NUMERICAL_VALUES_SEPARATED import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/MagicNumberRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/MagicNumberRuleWarnTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/MagicNumberRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/MagicNumberRuleWarnTest.kt index 4415a12e3c..eb0c1562fd 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/MagicNumberRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/MagicNumberRuleWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.MAGIC_NUMBER -import org.cqfn.diktat.ruleset.rules.chapter3.MagicNumberRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.MAGIC_NUMBER +import com.saveourtool.diktat.ruleset.rules.chapter3.MagicNumberRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -208,7 +208,7 @@ class MagicNumberRuleWarnTest : LintTestBase(::MagicNumberRule) { |} """.trimMargin(), tempDir = tempDir, - fileName = "src/test/kotlin/org/cqfn/diktat/test/hehe/MagicNumberTest.kt", + fileName = "src/test/kotlin/com/saveourtool/diktat/test/hehe/MagicNumberTest.kt", rulesConfigList = rulesConfigIgnoreNumbersMagicNumber, ) } diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/MultipleModifiersSequenceFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/MultipleModifiersSequenceFixTest.kt similarity index 76% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/MultipleModifiersSequenceFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/MultipleModifiersSequenceFixTest.kt index f052494e56..7706d53e8a 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/MultipleModifiersSequenceFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/MultipleModifiersSequenceFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.MultipleModifiersSequence -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.MultipleModifiersSequence +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/MultipleModifiersSequenceWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/MultipleModifiersSequenceWarnTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/MultipleModifiersSequenceWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/MultipleModifiersSequenceWarnTest.kt index 5093b8ad56..98dcf59dbd 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/MultipleModifiersSequenceWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/MultipleModifiersSequenceWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_MULTIPLE_MODIFIERS_ORDER -import org.cqfn.diktat.ruleset.rules.chapter3.MultipleModifiersSequence -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_MULTIPLE_MODIFIERS_ORDER +import com.saveourtool.diktat.ruleset.rules.chapter3.MultipleModifiersSequence +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/NullableTypeRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/NullableTypeRuleFixTest.kt similarity index 76% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/NullableTypeRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/NullableTypeRuleFixTest.kt index f78969f34f..7ccf8cfaa1 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/NullableTypeRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/NullableTypeRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.NullableTypeRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.NullableTypeRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/NullableTypeRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/NullableTypeRuleWarnTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/NullableTypeRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/NullableTypeRuleWarnTest.kt index 24e1e74951..c2aef44c0d 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/NullableTypeRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/NullableTypeRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.NULLABLE_PROPERTY_TYPE -import org.cqfn.diktat.ruleset.rules.chapter3.NullableTypeRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.NULLABLE_PROPERTY_TYPE +import com.saveourtool.diktat.ruleset.rules.chapter3.NullableTypeRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/RangeConventionalRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/RangeConventionalRuleFixTest.kt similarity index 69% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/RangeConventionalRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/RangeConventionalRuleFixTest.kt index 52cc9a3189..619d9ebbdb 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/RangeConventionalRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/RangeConventionalRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.RangeConventionalRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.RangeConventionalRule +import com.saveourtool.diktat.util.FixTestBase import org.junit.jupiter.api.Test class RangeConventionalRuleFixTest : FixTestBase("test/paragraph3/range", ::RangeConventionalRule) { diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/RangeConventionalRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/RangeConventionalRuleWarnTest.kt similarity index 86% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/RangeConventionalRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/RangeConventionalRuleWarnTest.kt index eaafa2a310..517c2cba63 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/RangeConventionalRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/RangeConventionalRuleWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.RangeConventionalRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.RangeConventionalRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import org.junit.jupiter.api.Test class RangeConventionalRuleWarnTest : LintTestBase(::RangeConventionalRule) { diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SingleLineStatementsRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SingleLineStatementsRuleFixTest.kt similarity index 69% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SingleLineStatementsRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SingleLineStatementsRuleFixTest.kt index 317236de90..a904f9b0c6 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SingleLineStatementsRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SingleLineStatementsRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.SingleLineStatementsRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.SingleLineStatementsRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SingleLineStatementsRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SingleLineStatementsRuleWarnTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SingleLineStatementsRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SingleLineStatementsRuleWarnTest.kt index b51eeeb321..9aacbc455f 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SingleLineStatementsRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SingleLineStatementsRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.MORE_THAN_ONE_STATEMENT_PER_LINE -import org.cqfn.diktat.ruleset.rules.chapter3.SingleLineStatementsRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.MORE_THAN_ONE_STATEMENT_PER_LINE +import com.saveourtool.diktat.ruleset.rules.chapter3.SingleLineStatementsRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SortRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SortRuleFixTest.kt similarity index 77% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SortRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SortRuleFixTest.kt index f00a9f6208..bee1bc136f 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SortRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SortRuleFixTest.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.SortRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.SortRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SortRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SortRuleWarnTest.kt similarity index 96% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SortRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SortRuleWarnTest.kt index acda5552e9..240d2852e9 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/SortRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/SortRuleWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_DECLARATIONS_ORDER -import org.cqfn.diktat.ruleset.rules.chapter3.SortRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_DECLARATIONS_ORDER +import com.saveourtool.diktat.ruleset.rules.chapter3.SortRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringConcatenationRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringConcatenationRuleFixTest.kt similarity index 63% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringConcatenationRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringConcatenationRuleFixTest.kt index 2705a85f33..71bbb481d5 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringConcatenationRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringConcatenationRuleFixTest.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.StringConcatenationRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.StringConcatenationRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringConcatenationWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringConcatenationWarnTest.kt similarity index 94% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringConcatenationWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringConcatenationWarnTest.kt index 74dfc8caea..0e0a5d4b8c 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringConcatenationWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringConcatenationWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.StringConcatenationRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.StringConcatenationRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringTemplateRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringTemplateRuleFixTest.kt similarity index 69% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringTemplateRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringTemplateRuleFixTest.kt index 6f584924a9..561291ea9f 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringTemplateRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringTemplateRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.StringTemplateFormatRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.StringTemplateFormatRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringTemplateRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringTemplateRuleWarnTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringTemplateRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringTemplateRuleWarnTest.kt index 1b4a39457e..dbcce5bf03 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/StringTemplateRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/StringTemplateRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.StringTemplateFormatRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.StringTemplateFormatRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.STRING_TEMPLATE_CURLY_BRACES import generated.WarningNames.STRING_TEMPLATE_QUOTES import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/TrailingCommaFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/TrailingCommaFixTest.kt similarity index 73% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/TrailingCommaFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/TrailingCommaFixTest.kt index 226b478ca2..7ffc479621 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/TrailingCommaFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/TrailingCommaFixTest.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_COMMON -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.TrailingCommaRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_COMMON +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.TrailingCommaRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/TrailingCommaWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/TrailingCommaWarnTest.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/TrailingCommaWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/TrailingCommaWarnTest.kt index 2648b658cb..812649f3c9 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/TrailingCommaWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/TrailingCommaWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TRAILING_COMMA -import org.cqfn.diktat.ruleset.rules.chapter3.TrailingCommaRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TRAILING_COMMA +import com.saveourtool.diktat.ruleset.rules.chapter3.TrailingCommaRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/WhenMustHaveElseFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/WhenMustHaveElseFixTest.kt similarity index 68% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/WhenMustHaveElseFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/WhenMustHaveElseFixTest.kt index 6a91e4685d..70cc6cdf04 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/WhenMustHaveElseFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/WhenMustHaveElseFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.ruleset.rules.chapter3.WhenMustHaveElseRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.WhenMustHaveElseRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/WhenMustHaveElseWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/WhenMustHaveElseWarnTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/WhenMustHaveElseWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/WhenMustHaveElseWarnTest.kt index 19bf67e6d6..c0ad783a26 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/WhenMustHaveElseWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/WhenMustHaveElseWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3 +package com.saveourtool.diktat.ruleset.chapter3 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.WhenMustHaveElseRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.WhenMustHaveElseRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/BlankLinesFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/BlankLinesFixTest.kt similarity index 83% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/BlankLinesFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/BlankLinesFixTest.kt index 7855629c65..35e54c21cb 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/BlankLinesFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/BlankLinesFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3.files +package com.saveourtool.diktat.ruleset.chapter3.files -import org.cqfn.diktat.ruleset.rules.chapter3.files.BlankLinesRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.files.BlankLinesRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/BlankLinesWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/BlankLinesWarnTest.kt similarity index 89% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/BlankLinesWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/BlankLinesWarnTest.kt index 0683e9aaa1..9d460f2cf1 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/BlankLinesWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/BlankLinesWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3.files +package com.saveourtool.diktat.ruleset.chapter3.files -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.TOO_MANY_BLANK_LINES -import org.cqfn.diktat.ruleset.rules.chapter3.files.BlankLinesRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.TOO_MANY_BLANK_LINES +import com.saveourtool.diktat.ruleset.rules.chapter3.files.BlankLinesRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/NewlinesRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/NewlinesRuleFixTest.kt similarity index 90% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/NewlinesRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/NewlinesRuleFixTest.kt index 80232ddc10..b4d2ef096c 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/NewlinesRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/NewlinesRuleFixTest.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.chapter3.files +package com.saveourtool.diktat.ruleset.chapter3.files -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.files.NewlinesRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.files.NewlinesRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/NewlinesRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/NewlinesRuleWarnTest.kt similarity index 98% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/NewlinesRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/NewlinesRuleWarnTest.kt index ddf367f914..8bacd5c5ae 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/NewlinesRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/NewlinesRuleWarnTest.kt @@ -1,14 +1,14 @@ -package org.cqfn.diktat.ruleset.chapter3.files +package com.saveourtool.diktat.ruleset.chapter3.files -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.COMPLEX_EXPRESSION -import org.cqfn.diktat.ruleset.constants.Warnings.REDUNDANT_SEMICOLON -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_NEWLINES -import org.cqfn.diktat.ruleset.rules.chapter3.files.NewlinesRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.COMPLEX_EXPRESSION +import com.saveourtool.diktat.ruleset.constants.Warnings.REDUNDANT_SEMICOLON +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_NEWLINES +import com.saveourtool.diktat.ruleset.rules.chapter3.files.NewlinesRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Tag @@ -65,10 +65,10 @@ class NewlinesRuleWarnTest : LintTestBase(::NewlinesRule) { fun `should not false positively trigger on dots in package directive and imports`() { lintMethod( """ - |package org.cqfn.diktat.example + |package com.saveourtool.diktat.example | - |import org.cqfn.diktat.Foo - |import org.cqfn.diktat.example.* + |import com.saveourtool.diktat.Foo + |import com.saveourtool.diktat.example.* """.trimMargin() ) } diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/TopLevelOrderRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/TopLevelOrderRuleFixTest.kt similarity index 75% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/TopLevelOrderRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/TopLevelOrderRuleFixTest.kt index 4b6d875b60..9bb8b9253a 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/TopLevelOrderRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/TopLevelOrderRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3.files +package com.saveourtool.diktat.ruleset.chapter3.files -import org.cqfn.diktat.ruleset.rules.chapter3.files.TopLevelOrderRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.files.TopLevelOrderRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/TopLevelOrderRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/TopLevelOrderRuleWarnTest.kt similarity index 83% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/TopLevelOrderRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/TopLevelOrderRuleWarnTest.kt index ae27a0a46e..fcdc305575 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/files/TopLevelOrderRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/files/TopLevelOrderRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3.files +package com.saveourtool.diktat.ruleset.chapter3.files -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.TOP_LEVEL_ORDER -import org.cqfn.diktat.ruleset.rules.chapter3.files.TopLevelOrderRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.TOP_LEVEL_ORDER +import com.saveourtool.diktat.ruleset.rules.chapter3.files.TopLevelOrderRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/ExpectedIndentationError.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/ExpectedIndentationError.kt similarity index 77% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/ExpectedIndentationError.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/ExpectedIndentationError.kt index a8391784e0..836b44ed05 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/ExpectedIndentationError.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/ExpectedIndentationError.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces +package com.saveourtool.diktat.ruleset.chapter3.spaces -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_INDENTATION -import org.cqfn.diktat.ruleset.junit.ExpectedLintError -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationRule.Companion.NAME_ID -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_INDENTATION +import com.saveourtool.diktat.ruleset.junit.ExpectedLintError +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationRule.Companion.NAME_ID +import com.saveourtool.diktat.api.DiktatError /** * The expected indentation error (extracted from annotated code fragments). diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationConfigAwareTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationConfigAwareTest.kt similarity index 87% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationConfigAwareTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationConfigAwareTest.kt index 166e5617f5..7c5831a70d 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationConfigAwareTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationConfigAwareTest.kt @@ -1,20 +1,20 @@ @file:Suppress("FILE_UNORDERED_IMPORTS")// False positives, see #1494. -package org.cqfn.diktat.ruleset.chapter3.spaces +package com.saveourtool.diktat.ruleset.chapter3.spaces -import org.cqfn.diktat.ruleset.junit.NaturalDisplayName -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationAmount.EXTENDED -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationAmount.NONE -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationAmount.SINGLE -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationConfigAware.Factory.withIndentationConfig -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.INDENTATION_SIZE +import com.saveourtool.diktat.ruleset.junit.NaturalDisplayName +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationAmount.EXTENDED +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationAmount.NONE +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationAmount.SINGLE +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationConfigAware.Factory.withIndentationConfig +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.INDENTATION_SIZE import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.TestMethodOrder import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.ValueSource -import org.cqfn.diktat.ruleset.chapter3.spaces.IndentationConfigFactory as IndentationConfig +import com.saveourtool.diktat.ruleset.chapter3.spaces.IndentationConfigFactory as IndentationConfig @TestMethodOrder(NaturalDisplayName::class) class IndentationConfigAwareTest { diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationConfigFactory.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationConfigFactory.kt similarity index 82% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationConfigFactory.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationConfigFactory.kt index 5881a07164..3bdc5cb4a2 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationConfigFactory.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationConfigFactory.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces +package com.saveourtool.diktat.ruleset.chapter3.spaces -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig internal object IndentationConfigFactory { /** diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleFixTest.kt similarity index 86% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleFixTest.kt index 75cfdd41be..eae8025ea7 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleFixTest.kt @@ -1,19 +1,19 @@ @file:Suppress("FILE_UNORDERED_IMPORTS")// False positives, see #1494. -package org.cqfn.diktat.ruleset.chapter3.spaces - -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_INDENTATION -import org.cqfn.diktat.ruleset.junit.NaturalDisplayName -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationRule -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.ALIGNED_PARAMETERS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_AFTER_OPERATORS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_BEFORE_DOT -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_FOR_EXPRESSION_BODIES -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_OF_PARAMETERS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.NEWLINE_AT_END -import org.cqfn.diktat.test.framework.processing.FileComparisonResult -import org.cqfn.diktat.util.FixTestBase +package com.saveourtool.diktat.ruleset.chapter3.spaces + +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_INDENTATION +import com.saveourtool.diktat.ruleset.junit.NaturalDisplayName +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationRule +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.ALIGNED_PARAMETERS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_AFTER_OPERATORS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_BEFORE_DOT +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_FOR_EXPRESSION_BODIES +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_OF_PARAMETERS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.NEWLINE_AT_END +import com.saveourtool.diktat.test.framework.processing.FileComparisonResult +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.assertj.core.api.Assertions.assertThat @@ -25,7 +25,7 @@ import org.junit.jupiter.api.TestMethodOrder import org.junit.jupiter.api.io.TempDir import java.nio.file.Path -import org.cqfn.diktat.ruleset.chapter3.spaces.IndentationConfigFactory as IndentationConfig +import com.saveourtool.diktat.ruleset.chapter3.spaces.IndentationConfigFactory as IndentationConfig /** * Legacy indentation tests. diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleTest.kt similarity index 99% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleTest.kt index be7dedd305..ecc4269256 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleTest.kt @@ -1,12 +1,12 @@ @file:Suppress("FILE_IS_TOO_LONG") -package org.cqfn.diktat.ruleset.chapter3.spaces +package com.saveourtool.diktat.ruleset.chapter3.spaces -import org.cqfn.diktat.ruleset.chapter3.spaces.junit.IndentationTest -import org.cqfn.diktat.ruleset.chapter3.spaces.junit.IndentedSourceCode -import org.cqfn.diktat.ruleset.junit.BooleanOrDefault.FALSE -import org.cqfn.diktat.ruleset.junit.BooleanOrDefault.TRUE -import org.cqfn.diktat.ruleset.junit.NaturalDisplayName +import com.saveourtool.diktat.ruleset.chapter3.spaces.junit.IndentationTest +import com.saveourtool.diktat.ruleset.chapter3.spaces.junit.IndentedSourceCode +import com.saveourtool.diktat.ruleset.junit.BooleanOrDefault.FALSE +import com.saveourtool.diktat.ruleset.junit.BooleanOrDefault.TRUE +import com.saveourtool.diktat.ruleset.junit.NaturalDisplayName import org.junit.jupiter.api.Nested import org.junit.jupiter.api.TestMethodOrder @@ -587,13 +587,13 @@ class IndentationRuleTest { first = IndentedSourceCode( """ const val FOO = 1 - + const val BAR = 2 - + const val BAZ = 4 - + fun acceptInteger(arg: Int) = Unit - + fun main() { acceptInteger(FOO or BAR or BAZ or FOO or BAR or BAZ or FOO or BAR or BAZ or FOO or BAR or BAZ or FOO or BAR or BAZ or // diktat:WRONG_INDENTATION[expectedIndent = 12] @@ -624,11 +624,11 @@ class IndentationRuleTest { first = IndentedSourceCode( """ const val TRUE = true - + const val FALSE = false - + fun acceptBoolean(arg: Boolean) = Unit - + fun f() { acceptBoolean(TRUE || FALSE || // diktat:WRONG_INDENTATION[expectedIndent = 12] @@ -672,7 +672,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ infix fun Int.combineWith(that: Int) = this + that - + fun f() { val x = 1 combineWith 2 combineWith // diktat:WRONG_INDENTATION[expectedIndent = 12] @@ -800,7 +800,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun identity(t: T): T = t - + val value4 = identity(1 to 2 to // diktat:WRONG_INDENTATION[expectedIndent = 8] 3) // diktat:WRONG_INDENTATION[expectedIndent = 8] @@ -821,7 +821,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun identity(t: T): T = t - + val value5 = identity( 1 to 2 to // diktat:WRONG_INDENTATION[expectedIndent = 12] @@ -844,7 +844,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun identity(t: T): T = t - + val value6 = identity(1 to 2 to // diktat:WRONG_INDENTATION[expectedIndent = 12] @@ -867,7 +867,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun identity(t: T): T = t - + /** * Line breaks: * @@ -906,7 +906,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun identity(t: T): T = t - + val value8 = identity(identity(1 to 2 to // diktat:WRONG_INDENTATION[expectedIndent = 8] 3)) // diktat:WRONG_INDENTATION[expectedIndent = 8] @@ -927,7 +927,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun identity(t: T): T = t - + val value9 = identity(identity( 1 to 2 to // diktat:WRONG_INDENTATION[expectedIndent = 12] @@ -950,7 +950,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun identity(t: T): T = t - + val value10 = identity(identity(1 to 2 to // diktat:WRONG_INDENTATION[expectedIndent = 12] @@ -973,7 +973,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun identity(t: T): T = t - + val value11 = identity(identity( 1 to @@ -1044,7 +1044,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun identity(t: T): T = t - + // Same as above, but using a custom getter instead of an explicit initializer. val value14 get() = @@ -1071,7 +1071,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun identity(t: T): T = t - + // Same as above, but using a custom getter instead of an explicit initializer. val value15 get() = @@ -1136,7 +1136,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun f() { - // The dot-qualified expression is always single-indented. + // The dot-qualified expression is always single-indented. "" .length as Int // diktat:WRONG_INDENTATION[expectedIndent = 12] @@ -1146,7 +1146,7 @@ class IndentationRuleTest { second = IndentedSourceCode( """ fun f() { - // The dot-qualified expression is always single-indented. + // The dot-qualified expression is always single-indented. "" .length as Int // diktat:WRONG_INDENTATION[expectedIndent = 8] @@ -1708,7 +1708,7 @@ class IndentationRuleTest { first = IndentedSourceCode( """ fun f() { - // The dot-qualified expression is always single-indented. + // The dot-qualified expression is always single-indented. "" .length as Int // diktat:WRONG_INDENTATION[expectedIndent = 12] @@ -1718,7 +1718,7 @@ class IndentationRuleTest { second = IndentedSourceCode( """ fun f() { - // The dot-qualified expression is always single-indented. + // The dot-qualified expression is always single-indented. "" .length as Int // diktat:WRONG_INDENTATION[expectedIndent = 8] diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleTestSuite.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleTestSuite.kt similarity index 84% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleTestSuite.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleTestSuite.kt index bc222da8ee..dc32faaa58 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleTestSuite.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleTestSuite.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces +package com.saveourtool.diktat.ruleset.chapter3.spaces import org.junit.platform.suite.api.SelectClasses import org.junit.platform.suite.api.Suite diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleTestUtils.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleTestUtils.kt similarity index 68% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleTestUtils.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleTestUtils.kt index ceaa333dc1..19eb7c0eda 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleTestUtils.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleTestUtils.kt @@ -1,19 +1,19 @@ @file:JvmName("IndentationRuleTestUtils") @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package org.cqfn.diktat.ruleset.chapter3.spaces +package com.saveourtool.diktat.ruleset.chapter3.spaces -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_INDENTATION -import org.cqfn.diktat.ruleset.utils.NEWLINE -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.ALIGNED_PARAMETERS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_AFTER_OPERATORS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_BEFORE_DOT -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_FOR_EXPRESSION_BODIES -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_OF_PARAMETERS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.INDENTATION_SIZE -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.NEWLINE_AT_END +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_INDENTATION +import com.saveourtool.diktat.ruleset.utils.NEWLINE +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.ALIGNED_PARAMETERS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_AFTER_OPERATORS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_BEFORE_DOT +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_FOR_EXPRESSION_BODIES +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_OF_PARAMETERS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.INDENTATION_SIZE +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.NEWLINE_AT_END /** * @param configEntries the optional values which override the state of this diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt similarity index 94% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt index 35d2ebc6db..e6c0448c6b 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/IndentationRuleWarnTest.kt @@ -1,20 +1,20 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces - -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_INDENTATION -import org.cqfn.diktat.ruleset.junit.NaturalDisplayName -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationRule -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.ALIGNED_PARAMETERS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_AFTER_OPERATORS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_BEFORE_DOT -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_FOR_EXPRESSION_BODIES -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_OF_PARAMETERS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.INDENTATION_SIZE -import org.cqfn.diktat.util.LintTestBase -import org.cqfn.diktat.util.TEST_FILE_NAME - -import org.cqfn.diktat.api.DiktatError +package com.saveourtool.diktat.ruleset.chapter3.spaces + +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_INDENTATION +import com.saveourtool.diktat.ruleset.junit.NaturalDisplayName +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationRule +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.ALIGNED_PARAMETERS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_AFTER_OPERATORS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_BEFORE_DOT +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_FOR_EXPRESSION_BODIES +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_OF_PARAMETERS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.INDENTATION_SIZE +import com.saveourtool.diktat.util.LintTestBase +import com.saveourtool.diktat.util.TEST_FILE_NAME + +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -709,7 +709,7 @@ class IndentationRuleWarnTest : LintTestBase(::IndentationRule) { | """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" + fileName = "src/main/kotlin/com/saveourtool/diktat/Example.kts" ) } @@ -722,7 +722,7 @@ class IndentationRuleWarnTest : LintTestBase(::IndentationRule) { | """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/build.gradle.kts" + fileName = "src/main/kotlin/com/saveourtool/diktat/build.gradle.kts" ) } diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleFixTest.kt similarity index 91% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleFixTest.kt index a4560c373a..5047ce28ad 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces +package com.saveourtool.diktat.ruleset.chapter3.spaces -import org.cqfn.diktat.ruleset.rules.chapter3.files.WhiteSpaceRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter3.files.WhiteSpaceRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleWarnTest.kt similarity index 98% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleWarnTest.kt index 98f533f914..27975b02fa 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/WhiteSpaceRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces +package com.saveourtool.diktat.ruleset.chapter3.spaces -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_WHITESPACE -import org.cqfn.diktat.ruleset.rules.chapter3.files.WhiteSpaceRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_WHITESPACE +import com.saveourtool.diktat.ruleset.rules.chapter3.files.WhiteSpaceRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTest.kt similarity index 94% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTest.kt index 3c34aff3a2..240ac5e419 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces.junit +package com.saveourtool.diktat.ruleset.chapter3.spaces.junit import generated.WarningNames.WRONG_INDENTATION import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestExtension.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestExtension.kt similarity index 76% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestExtension.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestExtension.kt index 0fb0d274d3..89a126aca1 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestExtension.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestExtension.kt @@ -1,11 +1,11 @@ @file:Suppress("FILE_UNORDERED_IMPORTS")// False positives, see #1494. -package org.cqfn.diktat.ruleset.chapter3.spaces.junit +package com.saveourtool.diktat.ruleset.chapter3.spaces.junit -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.NEWLINE_AT_END +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.NEWLINE_AT_END import org.intellij.lang.annotations.Language import org.junit.jupiter.api.extension.BeforeTestExecutionCallback -import org.cqfn.diktat.ruleset.chapter3.spaces.IndentationConfigFactory as IndentationConfig +import com.saveourtool.diktat.ruleset.chapter3.spaces.IndentationConfigFactory as IndentationConfig /** * The common super-interface for indentation-specific `Extension` diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixExtension.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixExtension.kt similarity index 81% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixExtension.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixExtension.kt index 147f1fe2f4..aea6f3ceb1 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixExtension.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixExtension.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces.junit +package com.saveourtool.diktat.ruleset.chapter3.spaces.junit -import org.cqfn.diktat.ruleset.chapter3.spaces.asRulesConfigList -import org.cqfn.diktat.ruleset.chapter3.spaces.describe -import org.cqfn.diktat.ruleset.chapter3.spaces.withCustomParameters -import org.cqfn.diktat.ruleset.junit.CloseablePath -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.chapter3.spaces.asRulesConfigList +import com.saveourtool.diktat.ruleset.chapter3.spaces.describe +import com.saveourtool.diktat.ruleset.chapter3.spaces.withCustomParameters +import com.saveourtool.diktat.ruleset.junit.CloseablePath +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationRule +import com.saveourtool.diktat.util.FixTestBase import org.assertj.core.api.Assertions.assertThat import org.intellij.lang.annotations.Language import org.junit.jupiter.api.extension.BeforeEachCallback diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixInvocationContext.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixInvocationContext.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixInvocationContext.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixInvocationContext.kt index f3d8388a12..d9044d9067 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixInvocationContext.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestFixInvocationContext.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces.junit +package com.saveourtool.diktat.ruleset.chapter3.spaces.junit import org.intellij.lang.annotations.Language import org.junit.jupiter.api.extension.Extension diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestInput.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestInput.kt similarity index 68% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestInput.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestInput.kt index 576bb32039..9826ceff3e 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestInput.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestInput.kt @@ -1,13 +1,13 @@ @file:Suppress("FILE_UNORDERED_IMPORTS")// False positives, see #1494. -package org.cqfn.diktat.ruleset.chapter3.spaces.junit +package com.saveourtool.diktat.ruleset.chapter3.spaces.junit -import org.cqfn.diktat.ruleset.chapter3.spaces.ExpectedIndentationError -import org.cqfn.diktat.ruleset.chapter3.spaces.withCustomParameters -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.NEWLINE_AT_END +import com.saveourtool.diktat.ruleset.chapter3.spaces.ExpectedIndentationError +import com.saveourtool.diktat.ruleset.chapter3.spaces.withCustomParameters +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.NEWLINE_AT_END import org.intellij.lang.annotations.Language import java.util.SortedMap -import org.cqfn.diktat.ruleset.chapter3.spaces.IndentationConfigFactory as IndentationConfig +import com.saveourtool.diktat.ruleset.chapter3.spaces.IndentationConfigFactory as IndentationConfig /** * The test data for indentation tests, extracted from annotations. diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContext.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContext.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContext.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContext.kt index 55db90e727..a4523d8f53 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContext.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContext.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces.junit +package com.saveourtool.diktat.ruleset.chapter3.spaces.junit import org.intellij.lang.annotations.Language import org.junit.jupiter.api.extension.TestTemplateInvocationContext diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContextProvider.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContextProvider.kt similarity index 90% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContextProvider.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContextProvider.kt index 2bee3d4f0f..cbb0406e55 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContextProvider.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestInvocationContextProvider.kt @@ -1,14 +1,14 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces.junit - -import org.cqfn.diktat.ruleset.chapter3.spaces.ExpectedIndentationError -import org.cqfn.diktat.ruleset.junit.RuleInvocationContextProvider -import org.cqfn.diktat.ruleset.utils.NEWLINE -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_AFTER_OPERATORS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_BEFORE_DOT -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_FOR_EXPRESSION_BODIES -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_OF_PARAMETERS -import org.cqfn.diktat.ruleset.utils.leadingSpaceCount -import org.cqfn.diktat.util.assertNotNull +package com.saveourtool.diktat.ruleset.chapter3.spaces.junit + +import com.saveourtool.diktat.ruleset.chapter3.spaces.ExpectedIndentationError +import com.saveourtool.diktat.ruleset.junit.RuleInvocationContextProvider +import com.saveourtool.diktat.ruleset.utils.NEWLINE +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_AFTER_OPERATORS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_BEFORE_DOT +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_FOR_EXPRESSION_BODIES +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_OF_PARAMETERS +import com.saveourtool.diktat.ruleset.utils.leadingSpaceCount +import com.saveourtool.diktat.util.assertNotNull import generated.WarningNames.WRONG_INDENTATION import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.fail diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnExtension.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnExtension.kt similarity index 91% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnExtension.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnExtension.kt index f469f16915..4d9a751365 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnExtension.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnExtension.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces.junit +package com.saveourtool.diktat.ruleset.chapter3.spaces.junit -import org.cqfn.diktat.ruleset.chapter3.spaces.asRulesConfigList -import org.cqfn.diktat.ruleset.chapter3.spaces.withCustomParameters -import org.cqfn.diktat.ruleset.rules.chapter3.files.IndentationRule -import org.cqfn.diktat.ruleset.utils.NEWLINE -import org.cqfn.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.ruleset.chapter3.spaces.asRulesConfigList +import com.saveourtool.diktat.ruleset.chapter3.spaces.withCustomParameters +import com.saveourtool.diktat.ruleset.rules.chapter3.files.IndentationRule +import com.saveourtool.diktat.ruleset.utils.NEWLINE +import com.saveourtool.diktat.util.LintTestBase +import com.saveourtool.diktat.api.DiktatError import org.assertj.core.api.Assertions.assertThat import org.intellij.lang.annotations.Language import org.junit.jupiter.api.extension.ExtensionContext diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnInvocationContext.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnInvocationContext.kt similarity index 86% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnInvocationContext.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnInvocationContext.kt index ffb81601e0..043972bb3d 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnInvocationContext.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentationTestWarnInvocationContext.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces.junit +package com.saveourtool.diktat.ruleset.chapter3.spaces.junit -import org.cqfn.diktat.ruleset.chapter3.spaces.ExpectedIndentationError -import org.cqfn.diktat.ruleset.junit.ExpectedLintError +import com.saveourtool.diktat.ruleset.chapter3.spaces.ExpectedIndentationError +import com.saveourtool.diktat.ruleset.junit.ExpectedLintError import org.intellij.lang.annotations.Language import org.junit.jupiter.api.extension.Extension import java.util.SortedMap diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentedSourceCode.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentedSourceCode.kt similarity index 88% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentedSourceCode.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentedSourceCode.kt index f18b413300..a6e8c6a1f0 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter3/spaces/junit/IndentedSourceCode.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter3/spaces/junit/IndentedSourceCode.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter3.spaces.junit +package com.saveourtool.diktat.ruleset.chapter3.spaces.junit -import org.cqfn.diktat.ruleset.junit.BooleanOrDefault -import org.cqfn.diktat.ruleset.junit.BooleanOrDefault.DEFAULT +import com.saveourtool.diktat.ruleset.junit.BooleanOrDefault +import com.saveourtool.diktat.ruleset.junit.BooleanOrDefault.DEFAULT import org.intellij.lang.annotations.Language import kotlin.annotation.AnnotationRetention.RUNTIME diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/AccurateCalculationsWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/AccurateCalculationsWarnTest.kt similarity index 94% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/AccurateCalculationsWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/AccurateCalculationsWarnTest.kt index 695afa152a..016605cbb2 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/AccurateCalculationsWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/AccurateCalculationsWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter4 +package com.saveourtool.diktat.ruleset.chapter4 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.FLOAT_IN_ACCURATE_CALCULATIONS -import org.cqfn.diktat.ruleset.rules.chapter4.calculations.AccurateCalculationsRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.FLOAT_IN_ACCURATE_CALCULATIONS +import com.saveourtool.diktat.ruleset.rules.chapter4.calculations.AccurateCalculationsRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/NoVarRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/NoVarRuleWarnTest.kt similarity index 86% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/NoVarRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/NoVarRuleWarnTest.kt index 32c6f7aadd..989f32e4e6 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/NoVarRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/NoVarRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter4 +package com.saveourtool.diktat.ruleset.chapter4 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter4.ImmutableValNoVarRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter4.ImmutableValNoVarRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.SAY_NO_TO_VAR import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/NullChecksRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/NullChecksRuleFixTest.kt similarity index 85% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/NullChecksRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/NullChecksRuleFixTest.kt index f97bf3ebdb..9ae50ec5f3 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/NullChecksRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/NullChecksRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter4 +package com.saveourtool.diktat.ruleset.chapter4 -import org.cqfn.diktat.ruleset.rules.chapter4.NullChecksRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter4.NullChecksRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/NullChecksRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/NullChecksRuleWarnTest.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/NullChecksRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/NullChecksRuleWarnTest.kt index 75972059fb..e510491694 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/NullChecksRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/NullChecksRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter4 +package com.saveourtool.diktat.ruleset.chapter4 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter4.NullChecksRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter4.NullChecksRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/SmartCastRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/SmartCastRuleFixTest.kt similarity index 60% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/SmartCastRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/SmartCastRuleFixTest.kt index 99bcef5c59..01af3e1038 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/SmartCastRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/SmartCastRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter4 +package com.saveourtool.diktat.ruleset.chapter4 -import org.cqfn.diktat.ruleset.rules.chapter4.SmartCastRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter4.SmartCastRule +import com.saveourtool.diktat.util.FixTestBase import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/SmartCastRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/SmartCastRuleWarnTest.kt similarity index 97% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/SmartCastRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/SmartCastRuleWarnTest.kt index 33a928643a..9811083402 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/SmartCastRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/SmartCastRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter4 +package com.saveourtool.diktat.ruleset.chapter4 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter4.SmartCastRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter4.SmartCastRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.SMART_CAST_NEEDED import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/TypeAliasRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/TypeAliasRuleWarnTest.kt similarity index 91% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/TypeAliasRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/TypeAliasRuleWarnTest.kt index dd73333f62..77d1bb08ac 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/TypeAliasRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/TypeAliasRuleWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter4 +package com.saveourtool.diktat.ruleset.chapter4 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TYPE_ALIAS -import org.cqfn.diktat.ruleset.rules.chapter4.TypeAliasRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TYPE_ALIAS +import com.saveourtool.diktat.ruleset.rules.chapter4.TypeAliasRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleFixTest.kt similarity index 70% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleFixTest.kt index 25b089f83d..cda95a8c73 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter4 +package com.saveourtool.diktat.ruleset.chapter4 -import org.cqfn.diktat.ruleset.rules.chapter4.VariableGenericTypeDeclarationRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter4.VariableGenericTypeDeclarationRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleWarnTest.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleWarnTest.kt index 4a82e31c23..e7274706f7 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter4/VariableGenericTypeDeclarationRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter4 +package com.saveourtool.diktat.ruleset.chapter4 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter4.VariableGenericTypeDeclarationRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter4.VariableGenericTypeDeclarationRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.GENERIC_VARIABLE_WRONG_DECLARATION import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AsyncAndSyncRuleTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/AsyncAndSyncRuleTest.kt similarity index 85% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AsyncAndSyncRuleTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/AsyncAndSyncRuleTest.kt index 73e6d1d2a7..ff8464eec9 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AsyncAndSyncRuleTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/AsyncAndSyncRuleTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.RUN_BLOCKING_INSIDE_ASYNC -import org.cqfn.diktat.ruleset.rules.chapter5.AsyncAndSyncRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.RUN_BLOCKING_INSIDE_ASYNC +import com.saveourtool.diktat.ruleset.rules.chapter5.AsyncAndSyncRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AvoidNestedFunctionsFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/AvoidNestedFunctionsFixTest.kt similarity index 82% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AvoidNestedFunctionsFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/AvoidNestedFunctionsFixTest.kt index 31f089403e..88ac774449 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AvoidNestedFunctionsFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/AvoidNestedFunctionsFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.ruleset.rules.chapter5.AvoidNestedFunctionsRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter5.AvoidNestedFunctionsRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt similarity index 88% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt index 5021207640..e387a03ccb 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/AvoidNestedFunctionsWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter5.AvoidNestedFunctionsRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter5.AvoidNestedFunctionsRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.AVOID_NESTED_FUNCTIONS import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -39,7 +39,7 @@ class AvoidNestedFunctionsWarnTest : LintTestBase(::AvoidNestedFunctionsRule) { @Tag(AVOID_NESTED_FUNCTIONS) fun `anonymous function`() { val code = """ - package org.cqfn.diktat.test + package com.saveourtool.diktat.test fun foo() { val sum: (Int) -> Int = fun(x): Int = x + x diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/CheckInverseMethodRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/CheckInverseMethodRuleFixTest.kt similarity index 71% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/CheckInverseMethodRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/CheckInverseMethodRuleFixTest.kt index fdf49b9e1d..128f27f0eb 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/CheckInverseMethodRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/CheckInverseMethodRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.ruleset.rules.chapter5.CheckInverseMethodRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter5.CheckInverseMethodRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames.INVERSE_FUNCTION_PREFERRED import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/CheckInverseMethodRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/CheckInverseMethodRuleWarnTest.kt similarity index 86% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/CheckInverseMethodRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/CheckInverseMethodRuleWarnTest.kt index 65ed43b934..1a3cc419eb 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/CheckInverseMethodRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/CheckInverseMethodRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter5.CheckInverseMethodRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter5.CheckInverseMethodRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.INVERSE_FUNCTION_PREFERRED import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/CustomLabelsTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/CustomLabelsTest.kt similarity index 86% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/CustomLabelsTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/CustomLabelsTest.kt index 30c1bce39f..aae5a31abf 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/CustomLabelsTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/CustomLabelsTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.CUSTOM_LABEL -import org.cqfn.diktat.ruleset.rules.chapter5.CustomLabel -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.CUSTOM_LABEL +import com.saveourtool.diktat.ruleset.rules.chapter5.CustomLabel +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/FunctionArgumentsSizeWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/FunctionArgumentsSizeWarnTest.kt similarity index 81% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/FunctionArgumentsSizeWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/FunctionArgumentsSizeWarnTest.kt index 7abf997cb5..085f350c14 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/FunctionArgumentsSizeWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/FunctionArgumentsSizeWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TOO_MANY_PARAMETERS -import org.cqfn.diktat.ruleset.rules.chapter5.FunctionArgumentsSize -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TOO_MANY_PARAMETERS +import com.saveourtool.diktat.ruleset.rules.chapter5.FunctionArgumentsSize +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/FunctionLengthWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/FunctionLengthWarnTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/FunctionLengthWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/FunctionLengthWarnTest.kt index 3d2b72345c..685b558e9d 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/FunctionLengthWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/FunctionLengthWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.TOO_LONG_FUNCTION -import org.cqfn.diktat.ruleset.rules.chapter5.FunctionLength -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.TOO_LONG_FUNCTION +import com.saveourtool.diktat.ruleset.rules.chapter5.FunctionLength +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/LambdaLengthWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/LambdaLengthWarnTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/LambdaLengthWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/LambdaLengthWarnTest.kt index 8789dd1aaa..a2edb009cd 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/LambdaLengthWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/LambdaLengthWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter5.LambdaLengthRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter5.LambdaLengthRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/LambdaParameterOrderWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/LambdaParameterOrderWarnTest.kt similarity index 75% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/LambdaParameterOrderWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/LambdaParameterOrderWarnTest.kt index d2570923c4..a09bd5f433 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/LambdaParameterOrderWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/LambdaParameterOrderWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.LAMBDA_IS_NOT_LAST_PARAMETER -import org.cqfn.diktat.ruleset.rules.chapter5.LambdaParameterOrder -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.LAMBDA_IS_NOT_LAST_PARAMETER +import com.saveourtool.diktat.ruleset.rules.chapter5.LambdaParameterOrder +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/NestedFunctionBlockWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/NestedFunctionBlockWarnTest.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/NestedFunctionBlockWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/NestedFunctionBlockWarnTest.kt index ab6af28dec..ba6cc8c485 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/NestedFunctionBlockWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/NestedFunctionBlockWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.NESTED_BLOCK -import org.cqfn.diktat.ruleset.rules.chapter5.NestedFunctionBlock -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.NESTED_BLOCK +import com.saveourtool.diktat.ruleset.rules.chapter5.NestedFunctionBlock +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/OverloadingArgumentsFunctionWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/OverloadingArgumentsFunctionWarnTest.kt similarity index 94% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/OverloadingArgumentsFunctionWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/OverloadingArgumentsFunctionWarnTest.kt index 0271c3a210..fad3caee64 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/OverloadingArgumentsFunctionWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/OverloadingArgumentsFunctionWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_OVERLOADING_FUNCTION_ARGUMENTS -import org.cqfn.diktat.ruleset.rules.chapter5.OverloadingArgumentsFunction -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_OVERLOADING_FUNCTION_ARGUMENTS +import com.saveourtool.diktat.ruleset.rules.chapter5.OverloadingArgumentsFunction +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt index 14523a8f79..fe6a8c3c29 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter5/ParameterNameInOuterLambdaRuleWarnTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.ruleset.chapter5 +package com.saveourtool.diktat.ruleset.chapter5 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter5.ParameterNameInOuterLambdaRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter5.ParameterNameInOuterLambdaRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/AbstractClassesFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/AbstractClassesFixTest.kt similarity index 70% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/AbstractClassesFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/AbstractClassesFixTest.kt index ccbf59a0af..673b327939 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/AbstractClassesFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/AbstractClassesFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.ruleset.rules.chapter6.classes.AbstractClassesRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.AbstractClassesRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames.CLASS_SHOULD_NOT_BE_ABSTRACT import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/AbstractClassesWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/AbstractClassesWarnTest.kt similarity index 91% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/AbstractClassesWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/AbstractClassesWarnTest.kt index a137addde7..6f3d52e0ae 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/AbstractClassesWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/AbstractClassesWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter6.classes.AbstractClassesRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.AbstractClassesRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.CLASS_SHOULD_NOT_BE_ABSTRACT import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/AvoidUtilityClassWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/AvoidUtilityClassWarnTest.kt similarity index 88% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/AvoidUtilityClassWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/AvoidUtilityClassWarnTest.kt index 0a71424b09..7a6c456e2b 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/AvoidUtilityClassWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/AvoidUtilityClassWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.AVOID_USING_UTILITY_CLASS -import org.cqfn.diktat.ruleset.rules.chapter6.AvoidUtilityClass -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.AVOID_USING_UTILITY_CLASS +import com.saveourtool.diktat.ruleset.rules.chapter6.AvoidUtilityClass +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -111,7 +111,7 @@ class AvoidUtilityClassWarnTest : LintTestBase(::AvoidUtilityClass) { |} """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/Example.kt", + fileName = "src/main/kotlin/com/saveourtool/diktat/Example.kt", DiktatError(1, 1, ruleId, "${AVOID_USING_UTILITY_CLASS.warnText()} StringUtils"), ) lintMethodWithFile( @@ -124,7 +124,7 @@ class AvoidUtilityClassWarnTest : LintTestBase(::AvoidUtilityClass) { |} """.trimMargin(), tempDir = tempDir, - fileName = "src/test/kotlin/org/cqfn/diktat/Example.kt" + fileName = "src/test/kotlin/com/saveourtool/diktat/Example.kt" ) lintMethodWithFile( """ @@ -135,7 +135,7 @@ class AvoidUtilityClassWarnTest : LintTestBase(::AvoidUtilityClass) { |} """.trimMargin(), tempDir = tempDir, - fileName = "src/test/kotlin/org/cqfn/diktat/UtilTest.kt" + fileName = "src/test/kotlin/com/saveourtool/diktat/UtilTest.kt" ) } } diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/CompactInitializationFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/CompactInitializationFixTest.kt similarity index 90% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/CompactInitializationFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/CompactInitializationFixTest.kt index 2232e308b5..e82ceaf062 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/CompactInitializationFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/CompactInitializationFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.ruleset.rules.chapter6.classes.CompactInitialization -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.CompactInitialization +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/CompactInitializationWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/CompactInitializationWarnTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/CompactInitializationWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/CompactInitializationWarnTest.kt index 65144841d6..bdf588baad 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/CompactInitializationWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/CompactInitializationWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.COMPACT_OBJECT_INITIALIZATION -import org.cqfn.diktat.ruleset.rules.chapter6.classes.CompactInitialization -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.COMPACT_OBJECT_INITIALIZATION +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.CompactInitialization +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/CustomGetterSetterWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/CustomGetterSetterWarnTest.kt similarity index 90% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/CustomGetterSetterWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/CustomGetterSetterWarnTest.kt index 357e8ef892..5a12249803 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/CustomGetterSetterWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/CustomGetterSetterWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter6.CustomGetterSetterRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter6.CustomGetterSetterRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.CUSTOM_GETTERS_SETTERS import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/DataClassesRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/DataClassesRuleWarnTest.kt similarity index 96% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/DataClassesRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/DataClassesRuleWarnTest.kt index 1fb8fd3021..45846108ad 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/DataClassesRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/DataClassesRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter6.classes.DataClassesRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.DataClassesRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.USE_DATA_CLASS import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/EmptyPrimaryConstructorFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/EmptyPrimaryConstructorFixTest.kt similarity index 69% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/EmptyPrimaryConstructorFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/EmptyPrimaryConstructorFixTest.kt index 3fdf3e15a8..2e412dcc72 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/EmptyPrimaryConstructorFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/EmptyPrimaryConstructorFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.ruleset.rules.chapter6.AvoidEmptyPrimaryConstructor -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter6.AvoidEmptyPrimaryConstructor +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/EmptyPrimaryConstructorWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/EmptyPrimaryConstructorWarnTest.kt similarity index 82% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/EmptyPrimaryConstructorWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/EmptyPrimaryConstructorWarnTest.kt index d736cb6165..784bfd8b68 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/EmptyPrimaryConstructorWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/EmptyPrimaryConstructorWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.EMPTY_PRIMARY_CONSTRUCTOR -import org.cqfn.diktat.ruleset.rules.chapter6.AvoidEmptyPrimaryConstructor -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.EMPTY_PRIMARY_CONSTRUCTOR +import com.saveourtool.diktat.ruleset.rules.chapter6.AvoidEmptyPrimaryConstructor +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/ExtensionFunctionsInFileWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/ExtensionFunctionsInFileWarnTest.kt similarity index 91% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/ExtensionFunctionsInFileWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/ExtensionFunctionsInFileWarnTest.kt index becee8de0f..460454e7aa 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/ExtensionFunctionsInFileWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/ExtensionFunctionsInFileWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter6.ExtensionFunctionsInFileRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter6.ExtensionFunctionsInFileRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.EXTENSION_FUNCTION_WITH_CLASS import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/ExtensionFunctionsSameNameWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/ExtensionFunctionsSameNameWarnTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/ExtensionFunctionsSameNameWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/ExtensionFunctionsSameNameWarnTest.kt index 9bc6af81f7..6a7f957a11 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/ExtensionFunctionsSameNameWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/ExtensionFunctionsSameNameWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter6.ExtensionFunctionsSameNameRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter6.ExtensionFunctionsSameNameRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.EXTENSION_FUNCTION_SAME_SIGNATURE import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/ImplicitBackingPropertyWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/ImplicitBackingPropertyWarnTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/ImplicitBackingPropertyWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/ImplicitBackingPropertyWarnTest.kt index 3c8f9fa540..d07d40a1b5 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/ImplicitBackingPropertyWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/ImplicitBackingPropertyWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter6.ImplicitBackingPropertyRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter6.ImplicitBackingPropertyRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.NO_CORRESPONDING_PROPERTY import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/InlineClassesWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/InlineClassesWarnTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/InlineClassesWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/InlineClassesWarnTest.kt index a04eac0b45..a93d25a491 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/InlineClassesWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/InlineClassesWarnTest.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_COMMON -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.INLINE_CLASS_CAN_BE_USED -import org.cqfn.diktat.ruleset.rules.chapter6.classes.InlineClassesRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_COMMON +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.INLINE_CLASS_CAN_BE_USED +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.InlineClassesRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/PropertyAccessorFieldsWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/PropertyAccessorFieldsWarnTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/PropertyAccessorFieldsWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/PropertyAccessorFieldsWarnTest.kt index fb32babf7d..bb56fe69b4 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/PropertyAccessorFieldsWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/PropertyAccessorFieldsWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_NAME_OF_VARIABLE_INSIDE_ACCESSOR -import org.cqfn.diktat.ruleset.rules.chapter6.PropertyAccessorFields -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_NAME_OF_VARIABLE_INSIDE_ACCESSOR +import com.saveourtool.diktat.ruleset.rules.chapter6.PropertyAccessorFields +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/RunInScriptFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/RunInScriptFixTest.kt similarity index 68% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/RunInScriptFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/RunInScriptFixTest.kt index 5961acb89d..ea1536bbc5 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/RunInScriptFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/RunInScriptFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.ruleset.rules.chapter6.RunInScript -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter6.RunInScript +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/RunInScriptWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/RunInScriptWarnTest.kt similarity index 83% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/RunInScriptWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/RunInScriptWarnTest.kt index 20c4f90f5f..4876085cb1 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/RunInScriptWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/RunInScriptWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.RUN_IN_SCRIPT -import org.cqfn.diktat.ruleset.rules.chapter6.RunInScript -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.RUN_IN_SCRIPT +import com.saveourtool.diktat.ruleset.rules.chapter6.RunInScript +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test @@ -47,7 +47,7 @@ class RunInScriptWarnTest : LintTestBase(::RunInScript) { """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts", + fileName = "src/main/kotlin/com/saveourtool/diktat/Example.kts", DiktatError(10, 17, ruleId, "${RUN_IN_SCRIPT.warnText()} foo/*df*/()", true), DiktatError(12, 17, ruleId, "${RUN_IN_SCRIPT.warnText()} foo( //dfdg...", true), DiktatError(15, 17, ruleId, "${RUN_IN_SCRIPT.warnText()} println(\"hello\")", true), @@ -72,7 +72,7 @@ class RunInScriptWarnTest : LintTestBase(::RunInScript) { """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" + fileName = "src/main/kotlin/com/saveourtool/diktat/Example.kts" ) } @@ -92,7 +92,7 @@ class RunInScriptWarnTest : LintTestBase(::RunInScript) { } """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts" + fileName = "src/main/kotlin/com/saveourtool/diktat/Example.kts" ) } @@ -132,7 +132,7 @@ class RunInScriptWarnTest : LintTestBase(::RunInScript) { """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/builds.gradle.kts", + fileName = "src/main/kotlin/com/saveourtool/diktat/builds.gradle.kts", DiktatError(6, 17, ruleId, "${RUN_IN_SCRIPT.warnText()} if(true) {...", true) ) } @@ -153,7 +153,7 @@ class RunInScriptWarnTest : LintTestBase(::RunInScript) { foo().goo() """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/builds.gradle.kts" + fileName = "src/main/kotlin/com/saveourtool/diktat/builds.gradle.kts" ) } @@ -171,7 +171,7 @@ class RunInScriptWarnTest : LintTestBase(::RunInScript) { foo/*df*/() """.trimMargin(), tempDir = tempDir, - fileName = "src/main/kotlin/org/cqfn/diktat/Example.kts", + fileName = "src/main/kotlin/com/saveourtool/diktat/Example.kts", DiktatError(1, 17, ruleId, "${RUN_IN_SCRIPT.warnText()} version = \"0.1.0-SNAPSHOT\"", true), DiktatError(7, 17, ruleId, "${RUN_IN_SCRIPT.warnText()} foo/*df*/()", true) ) diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleConstructorRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleConstructorRuleFixTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleConstructorRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleConstructorRuleFixTest.kt index 9616300dea..d0ae7c5174 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleConstructorRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleConstructorRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.ruleset.rules.chapter6.classes.SingleConstructorRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.SingleConstructorRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleConstructorRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleConstructorRuleWarnTest.kt similarity index 75% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleConstructorRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleConstructorRuleWarnTest.kt index 82f3bfeef9..19fa94272c 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleConstructorRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleConstructorRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.SINGLE_CONSTRUCTOR_SHOULD_BE_PRIMARY -import org.cqfn.diktat.ruleset.rules.chapter6.classes.SingleConstructorRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.SINGLE_CONSTRUCTOR_SHOULD_BE_PRIMARY +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.SingleConstructorRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleInitRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleInitRuleFixTest.kt similarity index 83% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleInitRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleInitRuleFixTest.kt index 8dcb4a39f5..2e6146c895 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleInitRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleInitRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.ruleset.rules.chapter6.classes.SingleInitRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.SingleInitRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleInitRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleInitRuleWarnTest.kt similarity index 86% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleInitRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleInitRuleWarnTest.kt index c437eae931..3306274033 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/SingleInitRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/SingleInitRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter6.classes.SingleInitRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.SingleInitRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/StatelessClassesRuleFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/StatelessClassesRuleFixTest.kt similarity index 69% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/StatelessClassesRuleFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/StatelessClassesRuleFixTest.kt index 51987e0279..cb7f4a3db3 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/StatelessClassesRuleFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/StatelessClassesRuleFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.ruleset.rules.chapter6.classes.StatelessClassesRule -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.StatelessClassesRule +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames.OBJECT_IS_PREFERRED import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/StatelessClassesRuleWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/StatelessClassesRuleWarnTest.kt similarity index 84% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/StatelessClassesRuleWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/StatelessClassesRuleWarnTest.kt index 4d4ea0b795..7a51c586bc 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/StatelessClassesRuleWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/StatelessClassesRuleWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter6.classes.StatelessClassesRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.StatelessClassesRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.OBJECT_IS_PREFERRED import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/TrivialPropertyAccessorsFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/TrivialPropertyAccessorsFixTest.kt similarity index 72% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/TrivialPropertyAccessorsFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/TrivialPropertyAccessorsFixTest.kt index 1d9e11013c..1e8ed4af7e 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/TrivialPropertyAccessorsFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/TrivialPropertyAccessorsFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.ruleset.rules.chapter6.TrivialPropertyAccessors -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter6.TrivialPropertyAccessors +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames.TRIVIAL_ACCESSORS_ARE_NOT_RECOMMENDED import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/TrivialPropertyAccessorsWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/TrivialPropertyAccessorsWarnTest.kt similarity index 89% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/TrivialPropertyAccessorsWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/TrivialPropertyAccessorsWarnTest.kt index 2ade0638d4..408022160b 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/TrivialPropertyAccessorsWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/TrivialPropertyAccessorsWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter6.TrivialPropertyAccessors -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter6.TrivialPropertyAccessors +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames.TRIVIAL_ACCESSORS_ARE_NOT_RECOMMENDED import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UseLastIndexFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UseLastIndexFixTest.kt similarity index 73% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UseLastIndexFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UseLastIndexFixTest.kt index d6894902b3..99655dcf38 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UseLastIndexFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UseLastIndexFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.ruleset.rules.chapter6.UseLastIndex -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter6.UseLastIndex +import com.saveourtool.diktat.util.FixTestBase import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UseLastIndexWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UseLastIndexWarnTest.kt similarity index 89% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UseLastIndexWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UseLastIndexWarnTest.kt index 43da2f876b..e9e88de659 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UseLastIndexWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UseLastIndexWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter6.UseLastIndex -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter6.UseLastIndex +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UselessSupertypeFixTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UselessSupertypeFixTest.kt similarity index 76% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UselessSupertypeFixTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UselessSupertypeFixTest.kt index eb9faab46b..6b6836ad95 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UselessSupertypeFixTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UselessSupertypeFixTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.ruleset.rules.chapter6.UselessSupertype -import org.cqfn.diktat.util.FixTestBase +import com.saveourtool.diktat.ruleset.rules.chapter6.UselessSupertype +import com.saveourtool.diktat.util.FixTestBase import generated.WarningNames import org.junit.jupiter.api.Tag diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UselessSupertypeWarnTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UselessSupertypeWarnTest.kt similarity index 87% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UselessSupertypeWarnTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UselessSupertypeWarnTest.kt index 7175f1e09c..8e435fb537 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/chapter6/UselessSupertypeWarnTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/chapter6/UselessSupertypeWarnTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.chapter6 +package com.saveourtool.diktat.ruleset.chapter6 -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings.USELESS_SUPERTYPE -import org.cqfn.diktat.ruleset.rules.chapter6.UselessSupertype -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings.USELESS_SUPERTYPE +import com.saveourtool.diktat.ruleset.rules.chapter6.UselessSupertype +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import generated.WarningNames import org.junit.jupiter.api.Tag import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/BooleanOrDefault.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/BooleanOrDefault.kt similarity index 85% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/BooleanOrDefault.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/BooleanOrDefault.kt index fefe8b6ce9..6518890e85 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/BooleanOrDefault.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/BooleanOrDefault.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.junit +package com.saveourtool.diktat.ruleset.junit /** * @property valueOrNull a boolean value, or `null` (meaning the default value diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/CloseablePath.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/CloseablePath.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/CloseablePath.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/CloseablePath.kt index a0fc9fa6c0..d403fdb530 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/CloseablePath.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/CloseablePath.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.junit +package com.saveourtool.diktat.ruleset.junit -import org.cqfn.diktat.test.framework.util.resetPermissions -import org.cqfn.diktat.test.framework.util.tryToDeleteOnExit +import com.saveourtool.diktat.test.framework.util.resetPermissions +import com.saveourtool.diktat.test.framework.util.tryToDeleteOnExit import org.junit.jupiter.api.extension.ExtensionContext.Store.CloseableResource import java.io.IOException import java.nio.file.DirectoryNotEmptyException diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/ExpectedLintError.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/ExpectedLintError.kt similarity index 83% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/ExpectedLintError.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/ExpectedLintError.kt index f2d062fb7d..2677fac95b 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/ExpectedLintError.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/ExpectedLintError.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.junit +package com.saveourtool.diktat.ruleset.junit -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError /** * The common super-interface for expected lint errors (extracted from the diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/ExpectedLintErrors.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/ExpectedLintErrors.kt similarity index 89% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/ExpectedLintErrors.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/ExpectedLintErrors.kt index 2ab5e2cde2..aa46e85b4d 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/ExpectedLintErrors.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/ExpectedLintErrors.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.junit +package com.saveourtool.diktat.ruleset.junit -import org.cqfn.diktat.ruleset.utils.leadingSpaceCount +import com.saveourtool.diktat.ruleset.utils.leadingSpaceCount import org.assertj.core.api.Assertions.assertThat import org.intellij.lang.annotations.Language diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/NaturalDisplayName.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/NaturalDisplayName.kt similarity index 98% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/NaturalDisplayName.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/NaturalDisplayName.kt index d79a8487b4..72c39a99e6 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/NaturalDisplayName.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/NaturalDisplayName.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.junit +package com.saveourtool.diktat.ruleset.junit import org.junit.jupiter.api.MethodOrderer.DisplayName import org.junit.jupiter.api.MethodOrdererContext diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/RuleInvocationContextProvider.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/RuleInvocationContextProvider.kt similarity index 98% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/RuleInvocationContextProvider.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/RuleInvocationContextProvider.kt index 66fefd7cb4..1e10fdbc10 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/junit/RuleInvocationContextProvider.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/junit/RuleInvocationContextProvider.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.junit +package com.saveourtool.diktat.ruleset.junit -import org.cqfn.diktat.ruleset.utils.NEWLINE +import com.saveourtool.diktat.ruleset.utils.NEWLINE import generated.WarningNames import org.assertj.core.api.Assertions.assertThat import org.intellij.lang.annotations.Language diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/RulesConfigValidationTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/RulesConfigValidationTest.kt similarity index 92% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/RulesConfigValidationTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/RulesConfigValidationTest.kt index decaa93a00..f17d7f0dcd 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/RulesConfigValidationTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/RulesConfigValidationTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.smoke +package com.saveourtool.diktat.ruleset.smoke -import org.cqfn.diktat.ruleset.rules.DiktatRuleSetProvider -import org.cqfn.diktat.test.framework.util.deleteIfExistsSilently +import com.saveourtool.diktat.ruleset.rules.DiktatRuleSetProvider +import com.saveourtool.diktat.test.framework.util.deleteIfExistsSilently import com.charleskorn.kaml.InvalidPropertyValueException import org.junit.jupiter.api.AfterEach diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtilsTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtilsTest.kt similarity index 98% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtilsTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtilsTest.kt index 14af60b6d1..022de84285 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/AstNodeUtilsTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/AstNodeUtilsTest.kt @@ -4,13 +4,13 @@ "AVOID_NULL_CHECKS", ) -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.api.DiktatErrorEmitter -import org.cqfn.diktat.api.DiktatRule -import org.cqfn.diktat.api.DiktatRuleSet -import org.cqfn.diktat.ktlint.lint -import org.cqfn.diktat.util.applyToCode +import com.saveourtool.diktat.api.DiktatErrorEmitter +import com.saveourtool.diktat.api.DiktatRule +import com.saveourtool.diktat.api.DiktatRuleSet +import com.saveourtool.diktat.ktlint.lint +import com.saveourtool.diktat.util.applyToCode import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.KtNodeTypes.CLASS @@ -27,9 +27,9 @@ import org.jetbrains.kotlin.KtNodeTypes.TYPE_REFERENCE import org.jetbrains.kotlin.KtNodeTypes.VALUE_PARAMETER_LIST import org.jetbrains.kotlin.lexer.KtTokens.VAL_KEYWORD import org.jetbrains.kotlin.lexer.KtTokens.WHITE_SPACE -import org.cqfn.diktat.ruleset.utils.isLeaf -import org.cqfn.diktat.ruleset.utils.nextCodeSibling -import org.cqfn.diktat.ruleset.utils.nextSibling +import com.saveourtool.diktat.ruleset.utils.isLeaf +import com.saveourtool.diktat.ruleset.utils.nextCodeSibling +import com.saveourtool.diktat.ruleset.utils.nextSibling import org.intellij.lang.annotations.Language import org.jetbrains.kotlin.com.intellij.lang.ASTNode import org.jetbrains.kotlin.com.intellij.psi.impl.source.tree.PsiWhiteSpaceImpl diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/AvailableRulesDocTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/AvailableRulesDocTest.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/AvailableRulesDocTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/AvailableRulesDocTest.kt index b8268433af..46932972ca 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/AvailableRulesDocTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/AvailableRulesDocTest.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.constants.Warnings import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import java.io.File diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/FunctionAstNodeUtilsTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/FunctionAstNodeUtilsTest.kt similarity index 91% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/FunctionAstNodeUtilsTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/FunctionAstNodeUtilsTest.kt index 52372f4160..beb980a2ba 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/FunctionAstNodeUtilsTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/FunctionAstNodeUtilsTest.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.util.applyToCode +import com.saveourtool.diktat.util.applyToCode import org.jetbrains.kotlin.KtNodeTypes.FUN import org.junit.jupiter.api.Assertions diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParserTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/KotlinParserTest.kt similarity index 95% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParserTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/KotlinParserTest.kt index 020577fd97..35a03bd966 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/KotlinParserTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/KotlinParserTest.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.util.applyToCode +import com.saveourtool.diktat.util.applyToCode import org.jetbrains.kotlin.KtNodeTypes.CALL_EXPRESSION import org.jetbrains.kotlin.KtNodeTypes.CLASS @@ -53,7 +53,7 @@ class KotlinParserTest { @Test fun `test multiline code with import and package`() { val code = """ - |package org.cqfn.diktat.ruleset.utils + |package com.saveourtool.diktat.ruleset.utils | |import org.junit.jupiter.api.Test |import org.junit.jupiter.api.Tests @@ -106,7 +106,7 @@ class KotlinParserTest { ) fun `test multiline class code compare with applyToCode`() { val emptyClass = """ - |package org.cqfn.diktat.ruleset.utils + |package com.saveourtool.diktat.ruleset.utils | |import org.junit.jupiter.api.Test | @@ -120,7 +120,7 @@ class KotlinParserTest { } } val resultClass = """ - |package org.cqfn.diktat.ruleset.utils + |package com.saveourtool.diktat.ruleset.utils | |import org.junit.jupiter.api.Test | @@ -147,7 +147,7 @@ class KotlinParserTest { @Test fun `check package`() { val packageCode = """ - |package org.cqfn.diktat.ruleset.utils + |package com.saveourtool.diktat.ruleset.utils """.trimMargin() val node = KotlinParser().createNode(packageCode, true) Assertions.assertEquals(KtFileElementType.INSTANCE, node.elementType) @@ -182,7 +182,7 @@ class KotlinParserTest { @Test fun `check package and import`() { val code = """ - |package org.cqfn.diktat.ruleset.utils + |package com.saveourtool.diktat.ruleset.utils | |import org.junit.jupiter.api.Test |import org.junit.jupiter.api.Tests diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/RulesConfigYamlTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/RulesConfigYamlTest.kt similarity index 90% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/RulesConfigYamlTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/RulesConfigYamlTest.kt index 510910fb77..f30153a503 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/RulesConfigYamlTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/RulesConfigYamlTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.utils - -import org.cqfn.diktat.common.config.rules.DIKTAT_COMMON -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.RulesConfigReader -import org.cqfn.diktat.common.config.rules.getRuleConfig -import org.cqfn.diktat.common.config.rules.kotlinVersion -import org.cqfn.diktat.ruleset.constants.Warnings +package com.saveourtool.diktat.ruleset.utils + +import com.saveourtool.diktat.common.config.rules.DIKTAT_COMMON +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.RulesConfigReader +import com.saveourtool.diktat.common.config.rules.getRuleConfig +import com.saveourtool.diktat.common.config.rules.kotlinVersion +import com.saveourtool.diktat.ruleset.constants.Warnings import com.charleskorn.kaml.Yaml import org.junit.jupiter.api.Assertions diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/StringCaseUtilsTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/StringCaseUtilsTest.kt similarity index 97% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/StringCaseUtilsTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/StringCaseUtilsTest.kt index 41648a6f70..269d461360 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/StringCaseUtilsTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/StringCaseUtilsTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/SuppressAnnotatedExpressionTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/SuppressAnnotatedExpressionTest.kt similarity index 80% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/SuppressAnnotatedExpressionTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/SuppressAnnotatedExpressionTest.kt index 758a756fdb..d68b432661 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/SuppressAnnotatedExpressionTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/SuppressAnnotatedExpressionTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter3.CollapseIfStatementsRule -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter3.CollapseIfStatementsRule +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import org.junit.jupiter.api.Test class SuppressAnnotatedExpressionTest : LintTestBase(::CollapseIfStatementsRule) { diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/SuppressTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/SuppressTest.kt similarity index 91% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/SuppressTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/SuppressTest.kt index 04f8482437..da9cdbcd1d 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/SuppressTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/SuppressTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.rules.chapter1.IdentifierNaming -import org.cqfn.diktat.util.LintTestBase +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.rules.chapter1.IdentifierNaming +import com.saveourtool.diktat.util.LintTestBase -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import org.junit.jupiter.api.Test class SuppressTest : LintTestBase(::IdentifierNaming) { diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/VariablesSearchTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/VariablesSearchTest.kt similarity index 88% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/VariablesSearchTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/VariablesSearchTest.kt index f6a2e5b89b..3ca6e2ee36 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/VariablesSearchTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/VariablesSearchTest.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.ruleset.utils.search.VariablesSearch -import org.cqfn.diktat.ruleset.utils.search.default -import org.cqfn.diktat.util.applyToCode +import com.saveourtool.diktat.ruleset.utils.search.VariablesSearch +import com.saveourtool.diktat.ruleset.utils.search.default +import com.saveourtool.diktat.util.applyToCode import org.jetbrains.kotlin.KtNodeTypes import org.jetbrains.kotlin.psi.stubs.elements.KtFileElementType diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/VariablesWithAssignmentsSearchTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/VariablesWithAssignmentsSearchTest.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/VariablesWithAssignmentsSearchTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/VariablesWithAssignmentsSearchTest.kt index 53f6952b0a..757be91cf7 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/VariablesWithAssignmentsSearchTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/VariablesWithAssignmentsSearchTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.ruleset.utils.search.findAllVariablesWithAssignments -import org.cqfn.diktat.util.applyToCode +import com.saveourtool.diktat.ruleset.utils.search.findAllVariablesWithAssignments +import com.saveourtool.diktat.util.applyToCode import org.jetbrains.kotlin.psi.stubs.elements.KtFileElementType import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes.FILE diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/VariablesWithUsagesSearchTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/VariablesWithUsagesSearchTest.kt similarity index 98% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/VariablesWithUsagesSearchTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/VariablesWithUsagesSearchTest.kt index bfc8a172f0..7d41add002 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/VariablesWithUsagesSearchTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/VariablesWithUsagesSearchTest.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.ruleset.utils.search.findAllVariablesWithUsages -import org.cqfn.diktat.util.applyToCode +import com.saveourtool.diktat.ruleset.utils.search.findAllVariablesWithUsages +import com.saveourtool.diktat.util.applyToCode import org.jetbrains.kotlin.psi.stubs.elements.KtFileElementType import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes.FILE diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/WarningsGenerationTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/WarningsGenerationTest.kt similarity index 71% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/WarningsGenerationTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/WarningsGenerationTest.kt index fddc80fb86..5c3e30fde1 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/ruleset/utils/WarningsGenerationTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/ruleset/utils/WarningsGenerationTest.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ruleset.utils +package com.saveourtool.diktat.ruleset.utils -import org.cqfn.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.constants.Warnings import org.junit.jupiter.api.Test class WarningsGenerationTest { diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/DiktatRuleSetProviderTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/DiktatRuleSetProviderTest.kt similarity index 83% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/util/DiktatRuleSetProviderTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/DiktatRuleSetProviderTest.kt index 2ea069c128..3ec513853d 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/DiktatRuleSetProviderTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/DiktatRuleSetProviderTest.kt @@ -2,14 +2,14 @@ * Stub for diktat ruleset provide to be used in tests and other related utilities */ -package org.cqfn.diktat.util +package com.saveourtool.diktat.util -import org.cqfn.diktat.api.DiktatRuleSet -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.RulesConfigReader -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.ruleset.rules.DiktatRuleSetProvider -import org.cqfn.diktat.test.framework.util.filterContentMatches +import com.saveourtool.diktat.api.DiktatRuleSet +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.RulesConfigReader +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.ruleset.rules.DiktatRuleSetProvider +import com.saveourtool.diktat.test.framework.util.filterContentMatches import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test @@ -26,7 +26,7 @@ class DiktatRuleSetProviderTest { @Suppress("UnsafeCallOnNullableType") @Test fun `check DiktatRuleSetProviderTest contain all rules`() { - val path = "${System.getProperty("user.dir")}/src/main/kotlin/org/cqfn/diktat/ruleset/rules" + val path = "${System.getProperty("user.dir")}/src/main/kotlin/com/saveourtool/diktat/ruleset/rules" val fileNames = Path(path) .walk() .filter(Path::isRegularFile) diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/DiktatRuleTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/DiktatRuleTest.kt similarity index 73% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/util/DiktatRuleTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/DiktatRuleTest.kt index cfac4c8a92..9d7970a6f7 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/DiktatRuleTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/DiktatRuleTest.kt @@ -1,12 +1,12 @@ -package org.cqfn.diktat.util +package com.saveourtool.diktat.util -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.BLANK_LINE_BETWEEN_PROPERTIES -import org.cqfn.diktat.ruleset.constants.Warnings.WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES -import org.cqfn.diktat.ruleset.rules.chapter3.ClassLikeStructuresOrderRule +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.BLANK_LINE_BETWEEN_PROPERTIES +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_ORDER_IN_CLASS_LIKE_STRUCTURES +import com.saveourtool.diktat.ruleset.rules.chapter3.ClassLikeStructuresOrderRule -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import org.junit.jupiter.api.Test class DiktatRuleTest : LintTestBase(::ClassLikeStructuresOrderRule) { diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/FixTestBase.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/FixTestBase.kt similarity index 86% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/util/FixTestBase.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/FixTestBase.kt index 177e5d6095..2be4e95e13 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/FixTestBase.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/FixTestBase.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.util +package com.saveourtool.diktat.util -import org.cqfn.diktat.api.DiktatCallback -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ktlint.format -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.test.framework.processing.FileComparisonResult -import org.cqfn.diktat.test.framework.processing.ResourceReader -import org.cqfn.diktat.test.framework.processing.TestComparatorUnit -import org.cqfn.diktat.util.DiktatRuleSetProviderTest.Companion.diktatRuleSetForTest +import com.saveourtool.diktat.api.DiktatCallback +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ktlint.format +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.test.framework.processing.FileComparisonResult +import com.saveourtool.diktat.test.framework.processing.ResourceReader +import com.saveourtool.diktat.test.framework.processing.TestComparatorUnit +import com.saveourtool.diktat.util.DiktatRuleSetProviderTest.Companion.diktatRuleSetForTest import mu.KotlinLogging import org.intellij.lang.annotations.Language import org.junit.jupiter.api.Assertions diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/LintTestBase.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/LintTestBase.kt similarity index 93% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/util/LintTestBase.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/LintTestBase.kt index 4cf05697e6..43df41d6cd 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/LintTestBase.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/LintTestBase.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.util +package com.saveourtool.diktat.util -import org.cqfn.diktat.api.DiktatCallback -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ktlint.lint -import org.cqfn.diktat.ruleset.rules.DiktatRule -import org.cqfn.diktat.util.DiktatRuleSetProviderTest.Companion.diktatRuleSetForTest -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatCallback +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ktlint.lint +import com.saveourtool.diktat.ruleset.rules.DiktatRule +import com.saveourtool.diktat.util.DiktatRuleSetProviderTest.Companion.diktatRuleSetForTest +import com.saveourtool.diktat.api.DiktatError import org.assertj.core.api.Assertions.assertThat import org.intellij.lang.annotations.Language import java.nio.file.Path diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/SuppressingTest.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/SuppressingTest.kt similarity index 83% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/util/SuppressingTest.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/SuppressingTest.kt index 684bfe9b9b..431c0c2f00 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/SuppressingTest.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/SuppressingTest.kt @@ -1,11 +1,11 @@ -package org.cqfn.diktat.util +package com.saveourtool.diktat.util -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.ruleset.constants.Warnings.IDENTIFIER_LENGTH -import org.cqfn.diktat.ruleset.rules.chapter1.IdentifierNaming +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.ruleset.constants.Warnings.IDENTIFIER_LENGTH +import com.saveourtool.diktat.ruleset.rules.chapter1.IdentifierNaming -import org.cqfn.diktat.api.DiktatError +import com.saveourtool.diktat.api.DiktatError import org.junit.jupiter.api.Test class SuppressingTest : LintTestBase(::IdentifierNaming) { diff --git a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/TestUtils.kt b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/TestUtils.kt similarity index 94% rename from diktat-rules/src/test/kotlin/org/cqfn/diktat/util/TestUtils.kt rename to diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/TestUtils.kt index 5654c4a4ed..6387089b9b 100644 --- a/diktat-rules/src/test/kotlin/org/cqfn/diktat/util/TestUtils.kt +++ b/diktat-rules/src/test/kotlin/com/saveourtool/diktat/util/TestUtils.kt @@ -2,12 +2,12 @@ * Utility classes and methods for tests */ -package org.cqfn.diktat.util +package com.saveourtool.diktat.util -import org.cqfn.diktat.api.DiktatErrorEmitter -import org.cqfn.diktat.api.DiktatRule -import org.cqfn.diktat.api.DiktatRuleSet -import org.cqfn.diktat.ktlint.lint +import com.saveourtool.diktat.api.DiktatErrorEmitter +import com.saveourtool.diktat.api.DiktatRule +import com.saveourtool.diktat.api.DiktatRuleSet +import com.saveourtool.diktat.ktlint.lint import org.assertj.core.api.Assertions.assertThat import org.assertj.core.api.Assertions.fail diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/class_/IncorrectClassNameExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/class_/IncorrectClassNameExpected.kt index ea41fe9d0a..95b7a56fdd 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/class_/IncorrectClassNameExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/class_/IncorrectClassNameExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.paragraph1.naming.class_ +package com.saveourtool.diktat.test.paragraph1.naming.class_ class PaScalCase1 {} class PascalCase2 {} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/class_/IncorrectClassNameTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/class_/IncorrectClassNameTest.kt index 97eec9590e..8210fec946 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/class_/IncorrectClassNameTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/class_/IncorrectClassNameTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.paragraph1.naming.class_ +package com.saveourtool.diktat.test.paragraph1.naming.class_ class PaScalCase1 {} class Pascal_Case2 {} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValuePascalCaseExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValuePascalCaseExpected.kt index 551e568f66..13cbccfdff 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValuePascalCaseExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValuePascalCaseExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.resources.test.paragraph1.naming.enum_ +package com.saveourtool.diktat.test.resources.test.paragraph1.naming.enum_ enum class EnumValuePascalCaseTest { PaScSalL, diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValuePascalCaseTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValuePascalCaseTest.kt index 5da4f6c636..0bb65a4acc 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValuePascalCaseTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValuePascalCaseTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.resources.test.paragraph1.naming.enum_ +package com.saveourtool.diktat.test.resources.test.paragraph1.naming.enum_ enum class EnumValuePascalCaseTest { paSC_SAl_l, diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValueSnakeCaseExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValueSnakeCaseExpected.kt index d628cf3dae..fb752f57ff 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValueSnakeCaseExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValueSnakeCaseExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.resources.test.paragraph1.naming.enum_ +package com.saveourtool.diktat.test.resources.test.paragraph1.naming.enum_ enum class EnumValueSnakeCaseTest { PA_SC_SAL_L, diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValueSnakeCaseTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValueSnakeCaseTest.kt index 01fac4ea0d..03e44b2b7d 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValueSnakeCaseTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/enum_/EnumValueSnakeCaseTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.resources.test.paragraph1.naming.enum_ +package com.saveourtool.diktat.test.resources.test.paragraph1.naming.enum_ enum class EnumValueSnakeCaseTest { paSC_SAl_l, diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/file/fileNameTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/file/fileNameTest.kt index a96bef1354..6deaa6f0a4 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/file/fileNameTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/file/fileNameTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.resources.test.paragraph1.naming.file.resources.test.paragraph1.naming.file.naming.file +package com.saveourtool.diktat.resources.test.paragraph1.naming.file.resources.test.paragraph1.naming.file.naming.file fun foo () { diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/file/file_nameTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/file/file_nameTest.kt index 836509461c..7038f3914d 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/file/file_nameTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/file/file_nameTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.resources.test.paragraph1.naming.file.resources.test.paragraph1.naming.file.resources.test.paragraph1.naming.file.naming.file +package com.saveourtool.diktat.resources.test.paragraph1.naming.file.resources.test.paragraph1.naming.file.resources.test.paragraph1.naming.file.naming.file class FileNameTest1 { } diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/function/FunctionNameExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/function/FunctionNameExpected.kt index 0bcb5988e4..a70340c66e 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/function/FunctionNameExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/function/FunctionNameExpected.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.ktlint.ruleset.standarddd +package com.saveourtool.diktat.ktlint.ruleset.standarddd -import org.cqfn.diktat.ktlint.CORE.Rule +import com.saveourtool.diktat.ktlint.CORE.Rule /** * Alphabetical with capital letters before lower case letters (e.g. Z before a). diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/function/FunctionNameTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/function/FunctionNameTest.kt index 74125e66ce..d010846ea6 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/function/FunctionNameTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/function/FunctionNameTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.ktlint.ruleset +package com.saveourtool.diktat.ktlint.ruleset class TestPackageName { fun /* */ METHOD1(someName: String): Unit { diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/generic/GenericFunctionExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/generic/GenericFunctionExpected.kt index d6693c7578..dc3c05491b 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/generic/GenericFunctionExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/generic/GenericFunctionExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.paragraph1.naming.generic +package com.saveourtool.diktat.test.paragraph1.naming.generic private class ClassName { private fun lock(body: ((Template?) -> T?)?, value: Template?): T? { diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/generic/GenericFunctionTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/generic/GenericFunctionTest.kt index d6693c7578..dc3c05491b 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/generic/GenericFunctionTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/generic/GenericFunctionTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.paragraph1.naming.generic +package com.saveourtool.diktat.test.paragraph1.naming.generic private class ClassName { private fun lock(body: ((Template?) -> T?)?, value: Template?): T? { diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/object_/IncorrectObjectNameExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/object_/IncorrectObjectNameExpected.kt index 10f182b87c..5ec805f98a 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/object_/IncorrectObjectNameExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/object_/IncorrectObjectNameExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.resources.test.paragraph1.naming.object_ +package com.saveourtool.diktat.test.resources.test.paragraph1.naming.object_ object PaScalCase1 {} object PascalCase2 {} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/object_/IncorrectObjectNameTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/object_/IncorrectObjectNameTest.kt index 0eed0c184b..101e1dc5b7 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/object_/IncorrectObjectNameTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/object_/IncorrectObjectNameTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.resources.test.paragraph1.naming.object_ +package com.saveourtool.diktat.test.resources.test.paragraph1.naming.object_ object PaScalCase1 {} object Pascal_Case2 {} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUnderscoreExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUnderscoreExpected.kt index 8f9af81166..3fdf6704a7 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUnderscoreExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUnderscoreExpected.kt @@ -1,6 +1,6 @@ -package /* AAAAAA */ org.cqfn.diktat.ktlint.ruleset.standarddd +package /* AAAAAA */ com.saveourtool.diktat.ktlint.ruleset.standarddd -import org.cqfn.diktat.ktlint.CORE.Rule +import com.saveourtool.diktat.ktlint.CORE.Rule /** diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUnderscoreTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUnderscoreTest.kt index 70c9703e03..6e9fc927ed 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUnderscoreTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUnderscoreTest.kt @@ -1,6 +1,6 @@ -package /* AAAAAA */ org.cqfn.diktat.ktlint.rule_set.standarddd +package /* AAAAAA */ com.saveourtool.diktat.ktlint.rule_set.standarddd -import org.cqfn.diktat.ktlint.CORE.Rule +import com.saveourtool.diktat.ktlint.CORE.Rule /** diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUpperExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUpperExpected.kt index 8f9af81166..3fdf6704a7 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUpperExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUpperExpected.kt @@ -1,6 +1,6 @@ -package /* AAAAAA */ org.cqfn.diktat.ktlint.ruleset.standarddd +package /* AAAAAA */ com.saveourtool.diktat.ktlint.ruleset.standarddd -import org.cqfn.diktat.ktlint.CORE.Rule +import com.saveourtool.diktat.ktlint.CORE.Rule /** diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUpperTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUpperTest.kt index b7235690f2..7481c39172 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUpperTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/FixUpperTest.kt @@ -1,6 +1,6 @@ -package /* AAAAAA */ org.cqfn.diktat.ktlint.ruleset.standarDDD +package /* AAAAAA */ com.saveourtool.diktat.ktlint.ruleset.standarDDD -import org.cqfn.diktat.ktlint.CORE.Rule +import com.saveourtool.diktat.ktlint.CORE.Rule /** diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/MissingDomainNameExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/MissingDomainNameExpected.kt index 8f9af81166..3fdf6704a7 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/MissingDomainNameExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/MissingDomainNameExpected.kt @@ -1,6 +1,6 @@ -package /* AAAAAA */ org.cqfn.diktat.ktlint.ruleset.standarddd +package /* AAAAAA */ com.saveourtool.diktat.ktlint.ruleset.standarddd -import org.cqfn.diktat.ktlint.CORE.Rule +import com.saveourtool.diktat.ktlint.CORE.Rule /** diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/MissingDomainNameTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/MissingDomainNameTest.kt index e48e0a8630..ac0f4ccecd 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/MissingDomainNameTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/MissingDomainNameTest.kt @@ -1,6 +1,6 @@ package /* AAAAAA */ ktlint.ruleset.standarddd -import org.cqfn.diktat.ktlint.CORE.Rule +import com.saveourtool.diktat.ktlint.CORE.Rule /** diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixIncorrectExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixIncorrectExpected.kt new file mode 100644 index 0000000000..8eefefb794 --- /dev/null +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixIncorrectExpected.kt @@ -0,0 +1,6 @@ +package /* AAAAAA */ com.saveourtool.diktat.some.name + +import com.saveourtool.diktat.ktlint.core.Rule + +class TestPackageName { +} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixIncorrectTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixIncorrectTest.kt similarity index 59% rename from diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixIncorrectTest.kt rename to diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixIncorrectTest.kt index 36090e4ab4..0e4d401671 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixIncorrectTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixIncorrectTest.kt @@ -1,6 +1,6 @@ package /* AAAAAA */ some.buggy.way.to -import org.cqfn.diktat.ktlint.core.Rule +import com.saveourtool.diktat.ktlint.core.Rule class TestPackageName { } diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingExpected.kt new file mode 100644 index 0000000000..ba70c6523e --- /dev/null +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingExpected.kt @@ -0,0 +1,5 @@ +package com.saveourtool.diktat.some.name +import com.saveourtool.diktat.ktlint.core.Rule + +class TestPackageName { +} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingTest.kt new file mode 100644 index 0000000000..fffbda7359 --- /dev/null +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingTest.kt @@ -0,0 +1,4 @@ +import com.saveourtool.diktat.ktlint.core.Rule + +class TestPackageName { +} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected.kt new file mode 100644 index 0000000000..6c3ee751eb --- /dev/null +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected.kt @@ -0,0 +1,7 @@ +@file:Suppress("CONSTANT_UPPERCASE") + +package com.saveourtool.diktat.some.name +import com.saveourtool.diktat.ktlint.core.Rule + +class TestPackageName { +} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected2.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected2.kt new file mode 100644 index 0000000000..875f6040e8 --- /dev/null +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected2.kt @@ -0,0 +1,6 @@ +@file:Suppress("CONSTANT_UPPERCASE") // comment +package com.saveourtool.diktat.some.name +import com.saveourtool.diktat.ktlint.core.Rule + +class TestPackageName { +} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected3.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected3.kt new file mode 100644 index 0000000000..448e3044a6 --- /dev/null +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationExpected3.kt @@ -0,0 +1,9 @@ +/** + * comment + */ +@file:Suppress("CONSTANT_UPPERCASE") +package com.saveourtool.diktat.some.name +import com.saveourtool.diktat.ktlint.core.Rule + +class TestPackageName { +} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest.kt similarity index 58% rename from diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationTest.kt rename to diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest.kt index 57e4a1129a..b64872cacd 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest.kt @@ -1,6 +1,6 @@ @file:Suppress("CONSTANT_UPPERCASE") -import org.cqfn.diktat.ktlint.core.Rule +import com.saveourtool.diktat.ktlint.core.Rule class TestPackageName { } diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationTest2.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest2.kt similarity index 61% rename from diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationTest2.kt rename to diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest2.kt index ad4353f719..49bd3e6bf1 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationTest2.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest2.kt @@ -1,5 +1,5 @@ @file:Suppress("CONSTANT_UPPERCASE") // comment -import org.cqfn.diktat.ktlint.core.Rule +import com.saveourtool.diktat.ktlint.core.Rule class TestPackageName { } diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationTest3.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest3.kt similarity index 63% rename from diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationTest3.kt rename to diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest3.kt index 76c83cb771..974f379212 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationTest3.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithAnnotationTest3.kt @@ -2,7 +2,7 @@ * comment */ @file:Suppress("CONSTANT_UPPERCASE") -import org.cqfn.diktat.ktlint.core.Rule +import com.saveourtool.diktat.ktlint.core.Rule class TestPackageName { } diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithoutImportExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithoutImportExpected.kt similarity index 64% rename from diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithoutImportExpected.kt rename to diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithoutImportExpected.kt index 666790dfe6..b53a1a4c87 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithoutImportExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithoutImportExpected.kt @@ -1,5 +1,5 @@ @file:Suppress("CONSTANT_UPPERCASE") -package org.cqfn.diktat.some.name +package com.saveourtool.diktat.some.name val a = 5 diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithoutImportTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithoutImportTest.kt similarity index 100% rename from diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithoutImportTest.kt rename to diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixMissingWithoutImportTest.kt diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixPackageRegressionExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixPackageRegressionExpected.kt new file mode 100644 index 0000000000..d85660ae8b --- /dev/null +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixPackageRegressionExpected.kt @@ -0,0 +1,6 @@ +package com.saveourtool.diktat.some.name + +import com.saveourtool.diktat.ktlint.core.Rule + +class TestPackageName { +} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixPackageRegressionTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixPackageRegressionTest.kt new file mode 100644 index 0000000000..3cb94c79cf --- /dev/null +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/com/saveourtool/diktat/some/name/FixPackageRegressionTest.kt @@ -0,0 +1,6 @@ +package app + +import com.saveourtool.diktat.ktlint.core.Rule + +class TestPackageName { +} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixIncorrectExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixIncorrectExpected.kt deleted file mode 100644 index 771773e76a..0000000000 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixIncorrectExpected.kt +++ /dev/null @@ -1,6 +0,0 @@ -package /* AAAAAA */ org.cqfn.diktat.some.name - -import org.cqfn.diktat.ktlint.core.Rule - -class TestPackageName { -} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingExpected.kt deleted file mode 100644 index c1a68822bb..0000000000 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingExpected.kt +++ /dev/null @@ -1,5 +0,0 @@ -package org.cqfn.diktat.some.name -import org.cqfn.diktat.ktlint.core.Rule - -class TestPackageName { -} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingTest.kt deleted file mode 100644 index 25e49ccf79..0000000000 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingTest.kt +++ /dev/null @@ -1,4 +0,0 @@ -import org.cqfn.diktat.ktlint.core.Rule - -class TestPackageName { -} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected.kt deleted file mode 100644 index 92cccc5b65..0000000000 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected.kt +++ /dev/null @@ -1,7 +0,0 @@ -@file:Suppress("CONSTANT_UPPERCASE") - -package org.cqfn.diktat.some.name -import org.cqfn.diktat.ktlint.core.Rule - -class TestPackageName { -} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected2.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected2.kt deleted file mode 100644 index 77803de762..0000000000 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected2.kt +++ /dev/null @@ -1,6 +0,0 @@ -@file:Suppress("CONSTANT_UPPERCASE") // comment -package org.cqfn.diktat.some.name -import org.cqfn.diktat.ktlint.core.Rule - -class TestPackageName { -} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected3.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected3.kt deleted file mode 100644 index 4194493d0f..0000000000 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixMissingWithAnnotationExpected3.kt +++ /dev/null @@ -1,9 +0,0 @@ -/** - * comment - */ -@file:Suppress("CONSTANT_UPPERCASE") -package org.cqfn.diktat.some.name -import org.cqfn.diktat.ktlint.core.Rule - -class TestPackageName { -} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixPackageRegressionExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixPackageRegressionExpected.kt deleted file mode 100644 index 58da8cfa0f..0000000000 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixPackageRegressionExpected.kt +++ /dev/null @@ -1,6 +0,0 @@ -package org.cqfn.diktat.some.name - -import org.cqfn.diktat.ktlint.core.Rule - -class TestPackageName { -} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixPackageRegressionTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixPackageRegressionTest.kt deleted file mode 100644 index 98f2b55f93..0000000000 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/org/cqfn/diktat/some/name/FixPackageRegressionTest.kt +++ /dev/null @@ -1,6 +0,0 @@ -package app - -import org.cqfn.diktat.ktlint.core.Rule - -class TestPackageName { -} diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixIncorrectExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixIncorrectExpected.kt index ad298e51f5..37996fde51 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixIncorrectExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixIncorrectExpected.kt @@ -1,6 +1,6 @@ -package /* AAAAAA */ org.cqfn.diktat.some +package /* AAAAAA */ com.saveourtool.diktat.some -import org.cqfn.diktat.ktlint.core.Rule +import com.saveourtool.diktat.ktlint.core.Rule class TestPackageName { } diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixIncorrectTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixIncorrectTest.kt index bd4db39edd..a1f573ee35 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixIncorrectTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixIncorrectTest.kt @@ -1,6 +1,6 @@ package /* AAAAAA */ buggy.path -import org.cqfn.diktat.ktlint.core.Rule +import com.saveourtool.diktat.ktlint.core.Rule class TestPackageName { } diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixMissingExpected.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixMissingExpected.kt index c4d5be09e7..9ae099ea60 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixMissingExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixMissingExpected.kt @@ -1,5 +1,5 @@ -package org.cqfn.diktat.some -import org.cqfn.diktat.ktlint.core.Rule +package com.saveourtool.diktat.some +import com.saveourtool.diktat.ktlint.core.Rule class TestPackageName { } diff --git a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixMissingTest.kt b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixMissingTest.kt index 25e49ccf79..fffbda7359 100644 --- a/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixMissingTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph1/naming/package/src/main/kotlin/some/FixMissingTest.kt @@ -1,4 +1,4 @@ -import org.cqfn.diktat.ktlint.core.Rule +import com.saveourtool.diktat.ktlint.core.Rule class TestPackageName { } diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightAbsentInvalidPatternExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightAbsentInvalidPatternExpected.kt index 3ac8923edb..9615a21d81 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightAbsentInvalidPatternExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightAbsentInvalidPatternExpected.kt @@ -8,8 +8,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightAbsentInvalidPatternTest.kt b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightAbsentInvalidPatternTest.kt index a0e91a476b..3fc763d976 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightAbsentInvalidPatternTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightAbsentInvalidPatternTest.kt @@ -5,8 +5,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearExpected.kt index 3ac8923edb..9615a21d81 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearExpected.kt @@ -8,8 +8,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearExpected2.kt b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearExpected2.kt index 691eef9c9f..c93fab4b15 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearExpected2.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearExpected2.kt @@ -8,8 +8,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearTest.kt b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearTest.kt index 89caa66aa6..886bb3851d 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearTest.kt @@ -8,8 +8,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearTest2.kt b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearTest2.kt index 5a8264ca59..fa8ca4fbff 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearTest2.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightDifferentYearTest2.kt @@ -8,8 +8,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightInvalidPatternValidCodeExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightInvalidPatternValidCodeExpected.kt index fa478aed2e..ee818d98a3 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightInvalidPatternValidCodeExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightInvalidPatternValidCodeExpected.kt @@ -8,8 +8,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightInvalidPatternValidCodeTest.kt b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightInvalidPatternValidCodeTest.kt index fa478aed2e..ee818d98a3 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightInvalidPatternValidCodeTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightInvalidPatternValidCodeTest.kt @@ -8,8 +8,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightShouldNotTriggerNPEExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightShouldNotTriggerNPEExpected.kt index 3ac8923edb..9615a21d81 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightShouldNotTriggerNPEExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightShouldNotTriggerNPEExpected.kt @@ -8,8 +8,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightShouldNotTriggerNPETest.kt b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightShouldNotTriggerNPETest.kt index a0e91a476b..3fc763d976 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightShouldNotTriggerNPETest.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/CopyrightShouldNotTriggerNPETest.kt @@ -5,8 +5,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocAppendedCopyrightExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocAppendedCopyrightExpected.kt index 2f7d159c86..580c6ec86c 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocAppendedCopyrightExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocAppendedCopyrightExpected.kt @@ -8,8 +8,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocAppendedCopyrightTest.kt b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocAppendedCopyrightTest.kt index 4b4da25005..75e0a8cbbf 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocAppendedCopyrightTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocAppendedCopyrightTest.kt @@ -1,7 +1,7 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Lorem ipsum diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocExpected.kt index 2f7d159c86..580c6ec86c 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocExpected.kt @@ -8,8 +8,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocNoCopyrightExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocNoCopyrightExpected.kt index a0e91a476b..3fc763d976 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocNoCopyrightExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocNoCopyrightExpected.kt @@ -5,8 +5,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Example class diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocNoCopyrightTest.kt b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocNoCopyrightTest.kt index 4b4da25005..75e0a8cbbf 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocNoCopyrightTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocNoCopyrightTest.kt @@ -1,7 +1,7 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Lorem ipsum diff --git a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocTest.kt b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocTest.kt index 4a4ea7cfb5..ab26754fc9 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/header/MisplacedHeaderKdocTest.kt @@ -4,8 +4,8 @@ package test.paragraph2.header -import org.cqfn.diktat.example.A -import org.cqfn.diktat.example.B +import com.saveourtool.diktat.example.A +import com.saveourtool.diktat.example.B /** * Lorem ipsum diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/KdocEmptyLineExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/KdocEmptyLineExpected.kt index a649720822..529442e255 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/KdocEmptyLineExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/KdocEmptyLineExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.resources.test.paragraph2.kdoc +package com.saveourtool.diktat.test.resources.test.paragraph2.kdoc /** * declaration for some constant diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/KdocEmptyLineTest.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/KdocEmptyLineTest.kt index 28266020ad..15c8c6aa4d 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/KdocEmptyLineTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/KdocEmptyLineTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.resources.test.paragraph2.kdoc +package com.saveourtool.diktat.test.resources.test.paragraph2.kdoc /** * declaration for some constant diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/EmptyKdocExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/EmptyKdocExpected.kt similarity index 51% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/EmptyKdocExpected.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/EmptyKdocExpected.kt index 8c7fe82dee..992e87a4a7 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/EmptyKdocExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/EmptyKdocExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods val foo = 42 diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/EmptyKdocTested.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/EmptyKdocTested.kt similarity index 51% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/EmptyKdocTested.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/EmptyKdocTested.kt index 8c7fe82dee..992e87a4a7 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/EmptyKdocTested.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/EmptyKdocTested.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods val foo = 42 diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/KdocMethodsFullExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/KdocMethodsFullExpected.kt similarity index 92% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/KdocMethodsFullExpected.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/KdocMethodsFullExpected.kt index 8a20224100..7d058d2734 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/KdocMethodsFullExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/KdocMethodsFullExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods class KdocMethodsFull { fun test1() { diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/KdocMethodsFullTested.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/KdocMethodsFullTested.kt similarity index 90% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/KdocMethodsFullTested.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/KdocMethodsFullTested.kt index 105ca37cf4..aeae6553e9 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/KdocMethodsFullTested.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/KdocMethodsFullTested.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods class KdocMethodsFull { fun test1() { diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocExpected.kt similarity index 82% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocExpected.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocExpected.kt index 03ccb77fd7..814c307395 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods class Example { /** diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocOnFunctionExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocOnFunctionExpected.kt similarity index 100% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocOnFunctionExpected.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocOnFunctionExpected.kt diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocOnFunctionTest.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocOnFunctionTest.kt similarity index 100% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocOnFunctionTest.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocOnFunctionTest.kt diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocTested.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocTested.kt similarity index 75% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocTested.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocTested.kt index 678246d5c3..b4c1427c59 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocTested.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocTested.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods class Example { fun addInts(a: Int, b: Int): Int { diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocWithModifiersExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocWithModifiersExpected.kt similarity index 100% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocWithModifiersExpected.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocWithModifiersExpected.kt diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocWithModifiersTest.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocWithModifiersTest.kt similarity index 100% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/MissingKdocWithModifiersTest.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/MissingKdocWithModifiersTest.kt diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ParamTagInsertionExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ParamTagInsertionExpected.kt similarity index 95% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ParamTagInsertionExpected.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ParamTagInsertionExpected.kt index d49ba7ef45..1cc510f128 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ParamTagInsertionExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ParamTagInsertionExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods class Example { /** diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ParamTagInsertionTested.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ParamTagInsertionTested.kt similarity index 94% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ParamTagInsertionTested.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ParamTagInsertionTested.kt index 550b03279e..8df496808b 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ParamTagInsertionTested.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ParamTagInsertionTested.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods class Example { /** diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ReturnTagInsertionExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ReturnTagInsertionExpected.kt similarity index 93% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ReturnTagInsertionExpected.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ReturnTagInsertionExpected.kt index 905decc8fd..04bddbebd8 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ReturnTagInsertionExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ReturnTagInsertionExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods class Example { /** diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ReturnTagInsertionTested.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ReturnTagInsertionTested.kt similarity index 93% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ReturnTagInsertionTested.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ReturnTagInsertionTested.kt index ea48a8e0e9..5182bf5734 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ReturnTagInsertionTested.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ReturnTagInsertionTested.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods class Example { /** diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ThrowsTagInsertionExpected.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ThrowsTagInsertionExpected.kt similarity index 97% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ThrowsTagInsertionExpected.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ThrowsTagInsertionExpected.kt index add3a6fa47..876bb9a4b0 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ThrowsTagInsertionExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ThrowsTagInsertionExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods class Example { /** diff --git a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ThrowsTagInsertionTested.kt b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ThrowsTagInsertionTested.kt similarity index 96% rename from diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ThrowsTagInsertionTested.kt rename to diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ThrowsTagInsertionTested.kt index cee11d7491..e72e41d9e0 100644 --- a/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/org/cqfn/diktat/kdoc/methods/ThrowsTagInsertionTested.kt +++ b/diktat-rules/src/test/resources/test/paragraph2/kdoc/package/src/main/kotlin/com/saveourtool/diktat/kdoc/methods/ThrowsTagInsertionTested.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.kdoc.methods +package com.saveourtool.diktat.kdoc.methods class Example { /** diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/BlankLinesBetweenBlocksExpected.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/BlankLinesBetweenBlocksExpected.kt index 0c077cfe7c..c311513d56 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/BlankLinesBetweenBlocksExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/BlankLinesBetweenBlocksExpected.kt @@ -4,9 +4,9 @@ @file:JvmName("Foo") -package org.cqfn.diktat.example +package com.saveourtool.diktat.example -import org.cqfn.diktat.Foo +import com.saveourtool.diktat.Foo class Example { val y: Foo = Foo() diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/HeaderKdocAfterPackageExpected.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/HeaderKdocAfterPackageExpected.kt index 23f2fda01a..91ba56f2d8 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/HeaderKdocAfterPackageExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/HeaderKdocAfterPackageExpected.kt @@ -4,7 +4,7 @@ package test.paragraph3.file_structure -import org.cqfn.diktat.Bar +import com.saveourtool.diktat.Bar class A { val a = Bar() diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/HeaderKdocAfterPackageTest.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/HeaderKdocAfterPackageTest.kt index ff5979f216..6378624f26 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/HeaderKdocAfterPackageTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/HeaderKdocAfterPackageTest.kt @@ -4,7 +4,7 @@ package test.paragraph3.file_structure * Header Kdoc */ -import org.cqfn.diktat.Bar +import com.saveourtool.diktat.Bar class A { val a = Bar() diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/MissingBlankLinesBetweenBlocksTest.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/MissingBlankLinesBetweenBlocksTest.kt index 5e7ada7c4f..208ba09724 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/MissingBlankLinesBetweenBlocksTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/MissingBlankLinesBetweenBlocksTest.kt @@ -2,8 +2,8 @@ * This is an example */ @file:JvmName("Foo") -package org.cqfn.diktat.example -import org.cqfn.diktat.Foo +package com.saveourtool.diktat.example +import com.saveourtool.diktat.Foo class Example { val y: Foo = Foo() } diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/OtherCommentsExpected.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/OtherCommentsExpected.kt index ddbc62ba87..6e164e9ea3 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/OtherCommentsExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/OtherCommentsExpected.kt @@ -4,9 +4,9 @@ // some notes on this file // and some more -package org.cqfn.diktat.example +package com.saveourtool.diktat.example -import org.cqfn.diktat.Foo +import com.saveourtool.diktat.Foo class Example { val x: Foo = Foo() diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/OtherCommentsTest.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/OtherCommentsTest.kt index d2dd324772..d0bd7a161d 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/OtherCommentsTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/OtherCommentsTest.kt @@ -4,9 +4,9 @@ * This is an example */ -package org.cqfn.diktat.example +package com.saveourtool.diktat.example -import org.cqfn.diktat.Foo +import com.saveourtool.diktat.Foo class Example { val x: Foo = Foo() diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/RedundantBlankLinesBetweenBlocksTest.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/RedundantBlankLinesBetweenBlocksTest.kt index 19874b7c7a..aa5ac70a95 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/RedundantBlankLinesBetweenBlocksTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/RedundantBlankLinesBetweenBlocksTest.kt @@ -8,10 +8,10 @@ -package org.cqfn.diktat.example +package com.saveourtool.diktat.example -import org.cqfn.diktat.Foo +import com.saveourtool.diktat.Foo diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsExpected.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsExpected.kt index eebc1e9cd2..2253254aef 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsExpected.kt @@ -1,8 +1,8 @@ package test.paragraph3.file_structure // lorem ipsum -import org.cqfn.diktat.example.Bar -import org.cqfn.diktat.example.Foo +import com.saveourtool.diktat.example.Bar +import com.saveourtool.diktat.example.Foo import org.junit.jupiter.api.Test class Example { diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsRecommendedExpected.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsRecommendedExpected.kt index 90bc8178e7..6999287a74 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsRecommendedExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsRecommendedExpected.kt @@ -5,8 +5,8 @@ import android.* import androidx.* import com.android.* -import org.cqfn.* -import org.cqfn.diktat.* +import com.saveourtool.* +import com.saveourtool.diktat.* import com.fasterxml.jackson.databind.ObjectMapper import com.google.common.base.CaseFormat diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsRecommendedTest.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsRecommendedTest.kt index e016cbcf70..cad6d5bcd0 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsRecommendedTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsRecommendedTest.kt @@ -5,10 +5,10 @@ import kotlin.system.exitProcess // comment about java imports import java.io.IOException import java.net.URL -import org.cqfn.* +import com.saveourtool.* import com.fasterxml.jackson.databind.ObjectMapper import android.* -import org.cqfn.diktat.* +import com.saveourtool.diktat.* import org.junit.jupiter.api.Assertions import androidx.* import org.springframework.context.annotation.Bean diff --git a/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsTest.kt b/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsTest.kt index ff79fcbcdc..fe4c5fb1c0 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/file_structure/ReorderingImportsTest.kt @@ -1,9 +1,9 @@ package test.paragraph3.file_structure import org.junit.jupiter.api.Test -import org.cqfn.diktat.example.Foo +import com.saveourtool.diktat.example.Foo // lorem ipsum -import org.cqfn.diktat.example.Bar +import com.saveourtool.diktat.example.Bar class Example { val x: Test = Test() val y: Foo = Foo() diff --git a/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected.kt b/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected.kt index 22e030d248..b0673843eb 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.resources.paragraph3.longline +package com.saveourtool.diktat.resources.paragraph3.longline class veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong { // looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongggggggggggggggggggggggggg diff --git a/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixTest.kt b/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixTest.kt index 286bc4e997..f0c00235f8 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/long_line/LongExpressionNoFixTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.resources.paragraph3.longline +package com.saveourtool.diktat.resources.paragraph3.longline class veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong { // looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongggggggggggggggggggggggggg diff --git a/diktat-rules/src/test/resources/test/paragraph3/newlines/SemicolonsExpected.kt b/diktat-rules/src/test/resources/test/paragraph3/newlines/SemicolonsExpected.kt index 669e47dc26..d748c91ae4 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/newlines/SemicolonsExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/newlines/SemicolonsExpected.kt @@ -1,6 +1,6 @@ package test.paragraph3.newlines -import org.cqfn.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.RulesConfig enum class Example { A, @@ -10,4 +10,4 @@ enum class Example { fun foo() {} val a = 0 val b = if (condition) { bar(); baz()} else qux -} \ No newline at end of file +} diff --git a/diktat-rules/src/test/resources/test/paragraph3/newlines/SemicolonsTest.kt b/diktat-rules/src/test/resources/test/paragraph3/newlines/SemicolonsTest.kt index f16c4542c4..e72b0d6d78 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/newlines/SemicolonsTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/newlines/SemicolonsTest.kt @@ -1,6 +1,6 @@ package test.paragraph3.newlines; -import org.cqfn.diktat.common.config.rules.RulesConfig; +import com.saveourtool.diktat.common.config.rules.RulesConfig; enum class Example { A, @@ -10,4 +10,4 @@ enum class Example { fun foo() {}; val a = 0; val b = if (condition) { bar(); baz()} else qux -}; \ No newline at end of file +}; diff --git a/diktat-rules/src/test/resources/test/paragraph3/top_level/TopLevelWithCommentExpected.kt b/diktat-rules/src/test/resources/test/paragraph3/top_level/TopLevelWithCommentExpected.kt index 0437700af0..ece20beeaa 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/top_level/TopLevelWithCommentExpected.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/top_level/TopLevelWithCommentExpected.kt @@ -4,7 +4,7 @@ package test.paragraph3.top_level -import org.cqfn.diktat.bar +import com.saveourtool.diktat.bar class A {} diff --git a/diktat-rules/src/test/resources/test/paragraph3/top_level/TopLevelWithCommentTest.kt b/diktat-rules/src/test/resources/test/paragraph3/top_level/TopLevelWithCommentTest.kt index 72267c55ee..0371fc9256 100644 --- a/diktat-rules/src/test/resources/test/paragraph3/top_level/TopLevelWithCommentTest.kt +++ b/diktat-rules/src/test/resources/test/paragraph3/top_level/TopLevelWithCommentTest.kt @@ -4,7 +4,7 @@ package test.paragraph3.top_level -import org.cqfn.diktat.bar +import com.saveourtool.diktat.bar class A {} diff --git a/diktat-ruleset/build.gradle.kts b/diktat-ruleset/build.gradle.kts index 6770ce227f..d27214e29e 100644 --- a/diktat-ruleset/build.gradle.kts +++ b/diktat-ruleset/build.gradle.kts @@ -1,12 +1,12 @@ -import org.cqfn.diktat.buildutils.configurePom +import com.saveourtool.diktat.buildutils.configurePom import com.github.jengelman.gradle.plugins.shadow.ShadowExtension import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar @Suppress("DSL_SCOPE_VIOLATION", "RUN_IN_SCRIPT") // https://github.com/gradle/gradle/issues/22797 plugins { - id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") - id("org.cqfn.diktat.buildutils.publishing-configuration") + id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.publishing-configuration") alias(libs.plugins.shadow) `maven-publish` } diff --git a/diktat-ruleset/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetProviderV3Spi.kt b/diktat-ruleset/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRuleSetProviderV3Spi.kt similarity index 85% rename from diktat-ruleset/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetProviderV3Spi.kt rename to diktat-ruleset/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRuleSetProviderV3Spi.kt index 72e9ceace3..d1134dca45 100644 --- a/diktat-ruleset/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetProviderV3Spi.kt +++ b/diktat-ruleset/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRuleSetProviderV3Spi.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.ruleset.rules +package com.saveourtool.diktat.ruleset.rules -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.ktlint.KtLintRuleWrapper.Companion.toKtLint +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.ktlint.KtLintRuleWrapper.Companion.toKtLint import com.pinterest.ktlint.cli.ruleset.core.api.RuleSetProviderV3 import com.pinterest.ktlint.logger.api.initKtLintKLogger import com.pinterest.ktlint.rule.engine.core.api.RuleProvider diff --git a/diktat-ruleset/src/main/resources/META-INF/services/com.pinterest.ktlint.cli.ruleset.core.api.RuleSetProviderV3 b/diktat-ruleset/src/main/resources/META-INF/services/com.pinterest.ktlint.cli.ruleset.core.api.RuleSetProviderV3 index 6b4fbaf014..af8a443728 100644 --- a/diktat-ruleset/src/main/resources/META-INF/services/com.pinterest.ktlint.cli.ruleset.core.api.RuleSetProviderV3 +++ b/diktat-ruleset/src/main/resources/META-INF/services/com.pinterest.ktlint.cli.ruleset.core.api.RuleSetProviderV3 @@ -1 +1 @@ -org.cqfn.diktat.ruleset.rules.DiktatRuleSetProviderV3Spi +com.saveourtool.diktat.ruleset.rules.DiktatRuleSetProviderV3Spi diff --git a/diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSaveSmokeTest.kt b/diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSaveSmokeTest.kt similarity index 92% rename from diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSaveSmokeTest.kt rename to diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSaveSmokeTest.kt index 8fa9d767c5..d954436ff0 100644 --- a/diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSaveSmokeTest.kt +++ b/diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSaveSmokeTest.kt @@ -1,13 +1,13 @@ -package org.cqfn.diktat.ruleset.smoke - -import org.cqfn.diktat.api.DiktatError -import org.cqfn.diktat.test.framework.processing.TestComparatorUnit -import org.cqfn.diktat.test.framework.util.checkForkedJavaHome -import org.cqfn.diktat.test.framework.util.deleteIfExistsRecursively -import org.cqfn.diktat.test.framework.util.deleteIfExistsSilently -import org.cqfn.diktat.test.framework.util.inheritJavaHome -import org.cqfn.diktat.test.framework.util.isWindows -import org.cqfn.diktat.test.framework.util.temporaryDirectory +package com.saveourtool.diktat.ruleset.smoke + +import com.saveourtool.diktat.api.DiktatError +import com.saveourtool.diktat.test.framework.processing.TestComparatorUnit +import com.saveourtool.diktat.test.framework.util.checkForkedJavaHome +import com.saveourtool.diktat.test.framework.util.deleteIfExistsRecursively +import com.saveourtool.diktat.test.framework.util.deleteIfExistsSilently +import com.saveourtool.diktat.test.framework.util.inheritJavaHome +import com.saveourtool.diktat.test.framework.util.isWindows +import com.saveourtool.diktat.test.framework.util.temporaryDirectory import generated.KTLINT_VERSION import mu.KotlinLogging diff --git a/diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt b/diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSmokeTest.kt similarity index 84% rename from diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt rename to diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSmokeTest.kt index 4924dea0bc..ff575f36c7 100644 --- a/diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTest.kt +++ b/diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSmokeTest.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.ruleset.smoke +package com.saveourtool.diktat.ruleset.smoke -import org.cqfn.diktat.api.DiktatError -import org.cqfn.diktat.ktlint.format -import org.cqfn.diktat.ruleset.rules.DiktatRuleSetProvider -import org.cqfn.diktat.test.framework.processing.TestComparatorUnit +import com.saveourtool.diktat.api.DiktatError +import com.saveourtool.diktat.ktlint.format +import com.saveourtool.diktat.ruleset.rules.DiktatRuleSetProvider +import com.saveourtool.diktat.test.framework.processing.TestComparatorUnit import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach import java.nio.file.Path diff --git a/diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTestBase.kt b/diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSmokeTestBase.kt similarity index 81% rename from diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTestBase.kt rename to diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSmokeTestBase.kt index 0b0a1cf580..61da709e7c 100644 --- a/diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTestBase.kt +++ b/diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSmokeTestBase.kt @@ -4,36 +4,36 @@ "BACKTICKS_PROHIBITED", ) -package org.cqfn.diktat.ruleset.smoke - -import org.cqfn.diktat.api.DiktatError -import org.cqfn.diktat.common.config.rules.DIKTAT_COMMON -import org.cqfn.diktat.common.config.rules.DIKTAT_RULE_SET_ID -import org.cqfn.diktat.common.config.rules.RulesConfig -import org.cqfn.diktat.common.config.rules.RulesConfigReader -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.constants.Warnings.EMPTY_BLOCK_STRUCTURE_ERROR -import org.cqfn.diktat.ruleset.constants.Warnings.FILE_NAME_MATCH_CLASS -import org.cqfn.diktat.ruleset.constants.Warnings.HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_NO_EMPTY_TAGS -import org.cqfn.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_PARAM_TAG -import org.cqfn.diktat.ruleset.constants.Warnings.MISSING_KDOC_CLASS_ELEMENTS -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.constants.Warnings.WRONG_INDENTATION -import org.cqfn.diktat.ruleset.rules.chapter1.FileNaming -import org.cqfn.diktat.ruleset.rules.chapter2.comments.CommentsRule -import org.cqfn.diktat.ruleset.rules.chapter2.comments.HeaderCommentRule -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocComments -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocFormatting -import org.cqfn.diktat.ruleset.rules.chapter2.kdoc.KdocMethods -import org.cqfn.diktat.ruleset.rules.chapter3.EmptyBlock -import org.cqfn.diktat.ruleset.rules.chapter6.classes.InlineClassesRule -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_AFTER_OPERATORS -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_BEFORE_DOT -import org.cqfn.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_FOR_EXPRESSION_BODIES -import org.cqfn.diktat.test.framework.util.deleteIfExistsSilently +package com.saveourtool.diktat.ruleset.smoke + +import com.saveourtool.diktat.api.DiktatError +import com.saveourtool.diktat.common.config.rules.DIKTAT_COMMON +import com.saveourtool.diktat.common.config.rules.DIKTAT_RULE_SET_ID +import com.saveourtool.diktat.common.config.rules.RulesConfig +import com.saveourtool.diktat.common.config.rules.RulesConfigReader +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.constants.Warnings.EMPTY_BLOCK_STRUCTURE_ERROR +import com.saveourtool.diktat.ruleset.constants.Warnings.FILE_NAME_MATCH_CLASS +import com.saveourtool.diktat.ruleset.constants.Warnings.HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_NO_EMPTY_TAGS +import com.saveourtool.diktat.ruleset.constants.Warnings.KDOC_WITHOUT_PARAM_TAG +import com.saveourtool.diktat.ruleset.constants.Warnings.MISSING_KDOC_CLASS_ELEMENTS +import com.saveourtool.diktat.ruleset.constants.Warnings.MISSING_KDOC_ON_FUNCTION +import com.saveourtool.diktat.ruleset.constants.Warnings.MISSING_KDOC_TOP_LEVEL +import com.saveourtool.diktat.ruleset.constants.Warnings.WRONG_INDENTATION +import com.saveourtool.diktat.ruleset.rules.chapter1.FileNaming +import com.saveourtool.diktat.ruleset.rules.chapter2.comments.CommentsRule +import com.saveourtool.diktat.ruleset.rules.chapter2.comments.HeaderCommentRule +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocComments +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocFormatting +import com.saveourtool.diktat.ruleset.rules.chapter2.kdoc.KdocMethods +import com.saveourtool.diktat.ruleset.rules.chapter3.EmptyBlock +import com.saveourtool.diktat.ruleset.rules.chapter6.classes.InlineClassesRule +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_AFTER_OPERATORS +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_BEFORE_DOT +import com.saveourtool.diktat.ruleset.utils.indentation.IndentationConfig.Companion.EXTENDED_INDENT_FOR_EXPRESSION_BODIES +import com.saveourtool.diktat.test.framework.util.deleteIfExistsSilently import com.charleskorn.kaml.Yaml import com.charleskorn.kaml.YamlConfiguration @@ -147,7 +147,7 @@ abstract class DiktatSmokeTestBase { """.trimMargin() ), DIKTAT_COMMON to mapOf( - "domainName" to "org.cqfn.diktat", + "domainName" to "com.saveourtool.diktat", "kotlinVersion" to "1.3.7" ) ) @@ -211,9 +211,9 @@ abstract class DiktatSmokeTestBase { assertThat(unfixedLintErrors).containsExactlyInAnyOrder( DiktatError(1, 1, "$DIKTAT_RULE_SET_ID:${HeaderCommentRule.NAME_ID}", "${HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE.warnText()} there are 2 declared classes and/or objects", false), - DiktatError(15, 23, "$DIKTAT_RULE_SET_ID:${KdocMethods.NAME_ID}", + DiktatError(15, 30, "$DIKTAT_RULE_SET_ID:${KdocMethods.NAME_ID}", "${KDOC_WITHOUT_PARAM_TAG.warnText()} createWithFile (containerName)", true), - DiktatError(31, 14, "$DIKTAT_RULE_SET_ID:${EmptyBlock.NAME_ID}", + DiktatError(31, 21, "$DIKTAT_RULE_SET_ID:${EmptyBlock.NAME_ID}", "${EMPTY_BLOCK_STRUCTURE_ERROR.warnText()} empty blocks are forbidden unless it is function with override keyword", false) ) } @@ -237,21 +237,21 @@ abstract class DiktatSmokeTestBase { assertThat(unfixedLintErrors).containsExactlyInAnyOrder( DiktatError(1, 1, "$DIKTAT_RULE_SET_ID:${FileNaming.NAME_ID}", "${FILE_NAME_MATCH_CLASS.warnText()} Example1Test.kt vs Example", true), DiktatError(1, 1, "$DIKTAT_RULE_SET_ID:${KdocFormatting.NAME_ID}", "${KDOC_NO_EMPTY_TAGS.warnText()} @return", false), - DiktatError(3, 6, "$DIKTAT_RULE_SET_ID:${KdocComments.NAME_ID}", "${MISSING_KDOC_TOP_LEVEL.warnText()} Example", false), - DiktatError(3, 26, "$DIKTAT_RULE_SET_ID:${KdocComments.NAME_ID}", "${MISSING_KDOC_CLASS_ELEMENTS.warnText()} isValid", false), - DiktatError(6, 9, "$DIKTAT_RULE_SET_ID:${KdocComments.NAME_ID}", "${MISSING_KDOC_CLASS_ELEMENTS.warnText()} foo", false), - DiktatError(8, 8, "$DIKTAT_RULE_SET_ID:${KdocComments.NAME_ID}", "${MISSING_KDOC_CLASS_ELEMENTS.warnText()} foo", false), - DiktatError(8, 8, "$DIKTAT_RULE_SET_ID:${KdocMethods.NAME_ID}", "${MISSING_KDOC_ON_FUNCTION.warnText()} foo", false), + DiktatError(3, 13, "$DIKTAT_RULE_SET_ID:${KdocComments.NAME_ID}", "${MISSING_KDOC_TOP_LEVEL.warnText()} Example", false), + DiktatError(3, 33, "$DIKTAT_RULE_SET_ID:${KdocComments.NAME_ID}", "${MISSING_KDOC_CLASS_ELEMENTS.warnText()} isValid", false), + DiktatError(6, 16, "$DIKTAT_RULE_SET_ID:${KdocComments.NAME_ID}", "${MISSING_KDOC_CLASS_ELEMENTS.warnText()} foo", false), + DiktatError(8, 15, "$DIKTAT_RULE_SET_ID:${KdocComments.NAME_ID}", "${MISSING_KDOC_CLASS_ELEMENTS.warnText()} foo", false), + DiktatError(8, 15, "$DIKTAT_RULE_SET_ID:${KdocMethods.NAME_ID}", "${MISSING_KDOC_ON_FUNCTION.warnText()} foo", false), /* * This 2nd `MISSING_KDOC_ON_FUNCTION` is a duplicate caused by * https://github.com/saveourtool/diktat/issues/1538. */ DiktatError(6, 5, "$DIKTAT_RULE_SET_ID:${KdocMethods.NAME_ID}", "${MISSING_KDOC_ON_FUNCTION.warnText()} foo", false), - DiktatError(9, 3, "$DIKTAT_RULE_SET_ID:${EmptyBlock.NAME_ID}", EMPTY_BLOCK_STRUCTURE_ERROR.warnText() + + DiktatError(9, 10, "$DIKTAT_RULE_SET_ID:${EmptyBlock.NAME_ID}", EMPTY_BLOCK_STRUCTURE_ERROR.warnText() + " empty blocks are forbidden unless it is function with override keyword", false), - DiktatError(12, 10, "$DIKTAT_RULE_SET_ID:${KdocFormatting.NAME_ID}", "${KDOC_NO_EMPTY_TAGS.warnText()} @return", false), - DiktatError(14, 8, "$DIKTAT_RULE_SET_ID:${KdocFormatting.NAME_ID}", "${KDOC_NO_EMPTY_TAGS.warnText()} @return", false), - DiktatError(19, 20, "$DIKTAT_RULE_SET_ID:${KdocFormatting.NAME_ID}", "${KDOC_NO_EMPTY_TAGS.warnText()} @return", false) + DiktatError(12, 17, "$DIKTAT_RULE_SET_ID:${KdocFormatting.NAME_ID}", "${KDOC_NO_EMPTY_TAGS.warnText()} @return", false), + DiktatError(14, 15, "$DIKTAT_RULE_SET_ID:${KdocFormatting.NAME_ID}", "${KDOC_NO_EMPTY_TAGS.warnText()} @return", false), + DiktatError(19, 27, "$DIKTAT_RULE_SET_ID:${KdocFormatting.NAME_ID}", "${KDOC_NO_EMPTY_TAGS.warnText()} @return", false) ) } } @@ -304,8 +304,8 @@ abstract class DiktatSmokeTestBase { fun `smoke test with multiplatform project layout`() { fixAndCompare( prepareOverriddenRulesConfig(), - "../../jsMain/kotlin/org/cqfn/diktat/scripts/ScriptExpected.kt", - "../../jsMain/kotlin/org/cqfn/diktat/scripts/ScriptTest.kt" + "../../jsMain/kotlin/com/saveourtool/diktat/scripts/ScriptExpected.kt", + "../../jsMain/kotlin/com/saveourtool/diktat/scripts/ScriptTest.kt" ) } @@ -349,7 +349,7 @@ abstract class DiktatSmokeTestBase { emptyList(), mapOf( DIKTAT_COMMON to mapOf( - "domainName" to "org.cqfn.diktat", + "domainName" to "com.saveourtool.diktat", "disabledChapters" to "Naming,3,4,5,Classes" ) ) diff --git a/diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTestUtils.kt b/diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSmokeTestUtils.kt similarity index 94% rename from diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTestUtils.kt rename to diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSmokeTestUtils.kt index f0aa07d2a5..515c3d8875 100644 --- a/diktat-ruleset/src/test/kotlin/org/cqfn/diktat/ruleset/smoke/DiktatSmokeTestUtils.kt +++ b/diktat-ruleset/src/test/kotlin/com/saveourtool/diktat/ruleset/smoke/DiktatSmokeTestUtils.kt @@ -1,8 +1,8 @@ @file:Suppress("HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -package org.cqfn.diktat.ruleset.smoke +package com.saveourtool.diktat.ruleset.smoke -import org.cqfn.diktat.test.framework.util.retry +import com.saveourtool.diktat.test.framework.util.retry import mu.KotlinLogging import org.assertj.core.api.Assertions.fail import java.net.URL diff --git a/diktat-ruleset/src/test/resources/test/smoke/build.gradle.kts_ b/diktat-ruleset/src/test/resources/test/smoke/build.gradle.kts_ index 6ef1da3310..d3511ced5c 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/build.gradle.kts_ +++ b/diktat-ruleset/src/test/resources/test/smoke/build.gradle.kts_ @@ -1,8 +1,8 @@ -import org.cqfn.diktat.generation.docs.generateAvailableRules +import com.saveourtool.diktat.generation.docs.generateAvailableRules plugins { kotlin("jvm") version "1.4.21" - id("org.cqfn.diktat.diktat-gradle-plugin") version "0.1.7" + id("com.saveourtool.diktat.diktat-gradle-plugin") version "0.1.7" } repositories { diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/org/cqfn/diktat/scripts/ScriptExpected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/com/saveourtool/diktat/scripts/ScriptExpected.kt similarity index 73% rename from diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/org/cqfn/diktat/scripts/ScriptExpected.kt rename to diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/com/saveourtool/diktat/scripts/ScriptExpected.kt index e2e48831b3..44665ed894 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/org/cqfn/diktat/scripts/ScriptExpected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/com/saveourtool/diktat/scripts/ScriptExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.scripts +package com.saveourtool.diktat.scripts import kotlinx.browser.document diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/org/cqfn/diktat/scripts/ScriptTest.kt b/diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/com/saveourtool/diktat/scripts/ScriptTest.kt similarity index 76% rename from diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/org/cqfn/diktat/scripts/ScriptTest.kt rename to diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/com/saveourtool/diktat/scripts/ScriptTest.kt index 40c40c62e7..e7b71e2ee5 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/org/cqfn/diktat/scripts/ScriptTest.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/jsMain/kotlin/com/saveourtool/diktat/scripts/ScriptTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.js +package com.saveourtool.diktat.js import kotlinx.browser.document diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Bug1Expected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Bug1Expected.kt index e7725a17b8..3002657074 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Bug1Expected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Bug1Expected.kt @@ -1,5 +1,5 @@ // ;warn:$line: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 +package com.saveourtool.diktat // ;warn:$line:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: D (cannot be auto-corrected){{.*}} // ;warn:7: [CLASS_NAME_INCORRECT] class/enum/interface name should be in PascalCase and should contain only latin (ASCII) letters or numbers: D{{.*}} diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example1Expected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example1Expected.kt index 245270602d..76f068ffca 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example1Expected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example1Expected.kt @@ -1,5 +1,5 @@ // ;warn:$line: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 +package com.saveourtool.diktat // ;warn:$line:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: Example (cannot be auto-corrected){{.*}} class Example { diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example2Expected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example2Expected.kt index 5980b28ab8..0a85ecf462 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example2Expected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example2Expected.kt @@ -1,5 +1,5 @@ // ;warn:$line: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 +package com.saveourtool.diktat import org.slf4j.LoggerFactory diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example3Expected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example3Expected.kt index 4eda631a88..2e65e837f5 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example3Expected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example3Expected.kt @@ -1,5 +1,5 @@ // ;warn:$line: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 +package com.saveourtool.diktat /* * Copyright (c) Your Company Name Here. 2010-2020 diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example4Expected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example4Expected.kt index 7d6caf22e0..74d4bce76d 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example4Expected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example4Expected.kt @@ -1,5 +1,5 @@ // ;warn:$line: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: Example4Expected.kt vs SpecialTagsInKdoc{{.*}} -package org.cqfn.diktat +package com.saveourtool.diktat // ;warn:$line:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: SpecialTagsInKdoc (cannot be auto-corrected){{.*}} class SpecialTagsInKdoc { diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example4Test.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example4Test.kt index 552a34989c..7652a8027d 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example4Test.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example4Test.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat +package com.saveourtool.diktat class SpecialTagsInKdoc { diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt index 9a5929c2ca..72d4e5d1d3 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example5Expected.kt @@ -8,7 +8,7 @@ http://www.apache.org/licenses/LICENSE-2.0 */ -package org.cqfn.diktat +package com.saveourtool.diktat // ;warn:$line:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: Some (cannot be auto-corrected){{.*}} // ;warn:$line-1:1: [USE_DATA_CLASS] this class can be converted to a data class: Some (cannot be auto-corrected){{.*}} diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example5Test.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example5Test.kt index d54fe0ad3f..bb7ca98749 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example5Test.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example5Test.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat +package com.saveourtool.diktat class Some { val config = Config() diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example6Expected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example6Expected.kt index 9bdcb65370..13750a0a97 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example6Expected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example6Expected.kt @@ -1,5 +1,5 @@ // ;warn:$line: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 0 declared classes and/or objects (cannot be auto-corrected){{.*}} -package org.cqfn.diktat +package com.saveourtool.diktat val foo = """ diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example6Test.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example6Test.kt index 928041b459..cd3e7ca56b 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example6Test.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example6Test.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat +package com.saveourtool.diktat val foo = """ diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example7Expected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example7Expected.kt index 13003be074..61cb043903 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example7Expected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example7Expected.kt @@ -1,5 +1,5 @@ // ;warn:$line: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 0 declared classes and/or objects (cannot be auto-corrected){{.*}} -package org.cqfn.diktat +package com.saveourtool.diktat // ;warn:$line:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: foo (cannot be auto-corrected){{.*}} // ;warn:$line-1:1: [MISSING_KDOC_ON_FUNCTION] all public, internal and protected functions should have Kdoc with proper tags: foo (cannot be auto-corrected){{.*}} diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example7Test.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example7Test.kt index d3d37b5ae9..969d3c5593 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example7Test.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example7Test.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat +package com.saveourtool.diktat fun foo() { val prop: Int? = null diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example8Expected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example8Expected.kt index b067b335fa..fbe6e05ed2 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example8Expected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example8Expected.kt @@ -1,5 +1,5 @@ // ;warn:$line: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 0 declared classes and/or objects (cannot be auto-corrected) (diktat-ruleset:header-comment) -package org.cqfn.diktat +package com.saveourtool.diktat // ;warn:$line:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: foo (cannot be auto-corrected) (diktat-ruleset:kdoc-comments) // ;warn:$line-1:1: [MISSING_KDOC_ON_FUNCTION] all public, internal and protected functions should have Kdoc with proper tags: foo (cannot be auto-corrected) (diktat-ruleset:kdoc-methods) diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example8Test.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example8Test.kt index 33cf27b281..b3756a80d4 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example8Test.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/Example8Test.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat +package com.saveourtool.diktat fun foo() { val sum: (Int, Int, Int,) -> Int = fun( diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/KdocFormattingMultilineTagsExpected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/KdocFormattingMultilineTagsExpected.kt index 3539faf081..4678212fd2 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/KdocFormattingMultilineTagsExpected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/KdocFormattingMultilineTagsExpected.kt @@ -1,5 +1,5 @@ // ;warn:$line: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 0 declared classes and/or objects (cannot be auto-corrected) (diktat-ruleset:header-comment) -package org.cqfn.diktat +package com.saveourtool.diktat /** * @param bar lorem ipsum diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/LocalVariableWithOffsetExpected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/LocalVariableWithOffsetExpected.kt index 0f137e5f54..2b2d497f9c 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/LocalVariableWithOffsetExpected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/LocalVariableWithOffsetExpected.kt @@ -1,5 +1,5 @@ // ;warn:$line: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 0 declared classes and/or objects (cannot be auto-corrected) (diktat-ruleset:header-comment) -package org.cqfn.diktat +package com.saveourtool.diktat // ;warn:$line:1: [MISSING_KDOC_TOP_LEVEL] all public and internal top-level classes and functions should have Kdoc: boo (cannot be auto-corrected) (diktat-ruleset:kdoc-comments) override fun boo() { diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/LocalVariableWithOffsetTest.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/LocalVariableWithOffsetTest.kt index 10fa014e9a..e7469418ba 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/LocalVariableWithOffsetTest.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/LocalVariableWithOffsetTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat +package com.saveourtool.diktat override fun boo() { val listTestResult: MutableList = mutableListOf() diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/ManyLineTransformInLongLineExpected.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/ManyLineTransformInLongLineExpected.kt index d6c5617213..7050b840dd 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/ManyLineTransformInLongLineExpected.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/ManyLineTransformInLongLineExpected.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat +package com.saveourtool.diktat fun foo() { (1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 or 12 or 13 or 14 or 15 or 16 or 17 or 18 or 19 or 20 or 21 or 22 or 23 or 24 or 25 or 26 or 27 or 28 or 29 or 30 or 31 diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/ManyLineTransformInLongLineTest.kt b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/ManyLineTransformInLongLineTest.kt index d5b4f26d1b..3a19841560 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/ManyLineTransformInLongLineTest.kt +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/ManyLineTransformInLongLineTest.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat +package com.saveourtool.diktat fun foo(){ (1 diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/script/PackageInScriptExpected.kts b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/script/PackageInScriptExpected.kts index f822bdc6f6..8bbed5573e 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/script/PackageInScriptExpected.kts +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/script/PackageInScriptExpected.kts @@ -1,5 +1,5 @@ // ;warn:$line: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 0 declared classes and/or objects (cannot be auto-corrected) (diktat-ruleset:header-comment) -package org.cqfn.diktat.script +package com.saveourtool.diktat.script run { // ;warn:5: [DEBUG_PRINT] use a dedicated logging library: found println() (cannot be auto-corrected) (diktat-ruleset:debug-print) diff --git a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/script/PackageInScriptTest.kts b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/script/PackageInScriptTest.kts index 0eb929bd91..92c6b0e826 100644 --- a/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/script/PackageInScriptTest.kts +++ b/diktat-ruleset/src/test/resources/test/smoke/src/main/kotlin/script/PackageInScriptTest.kts @@ -1,4 +1,4 @@ -package org.cqfn.diktat.script +package com.saveourtool.diktat.script run { println("hello world!") diff --git a/diktat-test-framework/build.gradle.kts b/diktat-test-framework/build.gradle.kts index 5878a32fcf..6bb75bbafc 100644 --- a/diktat-test-framework/build.gradle.kts +++ b/diktat-test-framework/build.gradle.kts @@ -1,6 +1,6 @@ plugins { - id("org.cqfn.diktat.buildutils.kotlin-jvm-configuration") - id("org.cqfn.diktat.buildutils.code-quality-convention") + id("com.saveourtool.diktat.buildutils.kotlin-jvm-configuration") + id("com.saveourtool.diktat.buildutils.code-quality-convention") } project.description = "Test framework for diktat" diff --git a/diktat-test-framework/src/main/java/org/cqfn/diktat/test/framework/common/StreamGobbler.java b/diktat-test-framework/src/main/java/com/saveourtool/diktat/test/framework/common/StreamGobbler.java similarity index 97% rename from diktat-test-framework/src/main/java/org/cqfn/diktat/test/framework/common/StreamGobbler.java rename to diktat-test-framework/src/main/java/com/saveourtool/diktat/test/framework/common/StreamGobbler.java index 309c0c66f5..45f60bafee 100644 --- a/diktat-test-framework/src/main/java/org/cqfn/diktat/test/framework/common/StreamGobbler.java +++ b/diktat-test-framework/src/main/java/com/saveourtool/diktat/test/framework/common/StreamGobbler.java @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.framework.common; +package com.saveourtool.diktat.test.framework.common; import java.io.BufferedReader; import java.io.IOException; diff --git a/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/TestEntry.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/TestEntry.kt new file mode 100644 index 0000000000..3b6291ce63 --- /dev/null +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/TestEntry.kt @@ -0,0 +1,16 @@ +package com.saveourtool.diktat.test.framework + +import com.saveourtool.diktat.test.framework.config.TestArgumentsReader +import com.saveourtool.diktat.test.framework.config.TestFrameworkProperties +import com.saveourtool.diktat.test.framework.processing.TestProcessingFactory + +/** + * Main entry point for test executions + */ +object TestEntry { + @JvmStatic + fun main(args: Array) { + val properties = TestFrameworkProperties("com/saveourtool/diktat/test/framework/test_framework.properties") + TestProcessingFactory(TestArgumentsReader(args, properties, javaClass.classLoader)).processTests() + } +} diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/common/ExecutionResult.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/common/ExecutionResult.kt similarity index 81% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/common/ExecutionResult.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/common/ExecutionResult.kt index 5ceffb11ec..3131d07746 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/common/ExecutionResult.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/common/ExecutionResult.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.framework.common +package com.saveourtool.diktat.test.framework.common /** * Class that keeps the result of executed command diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/common/LocalCommandExecutor.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/common/LocalCommandExecutor.kt similarity index 95% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/common/LocalCommandExecutor.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/common/LocalCommandExecutor.kt index 7a8e3fd402..b2a2617f16 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/common/LocalCommandExecutor.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/common/LocalCommandExecutor.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.framework.common +package com.saveourtool.diktat.test.framework.common import mu.KotlinLogging diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/common/TestBase.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/common/TestBase.kt similarity index 81% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/common/TestBase.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/common/TestBase.kt index 54f91b0715..46b9fe782d 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/common/TestBase.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/common/TestBase.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.test.framework.common +package com.saveourtool.diktat.test.framework.common -import org.cqfn.diktat.test.framework.config.TestConfig -import org.cqfn.diktat.test.framework.config.TestFrameworkProperties +import com.saveourtool.diktat.test.framework.config.TestConfig +import com.saveourtool.diktat.test.framework.config.TestFrameworkProperties /** * Base interface for different test runners diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestArgumentsReader.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestArgumentsReader.kt similarity index 94% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestArgumentsReader.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestArgumentsReader.kt index 42ad373eee..426f7081d4 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestArgumentsReader.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestArgumentsReader.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.test.framework.config +package com.saveourtool.diktat.test.framework.config -import org.cqfn.diktat.common.cli.CliArgument -import org.cqfn.diktat.common.config.reader.JsonResourceConfigReader +import com.saveourtool.diktat.common.cli.CliArgument +import com.saveourtool.diktat.common.config.reader.JsonResourceConfigReader import mu.KotlinLogging import org.apache.commons.cli.CommandLine diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestConfig.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestConfig.kt similarity index 97% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestConfig.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestConfig.kt index ed696d6f12..4afa88548c 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestConfig.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestConfig.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.framework.config +package com.saveourtool.diktat.test.framework.config import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestConfigReader.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestConfigReader.kt similarity index 89% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestConfigReader.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestConfigReader.kt index 5322de1932..741c6c0a25 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestConfigReader.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestConfigReader.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.test.framework.config +package com.saveourtool.diktat.test.framework.config -import org.cqfn.diktat.common.config.reader.JsonResourceConfigReader +import com.saveourtool.diktat.common.config.reader.JsonResourceConfigReader import java.io.BufferedReader import java.io.IOException diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestFrameworkProperties.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestFrameworkProperties.kt similarity index 89% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestFrameworkProperties.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestFrameworkProperties.kt index ea2b5649fb..c29b4d2c13 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/config/TestFrameworkProperties.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/config/TestFrameworkProperties.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.test.framework.config +package com.saveourtool.diktat.test.framework.config -import org.cqfn.diktat.common.config.reader.ApplicationProperties +import com.saveourtool.diktat.common.config.reader.ApplicationProperties /** * [ApplicationProperties] for running tests diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/FileComparator.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/FileComparator.kt similarity index 96% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/FileComparator.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/FileComparator.kt index fed34e997e..8f07574773 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/FileComparator.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/FileComparator.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.test.framework.processing +package com.saveourtool.diktat.test.framework.processing -import org.cqfn.diktat.test.framework.util.readTextOrNull +import com.saveourtool.diktat.test.framework.util.readTextOrNull import io.github.petertrr.diffutils.diff import io.github.petertrr.diffutils.patch.ChangeDelta import io.github.petertrr.diffutils.text.DiffRowGenerator diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/FileComparisonResult.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/FileComparisonResult.kt similarity index 94% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/FileComparisonResult.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/FileComparisonResult.kt index 5ec4fa877c..75477cef66 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/FileComparisonResult.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/FileComparisonResult.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.test.framework.processing +package com.saveourtool.diktat.test.framework.processing import org.intellij.lang.annotations.Language diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/ResourceReader.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/ResourceReader.kt similarity index 95% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/ResourceReader.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/ResourceReader.kt index b118ce5ff0..f95630a1e7 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/ResourceReader.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/ResourceReader.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.test.framework.processing +package com.saveourtool.diktat.test.framework.processing -import org.cqfn.diktat.test.framework.util.readTextOrNull +import com.saveourtool.diktat.test.framework.util.readTextOrNull import mu.KotlinLogging import java.nio.file.Path import kotlin.io.path.createDirectories diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestCheckWarn.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestCheckWarn.kt similarity index 80% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestCheckWarn.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestCheckWarn.kt index 2a25bc6015..b21a6f83ad 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestCheckWarn.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestCheckWarn.kt @@ -1,6 +1,6 @@ -package org.cqfn.diktat.test.framework.processing +package com.saveourtool.diktat.test.framework.processing -import org.cqfn.diktat.test.framework.config.TestConfig +import com.saveourtool.diktat.test.framework.config.TestConfig import mu.KLogger import mu.KotlinLogging diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestComparatorUnit.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestComparatorUnit.kt similarity index 95% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestComparatorUnit.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestComparatorUnit.kt index 4b1c9ccb10..60b27635fe 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestComparatorUnit.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestComparatorUnit.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.test.framework.processing +package com.saveourtool.diktat.test.framework.processing -import org.cqfn.diktat.test.framework.util.readTextOrNull -import org.cqfn.diktat.test.framework.util.toUnixEndLines +import com.saveourtool.diktat.test.framework.util.readTextOrNull +import com.saveourtool.diktat.test.framework.util.toUnixEndLines import mu.KotlinLogging import java.nio.file.Path import kotlin.io.path.isRegularFile diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestCompare.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestCompare.kt similarity index 90% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestCompare.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestCompare.kt index d86f01d83c..872ff728a1 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestCompare.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestCompare.kt @@ -1,9 +1,9 @@ -package org.cqfn.diktat.test.framework.processing +package com.saveourtool.diktat.test.framework.processing -import org.cqfn.diktat.test.framework.common.ExecutionResult -import org.cqfn.diktat.test.framework.common.TestBase -import org.cqfn.diktat.test.framework.config.TestConfig -import org.cqfn.diktat.test.framework.config.TestFrameworkProperties +import com.saveourtool.diktat.test.framework.common.ExecutionResult +import com.saveourtool.diktat.test.framework.common.TestBase +import com.saveourtool.diktat.test.framework.config.TestConfig +import com.saveourtool.diktat.test.framework.config.TestFrameworkProperties import mu.KLogger import mu.KotlinLogging diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestMixed.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestMixed.kt similarity index 67% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestMixed.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestMixed.kt index 063de83afc..3b1ddf3a96 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestMixed.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestMixed.kt @@ -1,8 +1,8 @@ -package org.cqfn.diktat.test.framework.processing +package com.saveourtool.diktat.test.framework.processing -import org.cqfn.diktat.test.framework.common.TestBase -import org.cqfn.diktat.test.framework.config.TestConfig -import org.cqfn.diktat.test.framework.config.TestFrameworkProperties +import com.saveourtool.diktat.test.framework.common.TestBase +import com.saveourtool.diktat.test.framework.config.TestConfig +import com.saveourtool.diktat.test.framework.config.TestFrameworkProperties @Suppress( "MISSING_KDOC_TOP_LEVEL", diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestProcessingFactory.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestProcessingFactory.kt similarity index 88% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestProcessingFactory.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestProcessingFactory.kt index b3279467ae..39fdbb9369 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/processing/TestProcessingFactory.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/processing/TestProcessingFactory.kt @@ -1,10 +1,10 @@ -package org.cqfn.diktat.test.framework.processing +package com.saveourtool.diktat.test.framework.processing -import org.cqfn.diktat.test.framework.common.TestBase -import org.cqfn.diktat.test.framework.config.TestArgumentsReader -import org.cqfn.diktat.test.framework.config.TestConfig -import org.cqfn.diktat.test.framework.config.TestConfig.ExecutionType -import org.cqfn.diktat.test.framework.config.TestConfigReader +import com.saveourtool.diktat.test.framework.common.TestBase +import com.saveourtool.diktat.test.framework.config.TestArgumentsReader +import com.saveourtool.diktat.test.framework.config.TestConfig +import com.saveourtool.diktat.test.framework.config.TestConfig.ExecutionType +import com.saveourtool.diktat.test.framework.config.TestConfigReader import mu.KotlinLogging import java.io.File diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/util/TestUtils.kt b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/util/TestUtils.kt similarity index 99% rename from diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/util/TestUtils.kt rename to diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/util/TestUtils.kt index 6a90ac171f..4507082cf8 100644 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/util/TestUtils.kt +++ b/diktat-test-framework/src/main/kotlin/com/saveourtool/diktat/test/framework/util/TestUtils.kt @@ -2,7 +2,7 @@ * Utility classes and methods for tests */ -package org.cqfn.diktat.test.framework.util +package com.saveourtool.diktat.test.framework.util import mu.KotlinLogging diff --git a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/TestEntry.kt b/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/TestEntry.kt deleted file mode 100644 index e7cf44b36f..0000000000 --- a/diktat-test-framework/src/main/kotlin/org/cqfn/diktat/test/framework/TestEntry.kt +++ /dev/null @@ -1,16 +0,0 @@ -package org.cqfn.diktat.test.framework - -import org.cqfn.diktat.test.framework.config.TestArgumentsReader -import org.cqfn.diktat.test.framework.config.TestFrameworkProperties -import org.cqfn.diktat.test.framework.processing.TestProcessingFactory - -/** - * Main entry point for test executions - */ -object TestEntry { - @JvmStatic - fun main(args: Array) { - val properties = TestFrameworkProperties("org/cqfn/diktat/test/framework/test_framework.properties") - TestProcessingFactory(TestArgumentsReader(args, properties, javaClass.classLoader)).processTests() - } -} diff --git a/diktat-test-framework/src/main/resources/org/cqfn/diktat/test/framework/test_arguments.json b/diktat-test-framework/src/main/resources/com/saveourtool/diktat/test/framework/test_arguments.json similarity index 100% rename from diktat-test-framework/src/main/resources/org/cqfn/diktat/test/framework/test_arguments.json rename to diktat-test-framework/src/main/resources/com/saveourtool/diktat/test/framework/test_arguments.json diff --git a/diktat-test-framework/src/main/resources/org/cqfn/diktat/test/framework/test_configs/functional/1_3_a_package_naming.json b/diktat-test-framework/src/main/resources/com/saveourtool/diktat/test/framework/test_configs/functional/1_3_a_package_naming.json similarity index 100% rename from diktat-test-framework/src/main/resources/org/cqfn/diktat/test/framework/test_configs/functional/1_3_a_package_naming.json rename to diktat-test-framework/src/main/resources/com/saveourtool/diktat/test/framework/test_configs/functional/1_3_a_package_naming.json diff --git a/diktat-test-framework/src/main/resources/org/cqfn/diktat/test/framework/test_configs/functional/1_3_b_package_naming.json b/diktat-test-framework/src/main/resources/com/saveourtool/diktat/test/framework/test_configs/functional/1_3_b_package_naming.json similarity index 100% rename from diktat-test-framework/src/main/resources/org/cqfn/diktat/test/framework/test_configs/functional/1_3_b_package_naming.json rename to diktat-test-framework/src/main/resources/com/saveourtool/diktat/test/framework/test_configs/functional/1_3_b_package_naming.json diff --git a/diktat-test-framework/src/main/resources/org/cqfn/diktat/test/framework/test_configs/functional/1_9_a_special_space_cases.json b/diktat-test-framework/src/main/resources/com/saveourtool/diktat/test/framework/test_configs/functional/1_9_a_special_space_cases.json similarity index 100% rename from diktat-test-framework/src/main/resources/org/cqfn/diktat/test/framework/test_configs/functional/1_9_a_special_space_cases.json rename to diktat-test-framework/src/main/resources/com/saveourtool/diktat/test/framework/test_configs/functional/1_9_a_special_space_cases.json diff --git a/diktat-test-framework/src/main/resources/org/cqfn/diktat/test/framework/test_framework.properties b/diktat-test-framework/src/main/resources/com/saveourtool/diktat/test/framework/test_framework.properties similarity index 100% rename from diktat-test-framework/src/main/resources/org/cqfn/diktat/test/framework/test_framework.properties rename to diktat-test-framework/src/main/resources/com/saveourtool/diktat/test/framework/test_framework.properties diff --git a/examples/gradle-groovy-dsl/build.gradle b/examples/gradle-groovy-dsl/build.gradle index d6c900bb6d..bd9acd3387 100644 --- a/examples/gradle-groovy-dsl/build.gradle +++ b/examples/gradle-groovy-dsl/build.gradle @@ -1,5 +1,5 @@ plugins { - id "org.cqfn.diktat.diktat-gradle-plugin" version "1.2.5" + id "com.saveourtool.diktat.diktat-gradle-plugin" version "1.2.5" } repositories { diff --git a/examples/gradle-groovy-dsl/diktat-analysis.yml b/examples/gradle-groovy-dsl/diktat-analysis.yml index ca09aa67e6..d9e19e9afb 100644 --- a/examples/gradle-groovy-dsl/diktat-analysis.yml +++ b/examples/gradle-groovy-dsl/diktat-analysis.yml @@ -175,7 +175,7 @@ - name: FILE_WILDCARD_IMPORTS enabled: true configuration: - allowedWildcards: "" # Allowed wildcards for imports (e.g. "import org.cqfn.diktat.*, import org.jetbrains.kotlin.*") + allowedWildcards: "" # Allowed wildcards for imports (e.g. "import com.saveourtool.diktat.*, import org.jetbrains.kotlin.*") useRecommendedImportsOrder: true # Checks unused imports - name: UNUSED_IMPORT diff --git a/examples/gradle-kotlin-dsl-multiproject/backend/build.gradle.kts b/examples/gradle-kotlin-dsl-multiproject/backend/build.gradle.kts index 1faaddfe76..8990dfba43 100644 --- a/examples/gradle-kotlin-dsl-multiproject/backend/build.gradle.kts +++ b/examples/gradle-kotlin-dsl-multiproject/backend/build.gradle.kts @@ -1,4 +1,4 @@ plugins { kotlin("jvm") - id("org.cqfn.diktat.diktat-gradle-plugin") + id("com.saveourtool.diktat.diktat-gradle-plugin") } diff --git a/examples/gradle-kotlin-dsl-multiproject/build.gradle.kts b/examples/gradle-kotlin-dsl-multiproject/build.gradle.kts index 125752722e..31b6ac0d50 100644 --- a/examples/gradle-kotlin-dsl-multiproject/build.gradle.kts +++ b/examples/gradle-kotlin-dsl-multiproject/build.gradle.kts @@ -1,8 +1,8 @@ -import org.cqfn.diktat.plugin.gradle.DiktatExtension +import com.saveourtool.diktat.plugin.gradle.DiktatExtension plugins { kotlin("jvm") version "1.8.21" - id("org.cqfn.diktat.diktat-gradle-plugin") + id("com.saveourtool.diktat.diktat-gradle-plugin") } allprojects { @@ -10,7 +10,7 @@ allprojects { mavenLocal() mavenCentral() } - apply(plugin = "org.cqfn.diktat.diktat-gradle-plugin") + apply(plugin = "com.saveourtool.diktat.diktat-gradle-plugin") configure { diktatConfigFile = rootProject.file("diktat-analysis.yml") inputs { include("src/**/*.kt") } diff --git a/examples/gradle-kotlin-dsl-multiproject/diktat-analysis.yml b/examples/gradle-kotlin-dsl-multiproject/diktat-analysis.yml index ca09aa67e6..d9e19e9afb 100644 --- a/examples/gradle-kotlin-dsl-multiproject/diktat-analysis.yml +++ b/examples/gradle-kotlin-dsl-multiproject/diktat-analysis.yml @@ -175,7 +175,7 @@ - name: FILE_WILDCARD_IMPORTS enabled: true configuration: - allowedWildcards: "" # Allowed wildcards for imports (e.g. "import org.cqfn.diktat.*, import org.jetbrains.kotlin.*") + allowedWildcards: "" # Allowed wildcards for imports (e.g. "import com.saveourtool.diktat.*, import org.jetbrains.kotlin.*") useRecommendedImportsOrder: true # Checks unused imports - name: UNUSED_IMPORT diff --git a/examples/gradle-kotlin-dsl/build.gradle.kts b/examples/gradle-kotlin-dsl/build.gradle.kts index 9315c99e41..be4038109d 100644 --- a/examples/gradle-kotlin-dsl/build.gradle.kts +++ b/examples/gradle-kotlin-dsl/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("org.cqfn.diktat.diktat-gradle-plugin") version "1.2.5" + id("com.saveourtool.diktat.diktat-gradle-plugin") version "1.2.5" } repositories { diff --git a/examples/gradle-kotlin-dsl/diktat-analysis.yml b/examples/gradle-kotlin-dsl/diktat-analysis.yml index ca09aa67e6..d9e19e9afb 100644 --- a/examples/gradle-kotlin-dsl/diktat-analysis.yml +++ b/examples/gradle-kotlin-dsl/diktat-analysis.yml @@ -175,7 +175,7 @@ - name: FILE_WILDCARD_IMPORTS enabled: true configuration: - allowedWildcards: "" # Allowed wildcards for imports (e.g. "import org.cqfn.diktat.*, import org.jetbrains.kotlin.*") + allowedWildcards: "" # Allowed wildcards for imports (e.g. "import com.saveourtool.diktat.*, import org.jetbrains.kotlin.*") useRecommendedImportsOrder: true # Checks unused imports - name: UNUSED_IMPORT diff --git a/examples/maven/diktat-analysis.yml b/examples/maven/diktat-analysis.yml index ca09aa67e6..d9e19e9afb 100644 --- a/examples/maven/diktat-analysis.yml +++ b/examples/maven/diktat-analysis.yml @@ -175,7 +175,7 @@ - name: FILE_WILDCARD_IMPORTS enabled: true configuration: - allowedWildcards: "" # Allowed wildcards for imports (e.g. "import org.cqfn.diktat.*, import org.jetbrains.kotlin.*") + allowedWildcards: "" # Allowed wildcards for imports (e.g. "import com.saveourtool.diktat.*, import org.jetbrains.kotlin.*") useRecommendedImportsOrder: true # Checks unused imports - name: UNUSED_IMPORT diff --git a/examples/maven/pom.xml b/examples/maven/pom.xml index fcfd32ea09..b8c255ab47 100644 --- a/examples/maven/pom.xml +++ b/examples/maven/pom.xml @@ -2,7 +2,7 @@ 4.0.0 - org.cqfn.diktat + com.saveourtool.diktat diktat-examples-maven pom 1.2.6-SNAPSHOT @@ -20,7 +20,7 @@ - org.cqfn.diktat + com.saveourtool.diktat diktat-maven-plugin ${diktat.version} diff --git a/gradle.properties b/gradle.properties index 31df874aed..069014f93a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -group=org.cqfn.diktat +group=com.saveourtool.diktat # gradle performance org.gradle.jvmargs=-Xmx3g -XX:MaxMetaspaceSize=512m diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b12ba38f9d..b260037581 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -41,7 +41,7 @@ okio = "3.3.0" kotlinx-datetime = "0.4.0" kotlinx-coroutines = "1.6.4" assertj = "3.24.2" -diktat = "1.2.5" +diktat = "2.0.0" jgit = "6.5.0.202303070854-r" mockito = "5.2.0" mockito-kotlin = "4.1.0" @@ -167,7 +167,7 @@ validation-api = { module = "jakarta.validation:jakarta.validation-api"} annotation-api = { module = "jakarta.annotation:jakarta.annotation-api"} # code quality -diktat-gradle-plugin = { module = "org.cqfn.diktat:diktat-gradle-plugin", version.ref = "diktat" } +diktat-gradle-plugin = { module = "com.saveourtool.diktat:diktat-gradle-plugin", version.ref = "diktat" } detekt-gradle-plugin = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" } gradle-plugin-spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" } reckon-gradle-plugin = { module = "org.ajoberstar.reckon:reckon-gradle", version.ref = "reckon" } diff --git a/gradle/plugins/build.gradle.kts b/gradle/plugins/build.gradle.kts index f2125efba9..974faac77f 100644 --- a/gradle/plugins/build.gradle.kts +++ b/gradle/plugins/build.gradle.kts @@ -16,30 +16,34 @@ repositories { gradlePluginPortal() } -dependencies { - // workaround https://github.com/gradle/gradle/issues/15383 - implementation(files(project.libs.javaClass.superclass.protectionDomain.codeSource.location)) - implementation(libs.kotlin.gradle.plugin) - implementation(libs.reckon.gradle.plugin) - implementation(libs.detekt.gradle.plugin) { - exclude("io.github.detekt.sarif4k", "sarif4k") - } - implementation(libs.diktat.gradle.plugin) { - exclude("io.github.detekt.sarif4k", "sarif4k") - } - implementation(libs.sarif4k) - implementation(libs.gradle.plugin.spotless) - implementation(libs.publish.gradle.plugin) - // extra dependencies - implementation(libs.kotlin.stdlib) - implementation(libs.kotlin.stdlib.common) - implementation(libs.kotlin.stdlib.jdk7) - implementation(libs.kotlin.stdlib.jdk8) - implementation(libs.jetbrains.annotations) -} - tasks.withType { compilerOptions { freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn") } } + +run { + @Suppress("COMMENTED_OUT_CODE", "WRONG_INDENTATION") + dependencies { + // workaround https://github.com/gradle/gradle/issues/15383 + implementation(files(project.libs.javaClass.superclass.protectionDomain.codeSource.location)) + implementation(libs.kotlin.gradle.plugin) + implementation(libs.reckon.gradle.plugin) + implementation(libs.detekt.gradle.plugin) { + exclude("io.github.detekt.sarif4k", "sarif4k") + } + // FixMe: return after 2.0.0 + /* implementation(libs.diktat.gradle.plugin) { + exclude("io.github.detekt.sarif4k", "sarif4k") + }*/ + implementation(libs.sarif4k) + implementation(libs.gradle.plugin.spotless) + implementation(libs.publish.gradle.plugin) + // extra dependencies + implementation(libs.kotlin.stdlib) + implementation(libs.kotlin.stdlib.common) + implementation(libs.kotlin.stdlib.jdk7) + implementation(libs.kotlin.stdlib.jdk8) + implementation(libs.jetbrains.annotations) + } +} diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/JacocoConfiguration.kt b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/JacocoConfiguration.kt similarity index 96% rename from gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/JacocoConfiguration.kt rename to gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/JacocoConfiguration.kt index aac1062534..a8c4f7f931 100644 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/JacocoConfiguration.kt +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/JacocoConfiguration.kt @@ -2,7 +2,7 @@ * Configuration for code coverage calculation via Jacoco */ -package org.cqfn.diktat.buildutils +package com.saveourtool.diktat.buildutils import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.api.Project diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/PublishingConfiguration.kt b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/PublishingConfiguration.kt similarity index 98% rename from gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/PublishingConfiguration.kt rename to gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/PublishingConfiguration.kt index 8f92f6024f..e032311b0b 100644 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/PublishingConfiguration.kt +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/PublishingConfiguration.kt @@ -7,7 +7,7 @@ "MISSING_KDOC_ON_FUNCTION", ) -package org.cqfn.diktat.buildutils +package com.saveourtool.diktat.buildutils import io.github.gradlenexus.publishplugin.NexusPublishExtension import org.gradle.api.Named @@ -104,7 +104,7 @@ fun Project.configurePublications() { fun MavenPom.configurePom(project: Project) { name.set(project.name) description.set(project.description ?: project.name) - url.set("https://www.cqfn.org/diKTat/") + url.set("https://saveourtool.com") licenses { license { name.set("MIT License") diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/VersioningConfiguration.kt b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/VersioningConfiguration.kt similarity index 96% rename from gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/VersioningConfiguration.kt rename to gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/VersioningConfiguration.kt index efeb4c8467..04bc814484 100644 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/VersioningConfiguration.kt +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/VersioningConfiguration.kt @@ -2,7 +2,7 @@ * Configuration for project versioning */ -package org.cqfn.diktat.buildutils +package com.saveourtool.diktat.buildutils import org.ajoberstar.reckon.core.Scope import org.ajoberstar.reckon.gradle.ReckonExtension diff --git a/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/code-quality-convention.gradle.kts b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/code-quality-convention.gradle.kts new file mode 100644 index 0000000000..cc4213df04 --- /dev/null +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/code-quality-convention.gradle.kts @@ -0,0 +1,13 @@ +package com.saveourtool.diktat.buildutils + +// FixMe: remove after 2.0.0 +run { + @Suppress("RUN_IN_SCRIPT", "AVOID_NULL_CHECKS") + plugins { + id("com.saveourtool.diktat.buildutils.detekt-convention-configuration") + // FixMe: remove after 2.0.0 + if (System.getenv("DIKTAT_SNAPSHOT") != null) { + id("com.saveourtool.diktat.buildutils.diktat-convention-configuration") + } + } +} diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/detekt-convention-configuration.gradle.kts b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/detekt-convention-configuration.gradle.kts similarity index 96% rename from gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/detekt-convention-configuration.gradle.kts rename to gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/detekt-convention-configuration.gradle.kts index a63ca336e7..75fd92c9e2 100644 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/detekt-convention-configuration.gradle.kts +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/detekt-convention-configuration.gradle.kts @@ -1,4 +1,4 @@ -package org.cqfn.diktat.buildutils +package com.saveourtool.diktat.buildutils import io.gitlab.arturbosch.detekt.Detekt import io.gitlab.arturbosch.detekt.report.ReportMergeTask diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/diktat-convention-configuration.gradle.kts b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/diktat-convention-configuration.gradle.txt similarity index 56% rename from gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/diktat-convention-configuration.gradle.kts rename to gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/diktat-convention-configuration.gradle.txt index 351442a41b..af84f299f7 100644 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/diktat-convention-configuration.gradle.kts +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/diktat-convention-configuration.gradle.txt @@ -1,9 +1,7 @@ -package org.cqfn.diktat.buildutils - -import org.cqfn.diktat.plugin.gradle.DiktatJavaExecTaskBase +package com.saveourtool.diktat.buildutils plugins { - id("org.cqfn.diktat.diktat-gradle-plugin") + id("com.saveourtool.diktat.diktat-gradle-plugin") } diktat { @@ -25,13 +23,3 @@ diktat { } } } - -tasks.withType().configureEach { - val project = this@configureEach.project - if (this is JavaExec) { - javaLauncher.set(project.extensions.getByType().launcherFor { - // a temporary workaround -- diktat-gradle-plugin doesn't detect java version of `javaLauncher` - languageVersion.set(JavaLanguageVersion.of(11)) - }) - } -} diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/git-hook-configuration.gradle.kts b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/git-hook-configuration.gradle.kts similarity index 90% rename from gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/git-hook-configuration.gradle.kts rename to gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/git-hook-configuration.gradle.kts index 33882d3f25..c8a94fa524 100644 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/git-hook-configuration.gradle.kts +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/git-hook-configuration.gradle.kts @@ -1,4 +1,4 @@ -package org.cqfn.diktat.buildutils +package com.saveourtool.diktat.buildutils /** * Task of type [Copy] that install git hooks from directory in repo to .git directory diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/kotlin-jvm-configuration.gradle.kts b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/kotlin-jvm-configuration.gradle.kts similarity index 93% rename from gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/kotlin-jvm-configuration.gradle.kts rename to gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/kotlin-jvm-configuration.gradle.kts index e844ca9b75..4c9848f100 100644 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/kotlin-jvm-configuration.gradle.kts +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/kotlin-jvm-configuration.gradle.kts @@ -1,4 +1,4 @@ -package org.cqfn.diktat.buildutils +package com.saveourtool.diktat.buildutils import org.gradle.api.tasks.testing.Test import org.jetbrains.kotlin.gradle.tasks.KotlinCompile diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/publishing-configuration.gradle.kts b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/publishing-configuration.gradle.kts similarity index 95% rename from gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/publishing-configuration.gradle.kts rename to gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/publishing-configuration.gradle.kts index 50ca4ce47c..b4cca05387 100644 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/publishing-configuration.gradle.kts +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/publishing-configuration.gradle.kts @@ -1,4 +1,4 @@ -package org.cqfn.diktat.buildutils +package com.saveourtool.diktat.buildutils import io.github.gradlenexus.publishplugin.NexusPublishPlugin import org.gradle.kotlin.dsl.apply diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/publishing-signing-default-configuration.gradle.kts b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/publishing-signing-default-configuration.gradle.kts similarity index 74% rename from gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/publishing-signing-default-configuration.gradle.kts rename to gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/publishing-signing-default-configuration.gradle.kts index d53e3a5ad6..b5d4c0f7b5 100644 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/publishing-signing-default-configuration.gradle.kts +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/publishing-signing-default-configuration.gradle.kts @@ -1,11 +1,11 @@ -package org.cqfn.diktat.buildutils +package com.saveourtool.diktat.buildutils import org.gradle.api.publish.maven.MavenPublication import org.gradle.kotlin.dsl.create import org.gradle.kotlin.dsl.get plugins { - id("org.cqfn.diktat.buildutils.publishing-configuration") + id("com.saveourtool.diktat.buildutils.publishing-configuration") } run { diff --git a/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/versioning-configuration.gradle.kts b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/versioning-configuration.gradle.kts new file mode 100644 index 0000000000..39e9d1b53f --- /dev/null +++ b/gradle/plugins/src/main/kotlin/com/saveourtool/diktat/buildutils/versioning-configuration.gradle.kts @@ -0,0 +1,3 @@ +package com.saveourtool.diktat.buildutils + +configureVersioning() diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/code-quality-convention.gradle.kts b/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/code-quality-convention.gradle.kts deleted file mode 100644 index c6dcf2513e..0000000000 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/code-quality-convention.gradle.kts +++ /dev/null @@ -1,6 +0,0 @@ -package org.cqfn.diktat.buildutils - -plugins { - id("org.cqfn.diktat.buildutils.detekt-convention-configuration") - id("org.cqfn.diktat.buildutils.diktat-convention-configuration") -} diff --git a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/versioning-configuration.gradle.kts b/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/versioning-configuration.gradle.kts deleted file mode 100644 index 0fa18c6248..0000000000 --- a/gradle/plugins/src/main/kotlin/org/cqfn/diktat/buildutils/versioning-configuration.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -package org.cqfn.diktat.buildutils - -configureVersioning() diff --git a/info/build.gradle.kts b/info/build.gradle.kts index 25c8aabcae..c49ad27124 100644 --- a/info/build.gradle.kts +++ b/info/build.gradle.kts @@ -1,7 +1,7 @@ -import org.cqfn.diktat.generation.docs.generateAvailableRules -import org.cqfn.diktat.generation.docs.generateCodeStyle -import org.cqfn.diktat.generation.docs.generateFullDoc -import org.cqfn.diktat.generation.docs.generateRulesMapping +import com.saveourtool.diktat.generation.docs.generateAvailableRules +import com.saveourtool.diktat.generation.docs.generateCodeStyle +import com.saveourtool.diktat.generation.docs.generateFullDoc +import com.saveourtool.diktat.generation.docs.generateRulesMapping tasks.register("generateRulesMapping") { group = "documentation" diff --git a/info/buildSrc/build.gradle.kts b/info/buildSrc/build.gradle.kts index 0fa0852da5..d78d9ce84f 100644 --- a/info/buildSrc/build.gradle.kts +++ b/info/buildSrc/build.gradle.kts @@ -6,7 +6,7 @@ repositories { mavenCentral() mavenLocal { content { - includeGroup("org.cqfn.diktat") + includeGroup("com.saveourtool.diktat") } } flatDir { @@ -18,5 +18,5 @@ repositories { } dependencies { - implementation("org.cqfn.diktat:diktat-rules:$version") + implementation("com.saveourtool.diktat:diktat-rules:$version") } diff --git a/info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/FullDocGenerator.kt b/info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/FullDocGenerator.kt similarity index 93% rename from info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/FullDocGenerator.kt rename to info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/FullDocGenerator.kt index 29688e1b83..b792f9ad1d 100644 --- a/info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/FullDocGenerator.kt +++ b/info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/FullDocGenerator.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.generation.docs +package com.saveourtool.diktat.generation.docs import java.io.File diff --git a/info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/GenerationAvailableRules.kt b/info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/GenerationAvailableRules.kt similarity index 97% rename from info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/GenerationAvailableRules.kt rename to info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/GenerationAvailableRules.kt index d1757c9c53..6b9448d093 100644 --- a/info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/GenerationAvailableRules.kt +++ b/info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/GenerationAvailableRules.kt @@ -1,4 +1,4 @@ -package org.cqfn.diktat.generation.docs +package com.saveourtool.diktat.generation.docs import java.io.File diff --git a/info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/GenerationDocs.kt b/info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/GenerationDocs.kt similarity index 99% rename from info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/GenerationDocs.kt rename to info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/GenerationDocs.kt index 8ba319eb8e..573ec02bf7 100644 --- a/info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/GenerationDocs.kt +++ b/info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/GenerationDocs.kt @@ -1,6 +1,6 @@ @file:Suppress("FILE_NAME_MATCH_CLASS") -package org.cqfn.diktat.generation.docs +package com.saveourtool.diktat.generation.docs import java.io.File import java.io.PrintWriter diff --git a/info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/LatexUtils.kt b/info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/LatexUtils.kt similarity index 96% rename from info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/LatexUtils.kt rename to info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/LatexUtils.kt index dde58772f0..9257058c08 100644 --- a/info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/LatexUtils.kt +++ b/info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/LatexUtils.kt @@ -2,7 +2,7 @@ * This is a file, that contains utility methods for latex generation */ -package org.cqfn.diktat.generation.docs +package com.saveourtool.diktat.generation.docs import java.io.PrintWriter @@ -30,7 +30,7 @@ const val AUTO_TABLE = """ \scriptsize \begin{longtable}{ |l|p{0.8cm}|p{0.8cm}| p{3cm} | } \hline -\multicolumn{4}{|c|}{Available Rules} \\ +\multicolumn{4}{|c|}{Available Rules} \\ \hline \textbf{diKTat rule} & \textbf{code style} & \textbf{autofix} & \textbf{config} \\ \hline diff --git a/info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/WarningsTableGenerator.kt b/info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/WarningsTableGenerator.kt similarity index 90% rename from info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/WarningsTableGenerator.kt rename to info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/WarningsTableGenerator.kt index 4327cb36eb..796588aa17 100644 --- a/info/buildSrc/src/main/kotlin/org/cqfn/diktat/generation/docs/WarningsTableGenerator.kt +++ b/info/buildSrc/src/main/kotlin/com/saveourtool/diktat/generation/docs/WarningsTableGenerator.kt @@ -1,7 +1,7 @@ -package org.cqfn.diktat.generation.docs +package com.saveourtool.diktat.generation.docs -import org.cqfn.diktat.ruleset.constants.Warnings -import org.cqfn.diktat.ruleset.constants.getChapterByWarning +import com.saveourtool.diktat.ruleset.constants.Warnings +import com.saveourtool.diktat.ruleset.constants.getChapterByWarning import java.io.File diff --git a/info/guide/diktat-coding-convention.md b/info/guide/diktat-coding-convention.md index f83b5494e6..fd3b62d6db 100644 --- a/info/guide/diktat-coding-convention.md +++ b/info/guide/diktat-coding-convention.md @@ -907,7 +907,7 @@ Extension functions shouldn't have receivers declared in the same file according Valid example: ```kotlin -package org.cqfn.diktat.example +package com.saveourtool.diktat.example const val CONSTANT = 42 diff --git a/info/guide/guide-chapter-3.md b/info/guide/guide-chapter-3.md index 46922aaeea..5ee40294ca 100644 --- a/info/guide/guide-chapter-3.md +++ b/info/guide/guide-chapter-3.md @@ -93,7 +93,7 @@ Extension functions shouldn't have receivers declared in the same file according Valid example: ```kotlin -package org.cqfn.diktat.example +package com.saveourtool.diktat.example const val CONSTANT = 42 diff --git a/wp/sections/appendix.tex b/wp/sections/appendix.tex index 42cf658915..af5bc74cb4 100644 --- a/wp/sections/appendix.tex +++ b/wp/sections/appendix.tex @@ -12,7 +12,7 @@ \section*{Available Rules} \scriptsize \begin{longtable}{ |l|p{0.8cm}|p{0.8cm}| p{3cm} | } \hline -\multicolumn{4}{|c|}{Available Rules} \\ +\multicolumn{4}{|c|}{Available Rules} \\ \hline \textbf{diKTat rule} & \textbf{code style} & \textbf{autofix} & \textbf{config} \\ \hline @@ -283,7 +283,7 @@ \subsection*{\textbf{General principles}} As a young programming language, Kotlin is built on top of well-established languages such as Java, C++, C\#, and Scala. This enables Kotlin to introduce many features that help a developer write cleaner, more readable code while also reducing the number of complex code structures. For example, type and null safety, extension functions, infix syntax, immutability, val/var differentiation, expression-oriented features, "when" statements, much easier work with collections, type auto conversion, and other syntactic sugar. 2. Following Kotlin idioms - The author of Kotlin, Andrey Breslav, mentioned that Kotlin is both pragmatic and practical, but not academic. + The author of Kotlin, Andrey Breslav, mentioned that Kotlin is both pragmatic and practical, but not academic. Its pragmatic features enable ideas to be transformed into real working software easily. Kotlin is closer to natural languages than its predecessors, and it implements the following design principles: readability, reusability, interoperability, security, and tool-friendliness (https://blog.jetbrains.com/kotlin/2018/10/kotlinconf-2018-announcements/). 3. Using Kotlin efficiently Some Kotlin features can help you to write higher-performance code: including rich coroutine library, sequences, inline functions/classes, arrays of basic types, tailRec, and CallsInPlace of contract. @@ -332,7 +332,7 @@ \subsubsection*{\textbf{1.1.1 Identifiers naming conventions}} \end{center} 4. The usage of (\textbf{}) and free naming for functions and identifiers are prohibited. For example, the following code is not recommended: \begin{lstlisting}[language=Kotlin] -val `my dummy name-with-minus` = "value" +val `my dummy name-with-minus` = "value" \end{lstlisting} The only exception is function names in \textbf{Unit tests.} 5. Backticks (\textbf{}) should not be used for identifiers, except the names of test methods (marked with @Test annotation): @@ -381,11 +381,11 @@ \subsubsection*{\textbf{Rule 1.2.1 Package names dots}} Package names are in lower case and separated by dots. Code developed within your company should start with \textbf{your.company.domain.} Numbers are permitted in package names. Each file should have a \textbf{package} directive. Package names are all written in lowercase, and consecutive words are concatenated together (no underscores). Package names should contain both the product or module names and the department (or team) name to prevent conflicts with other teams. Numbers are not permitted. For example: \textbf{org.apache.commons.lang3}, \textbf{xxx.yyy.v2}. -\textbf{Exceptions:} +\textbf{Exceptions:} - In certain cases, such as open-source projects or commercial cooperation, package names should not start with \textbf{your.company.domain.} - If the package name starts with a number or other character that cannot be used at the beginning of the Java/Kotlin package name, then underscores are allowed. For example: \textbf{com.example.\_123name}. - Underscores are sometimes permitted if the package name contains reserved Java/Kotlin keywords, such as \textbf{org.example.hyphenated\_name}, \textbf{int\_.example}. -\textbf{Valid example}: +\textbf{Valid example}: \begin{lstlisting}[language=Kotlin] package your.company.domain.mobilecontrol.views \end{lstlisting} @@ -400,14 +400,14 @@ \subsubsection*{\textbf{1.3.1 Classes}} An interface name can also be a noun or noun phrase (such as \textbf{List}) or an adjective or adjective phrase (such as \textbf{Readable}). Note that verbs are not used to name classes. However, nouns (such as \textbf{Customer}, \textbf{WikiPage}, and \textbf{Account}) can be used. Try to avoid using vague words such as \textbf{Manager} and \textbf{Process}. 2. Test classes start with the name of the class they are testing and end with 'Test'. For example, \textbf{HashTest} or \textbf{HashIntegrationTest}. -\textbf{Invalid example}: +\textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] -class marcoPolo {} -class XMLService {} +class marcoPolo {} +class XMLService {} interface TAPromotion {} class info {} \end{lstlisting} -\textbf{Valid example}: +\textbf{Valid example}: \begin{lstlisting}[language=Kotlin] class MarcoPolo {} class XmlService {} @@ -436,9 +436,9 @@ \subsubsection*{\textbf{1.4.1 Function names should be in camel case}} d) \textbf{has} + Noun / adjective () e) verb() Note: Note: Verb are primarily used for the action objects, such as \textbf{document.print ()} -f) verb + noun() +f) verb + noun() g) The Callback function allows the names that use the preposition + verb format, such as: \textbf{onCreate()}, \textbf{onDestroy()}, \textbf{toString()}. -\textbf{Invalid example}: +\textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] fun type(): String fun Finished(): Boolean @@ -446,7 +446,7 @@ \subsubsection*{\textbf{1.4.1 Function names should be in camel case}} fun DRAW() fun KeyListener(Listener) \end{lstlisting} -\textbf{Valid example}: +\textbf{Valid example}: \begin{lstlisting}[language=Kotlin] fun getType(): String fun isFinished(): Boolean @@ -471,7 +471,7 @@ \subsubsection*{\textbf{1.5.1 Using UPPER case and underscore characters in a co You can avoid using magic numbers with the following method: - Using library functions and APIs. For example, instead of checking that \textbf{size == 0}, use \textbf{isEmpty()} function. To work with \textbf{time}, use built-ins from \textbf{java.time API}. - Enumerations can be used to name patterns. Refer to [Recommended usage scenario for enumeration in 3.9]. -\textbf{Invalid example}: +\textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] var int MAXUSERNUM = 200; val String sL = "Launcher"; @@ -491,12 +491,12 @@ \subsubsection*{\textbf{1.6.1 Non-constant field name}} A local variable cannot be treated as constant even if it is final and immutable. Therefore, it should not use the preceding rules. Names of collection type variables (sets, lists, etc.) should contain plural nouns. For example: \textbf{var namesList: List} Names of non-constant variables should use \textbf{lowerCamelCase}. The name of the final immutable field used to store the singleton object can use the same camel case notation. -\textbf{Invalid example}: +\textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] customername: String user: List = listof() \end{lstlisting} -\textbf{Valid example}: +\textbf{Valid example}: \begin{lstlisting}[language=Kotlin] var customerName: String val users: List = listOf(); @@ -510,7 +510,7 @@ \subsubsection*{\textbf{1.6.2 Boolean variable names with negative meaning}} The JavaBeans specification automatically generates isXxx() getters for attributes of Boolean classes. However, not all methods returning Boolean type have this notation. For Boolean local variables or methods, it is highly recommended that you add non-meaningful prefixes, including is (commonly used by JavaBeans), has, can, should, and must. Modern integrated development environments (IDEs) such as Intellij are already capable of doing this for you when you generate getters in Java. For Kotlin, this process is even more straightforward as everything is on the byte-code level under the hood. -\textbf{Invalid example}: +\textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] val isNoError: Boolean val isNotFound: Boolean @@ -535,7 +535,7 @@ \section*{\textbf{2. Comments}} Comments are not a solution to the wrong code. Instead, you should fix the code as soon as you notice an issue or plan to fix it (by entering a TODO comment, including a Jira number). Comments should accurately reflect the code's design ideas and logic and further describe its business logic. As a result, other programmers will be able to save time when trying to understand the code. -Imagine that you are writing the comments to help yourself to understand the original ideas behind the code in the future. +Imagine that you are writing the comments to help yourself to understand the original ideas behind the code in the future. \subsection*{\textbf{2.1 General form of Kdoc}} \label{sec:2.1} KDoc is a combination of JavaDoc's block tags syntax (extended to support specific constructions of Kotlin) and Markdown's inline markup. @@ -589,7 +589,7 @@ \subsubsection*{\textbf{2.1.1 Using KDoc for the public}} \end{lstlisting} \textbf{Exceptions:} * For setters/getters of properties, obvious comments (like \textbf{this getter returns field}) are optional. Note that Kotlin generates simple \textbf{get/set} methods under the hood. - + * It is optional to add comments for simple one-line methods, such as shown in the example below: \begin{lstlisting}[language=Kotlin] val isEmpty: Boolean @@ -606,18 +606,18 @@ \subsubsection*{\textbf{2.1.2 Describing methods that have arguments}} When the method has such details as arguments, return value, or can throw exceptions, it must be described in the KDoc block (with @param, @return, @throws, etc.). \textbf{Valid examples:} \begin{lstlisting}[language=Kotlin] -/** +/** * This is the short overview comment for the example interface. * / * Add a blank line between the comment text and each KDoc tag underneath * / * @since 1.6 */ protected abstract class Sample { /** - * This is a long comment with whitespace that should be split in + * This is a long comment with whitespace that should be split in * comments on multiple lines if the line comment formatting is enabled. * / * Add a blank line between the comment text and each KDoc tag underneath * / * @param fox A quick brown fox jumps over the lazy dog - * @return battle between fox and dog + * @return battle between fox and dog */ protected abstract fun foo(Fox fox) /** @@ -627,9 +627,9 @@ \subsubsection*{\textbf{2.1.2 Describing methods that have arguments}} * @throws ProblemException if lazy dog wins */ protected fun bar() throws ProblemException { - // Some comments / * No need to add a blank line here * / + // Some comments / * No need to add a blank line here * / var aVar = ... - // Some comments / * Add a blank line before the comment * / + // Some comments / * Add a blank line before the comment * / fun doSome() } } @@ -654,9 +654,9 @@ \subsubsection*{\textbf{2.1.3 Only one space between the Kdoc tag and content. T - KDoc does not support the \textbf{@deprecated} tag. Instead, use the \textbf{@Deprecated} annotation. - The \textbf{@since} tag should be used for versions only. Do not use dates in \textbf{@since} tag, it's confusing and less accurate. If a tag block cannot be described in one line, indent the content of the new line by \textit{four spaces} from the \textbf{@} position to achieve alignment (\textbf{@} counts as one + three spaces). - + \textbf{Exception:} - + When the descriptive text in a tag block is too long to wrap, you can indent the alignment with the descriptive text in the last line. The descriptive text of multiple tags does not need to be aligned. See [3.8 Horizontal space]. In Kotlin, compared to Java, you can put several classes inside one file, so each class should have a Kdoc formatted comment (as stated in rule 2.1). @@ -710,7 +710,7 @@ \subsubsection*{\textbf{2.2.1 Formatting of comments in the file header}} \end{lstlisting} - The \textbf{copyright statement} can use your company's subsidiaries, as shown in the below examples: \ Chinese version: \textbf{版权所有 (c) 海思半导体 2012-2020} \ -English version: \textbf{Copyright (c) Hisilicon Technologies Co., Ltd. 2012-2020. All rights reserved.} +English version: \textbf{Copyright (c) Hisilicon Technologies Co., Ltd. 2012-2020. All rights reserved.} - The copyright information should not be written in KDoc style or use single-line comments. It must start from the beginning of the file. The following example is a copyright statement for Huawei, without other functional comments: \begin{lstlisting}[language=Kotlin] @@ -742,9 +742,9 @@ \subsubsection*{\textbf{2.4.1 Add a blank line between the body of the comment a - An empty line should not exist between a Kdoc and the code it is describing. You do not need to add a blank line before the first comment in a particular namespace (code block) (for example, between the function declaration and first comment in a function body). \textbf{Valid Examples:} \begin{lstlisting}[language=Kotlin] -/** +/** * This is the short overview comment for the example interface. - * + * * @since 1.6 */ public interface Example { @@ -755,29 +755,29 @@ \subsubsection*{\textbf{2.4.1 Add a blank line between the body of the comment a val bField: String = ... /* Add a blank line above the comment */ /** - * This is a long comment with whitespace that should be split in + * This is a long comment with whitespace that should be split in * multiple line comments in case the line comment formatting is enabled. * /* blank line between description and Kdoc tag */ * @param fox A quick brown fox jumps over the lazy dog - * @return the rounds of battle of fox and dog + * @return the rounds of battle of fox and dog */ fun foo(Fox fox) /* Add a blank line above the comment */ /** * These possibilities include: Formatting of header comments - * + * * @return the rounds of battle of fox and dog * @throws ProblemException if lazy dog wins */ fun bar() throws ProblemException { // Some comments /* Since it is the first member definition in this range, there is no need to add a blank line here */ var aVar = ... - // Some comments /* Add a blank line above the comment */ + // Some comments /* Add a blank line above the comment */ fun doSome() } } \end{lstlisting} -- Leave one single space between the comment on the right side of the code and the code. +- Leave one single space between the comment on the right side of the code and the code. If you use conditional comments in the \textbf{if-else-if} scenario, put the comments inside the \textbf{else-if} branch or in the conditional block, but not before the \textbf{else-if}. This makes the code more understandable. When the if-block is used with curly braces, the comment should be placed on the next line after opening the curly braces. Compared to Java, the \textbf{if} statement in Kotlin statements returns a value. For this reason, a comment block can describe a whole \textbf{if-statement}. @@ -815,7 +815,7 @@ \subsubsection*{\textbf{2.4.2 Do not comment on unused code blocks}} Unused imports increase the coupling of the code and are not conducive to maintenance. The commented out code cannot be appropriately maintained. In an attempt to reuse the code, there is a high probability that you will introduce defects that are easily missed. The correct approach is to delete the unnecessary code directly and immediately when it is not used anymore. -If you need the code again, consider porting or rewriting it as changes could have occurred since you first commented on the code. +If you need the code again, consider porting or rewriting it as changes could have occurred since you first commented on the code. \subsubsection*{\textbf{2.4.3 Code delivered to the client should not contain TODO}} \leavevmode\newline \label{sec:2.4.3} @@ -850,8 +850,8 @@ \subsubsection*{\textbf{3.1.2 Code blocks in the source file should be separated 4. Import statements 5. Top-class header and top-function header comments 6. Top-level classes or functions -b) Each of the preceding code blocks should be separated by a blank line. -c) Import statements are alphabetically arranged, without using line breaks and wildcards ( wildcard imports - \textbf{*}). +b) Each of the preceding code blocks should be separated by a blank line. +c) Import statements are alphabetically arranged, without using line breaks and wildcards ( wildcard imports - \textbf{*}). d) \textbf{Recommendation}: One \textbf{.kt} source file should contain only one class declaration, and its name should match the filename e) Avoid empty files that do not contain the code or contain only imports/comments/package name f) Unused imports should be removed @@ -912,7 +912,7 @@ \subsubsection*{\textbf{3.1.5 Order of declaration of top-level code structures} Extension functions shouldn't have receivers declared in the same file according to [rule 6.2.3] Valid example: \begin{lstlisting}[language=Kotlin] -package org.cqfn.diktat.example +package com.saveourtool.diktat.example const val CONSTANT = 42 val topLevelProperty = "String constant" interface IExample @@ -940,7 +940,7 @@ \subsection*{\textbf{3.2 Braces}} \subsubsection*{\textbf{3.2.1 Using braces in conditional statements and loop blocks}} \leavevmode\newline \label{sec:3.2.1} -Braces should always be used in \textbf{if}, \textbf{else}, \textbf{for}, \textbf{do}, and \textbf{while} statements, even if the program body is empty or contains only one statement. In special Kotlin \textbf{when} statements, you do not need to use braces for single-line statements. +Braces should always be used in \textbf{if}, \textbf{else}, \textbf{for}, \textbf{do}, and \textbf{while} statements, even if the program body is empty or contains only one statement. In special Kotlin \textbf{when} statements, you do not need to use braces for single-line statements. \textbf{Valid example:} \begin{lstlisting}[language=Kotlin] when (node.elementType) { @@ -951,7 +951,7 @@ \subsubsection*{\textbf{3.2.1 Using braces in conditional statements and loop bl CLASS -> checkClassElements(node) } \end{lstlisting} -\textbf{Exception:} The only exception is ternary operator in Kotlin (a single line \textbf{if () <> else <>} ) +\textbf{Exception:} The only exception is ternary operator in Kotlin (a single line \textbf{if () <> else <>} ) \textbf{Invalid example:} \begin{lstlisting}[language=Kotlin] val value = if (string.isEmpty()) // WRONG! @@ -959,7 +959,7 @@ \subsubsection*{\textbf{3.2.1 Using braces in conditional statements and loop bl else 1 \end{lstlisting} -\textbf{Valid example}: +\textbf{Valid example}: \begin{lstlisting}[language=Kotlin] val value = if (string.isEmpty()) 0 else 1 // Okay \end{lstlisting} @@ -979,7 +979,7 @@ \subsubsection*{\textbf{3.2.2 Opening braces are placed at the end of the line - The closing brace is on its own new line. - The closing brace can be followed by a newline character. The only exceptions are \textbf{else}, \textbf{finally}, and \textbf{while} (from \textbf{do-while} statement), or \textbf{catch} keywords. These keywords should not be split from the closing brace by a newline character. -\textbf{Exception cases}: +\textbf{Exception cases}: 1) For lambdas, there is no need to put a newline character after the first (function-related) opening brace. A newline character should appear only after an arrow (\textbf{->}) (see [point 5 of Rule 3.6.2]). \begin{lstlisting}[language=Kotlin] arg.map { value -> @@ -994,16 +994,16 @@ \subsubsection*{\textbf{3.2.2 Opening braces are placed at the end of the line } else { x-- } -} while (x > 0) +} while (x > 0) \end{lstlisting} - + \textbf{Valid example:} \begin{lstlisting}[language=Kotlin] return arg.map { value -> while (condition()) { method() } - value + value } return MyClass() { @Override @@ -1042,46 +1042,46 @@ \subsection*{\textbf{3.3 Indentation}} foo(value) } \end{lstlisting} - + \textbf{Exceptions}: 1. Argument lists: \ a) Eight spaces are used to indent argument lists (both in declarations and at call sites). \ -b) Arguments in argument lists can be aligned if they are on different lines. +b) Arguments in argument lists can be aligned if they are on different lines. 2. Eight spaces are used if there is a newline after any binary operator. 3. Eight spaces are used for functional-like styles when the newline is placed before the dot. 4. Supertype lists: \ a) Four spaces are used if the colon before the supertype list is on a new line. \ -b) Four spaces are used before each supertype, and eight spaces are used if the colon is on a new line. -\textbf{Note:} there should be an indentation after all statements such as \textbf{if}, \textbf{for}, etc. However, according to this code style, such statements require braces. +b) Four spaces are used before each supertype, and eight spaces are used if the colon is on a new line. +\textbf{Note:} there should be an indentation after all statements such as \textbf{if}, \textbf{for}, etc. However, according to this code style, such statements require braces. \begin{lstlisting}[language=Kotlin] if (condition) foo() \end{lstlisting} -\textbf{Exceptions}: +\textbf{Exceptions}: - When breaking the parameter list of a method/class constructor, it can be aligned with \textbf{8 spaces}. A parameter that was moved to a new line can be on the same level as the previous argument: - + \begin{lstlisting}[language=Kotlin] fun visit( node: ASTNode, autoCorrect: Boolean, params: KtLint.ExperimentalParams, emit: (offset: Int, errorMessage: String, canBeAutoCorrected: Boolean) -> Unit -) { +) { } \end{lstlisting} - + - Such operators as \textbf{+}/\textbf{-}/\textbf{*} can be indented with \textbf{8 spaces}: - + \begin{lstlisting}[language=Kotlin] val abcdef = "my splitted" + " string" \end{lstlisting} - + - A list of supertypes should be indented with \textbf{4 spaces} if they are on different lines or with \textbf{8 spaces} if the leading colon is also on a separate line \begin{lstlisting}[language=Kotlin] class A : B() - + class A : B() @@ -1092,12 +1092,12 @@ \subsection*{\textbf{3.4 Empty blocks}} Generally, empty code blocks are prohibited; using them is considered a bad practice (especially for catch block). They are only appropriate for overridden functions when the base class's functionality is not needed in the class-inheritor. \begin{lstlisting}[language=Kotlin] -override fun foo() { +override fun foo() { } \end{lstlisting} \textbf{Valid examples} (note once again that generally empty blocks are prohibited): \begin{lstlisting}[language=Kotlin] -fun doNothing() {} +fun doNothing() {} fun doNothingElse() { } \end{lstlisting} @@ -1124,7 +1124,7 @@ \subsection*{\textbf{3.5 Line length}} All characters in the ASCII character set include letters (such as \textbf{a, A}), numbers (such as \textbf{0, 3}), and punctuation spaces (such as \textbf{,} , \textbf{\{}), all of which are narrow characters. Wide characters are also called "full-width" characters. Chinese characters (such as \textbf{中, 文}), Chinese punctuation (\textbf{,} , \textbf{;} ), full-width letters and numbers (such as \textbf{A、3}) are "full-width" characters. Each one of these characters represents two narrow characters. -- Any line that exceeds this limit (\textbf{120 narrow symbols}) should be wrapped, as described in the [Newline section]. +- Any line that exceeds this limit (\textbf{120 narrow symbols}) should be wrapped, as described in the [Newline section]. \textbf{Exceptions:} 1. The long URL or long JSON method reference in KDoc. 2. The \textbf{package} and \textbf{import} statements. @@ -1150,23 +1150,23 @@ \subsubsection*{\textbf{3.6.2 Rules for line-breaking}} \label{sec:3.6.2} 1) Unlike Java, Kotlin allows you not to put a semicolon (\textbf{;}) after each statement separated by a newline character. There should be no redundant semicolon at the end of the lines. - + When a newline character is needed to split the line, it should be placed after such operators as \textbf{\&\&}/\textbf{||}/\textbf{+}/etc. and all infix functions (for example, \textbf{xor}). However, the newline character should be placed before operators such as \textbf{.}, \textbf{?.}, \textbf{?:}, and \textbf{::}. Note that all comparison operators, such as \textbf{==}, \textbf{>}, \textbf{<}, should not be split. -\textbf{Invalid example}: +\textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] if (node != null && test != null) {} \end{lstlisting} - -\textbf{Valid example}: + +\textbf{Valid example}: \begin{lstlisting}[language=Kotlin] - if (node != null && + if (node != null && test != null) { } \end{lstlisting} - + \textbf{Note:} You need to follow the functional style, meaning each function call in a chain with \textbf{.} should start at a new line if the chain of functions contains more than one call: \begin{lstlisting}[language=Kotlin] val value = otherValue!! @@ -1175,21 +1175,21 @@ \subsubsection*{\textbf{3.6.2 Rules for line-breaking}} val a = true true } - .size + .size \end{lstlisting} \textbf{Note:} The parser prohibits the separation of the \textbf{!!} operator from the value it is checking. \textbf{Exception}: If a functional chain is used inside the branches of a ternary operator, it does not need to be split with newlines. -\textbf{Valid example}: +\textbf{Valid example}: \begin{lstlisting}[language=Kotlin] if (condition) list.map { foo(it) }.filter { bar(it) } else list.drop(1) \end{lstlisting} \textbf{Note:} If dot qualified expression is inside condition or passed as an argument - it should be replaced with new variable. -\textbf{Invalid example}: +\textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] if (node.treeParent.treeParent.findChildByType(IDENTIFIER) != null) {} \end{lstlisting} - -\textbf{Valid example}: + +\textbf{Valid example}: \begin{lstlisting}[language=Kotlin] val grandIdentifier = node .treeParent @@ -1197,13 +1197,13 @@ \subsubsection*{\textbf{3.6.2 Rules for line-breaking}} .findChildByType(IDENTIFIER) if (grandIdentifier != null) {} \end{lstlisting} - + 2) Newlines should be placed after the assignment operator (\textbf{=}). 3) In function or class declarations, the name of a function or constructor should not be split by a newline from the opening brace \textbf{(}. A brace should be placed immediately after the name without any spaces in declarations or at call sites. 4) Newlines should be placed right after the comma (\textbf{,}). 5) If a lambda statement contains more than one line in its body, a newline should be placed after an arrow if the lambda statement has explicit parameters. - If it uses an implicit parameter (\textbf{it}), the newline character should be placed after the opening brace (\textbf{\{}). + If it uses an implicit parameter (\textbf{it}), the newline character should be placed after the opening brace (\textbf{\{}). The following examples illustrate this rule: \textbf{Invalid example:} \begin{lstlisting}[language=Kotlin] @@ -1211,7 +1211,7 @@ \subsubsection*{\textbf{3.6.2 Rules for line-breaking}} bar() } \end{lstlisting} -\textbf{Valid example:} +\textbf{Valid example:} \begin{lstlisting}[language=Kotlin] value.map { name -> foo() @@ -1219,10 +1219,10 @@ \subsubsection*{\textbf{3.6.2 Rules for line-breaking}} } val someValue = { node:String -> node } \end{lstlisting} -6) When the function contains only a single expression, it can be written as \href{https://kotlinlang.org/docs/reference/functions.html#single-expression-functions}{expression function}. +6) When the function contains only a single expression, it can be written as \href{https://kotlinlang.org/docs/reference/functions.html#single-expression-functions}{expression function}. The below example shows the style that should not be used. - -Instead of: + +Instead of: \begin{lstlisting}[language=Kotlin] override fun toString(): String { return "hi" } \end{lstlisting} @@ -1231,7 +1231,7 @@ \subsubsection*{\textbf{3.6.2 Rules for line-breaking}} override fun toString() = "hi" \end{lstlisting} 7) If an argument list in a function declaration (including constructors) or function call contains more than two arguments, these arguments should be split by newlines in the following style. -\textbf{Valid example:} +\textbf{Valid example:} \begin{lstlisting}[language=Kotlin] class Foo(val a: String, b: String, @@ -1249,7 +1249,7 @@ \subsubsection*{\textbf{3.6.2 Rules for line-breaking}} Kotlin 1.4 introduced a trailing comma as an optional feature, so it is generally recommended to place all parameters on a separate line and append \href{https://kotlinlang.org/docs/reference/whatsnew14.html#trailing-comma}{trailing comma}. It makes the resolving of merge conflicts easier. -\textbf{Valid example:} +\textbf{Valid example:} \begin{lstlisting}[language=Kotlin] fun foo( a: String, @@ -1272,7 +1272,7 @@ \subsubsection*{\textbf{3.6.2 Rules for line-breaking}} Type parameters Destructuring declarations 8) If the supertype list has more than two elements, they should be separated by newlines. -\textbf{Valid example:} +\textbf{Valid example:} \begin{lstlisting}[language=Kotlin] class MyFavouriteVeryLongClassHolder : MyLongHolder(), @@ -1289,7 +1289,7 @@ \subsection*{\textbf{3.7 Using blank lines}} \textbf{Valid example:} \begin{lstlisting}[language=Kotlin] fun baz() { - + doSomething() // No need to add blank lines at the beginning and end of the code block // ... } @@ -1312,8 +1312,8 @@ \subsubsection*{\textbf{3.8.1: Usage of whitespace for code separation}} foo({x: Int -> x}, 5) // no space before '{' \end{lstlisting} 4. Single whitespace should be placed on both sides of binary operators. This also applies to operator-like symbols. - For example: - + For example: + - A colon in generic structures with the \textbf{where} keyword: \textbf{where T : Type} - Arrow in lambdas: \textbf{(str: String) -> str.length()} \textbf{Exceptions:} @@ -1329,20 +1329,20 @@ \subsubsection*{\textbf{3.8.1: Usage of whitespace for code separation}} However, note that this code style prohibits the use of (\textbf{;}) in the middle of a line ([see 3.3.2]). There should be no whitespaces at the end of a line. The only scenario where there should be no space after a colon is when the colon is used in the annotation to specify a use-site target (for example, \textbf{@param:JsonProperty}). - There should be no spaces before \textbf{,} , \textbf{:} and \textbf{;}. - + There should be no spaces before \textbf{,} , \textbf{:} and \textbf{;}. + \textbf{Exceptions} for spaces and colons: - + - When \textbf{:} is used to separate a type and a supertype, including an anonymous object (after object keyword) - When delegating to a superclass constructor or different constructor of the same class \textbf{Valid example:} \begin{lstlisting}[language=Kotlin] abstract class Foo : IFoo { } - + class FooImpl : Foo() { constructor(x: String) : this(x) { /*...*/ } - - val x = object : IFoo { /*...*/ } + + val x = object : IFoo { /*...*/ } } \end{lstlisting} 6. There should be \textit{only one space} between the identifier and its type: \textbf{list: List} @@ -1412,7 +1412,7 @@ \subsection*{\textbf{3.9 Enumerations}} \begin{lstlisting}[language=Kotlin] enum class TemperatureScale { CELSIUS, FAHRENHEIT } \end{lstlisting} -- The variable value only changes within a fixed range and is defined with the enum type. +- The variable value only changes within a fixed range and is defined with the enum type. - Avoid comparison with magic numbers of \textbf{-1, 0, and 1}; use enums instead. \begin{lstlisting}[language=Kotlin] enum class ComparisonResult { @@ -1428,7 +1428,7 @@ \subsection*{\textbf{3.10 Variable declaration}} \subsubsection*{\textbf{3.10.1 Declare one variable per line}} \leavevmode\newline \label{sec:3.10.1} -Each property or variable must be declared on a separate line. +Each property or variable must be declared on a separate line. \textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] val n1: Int; val n2: Int @@ -1448,7 +1448,7 @@ \subsection*{\textbf{3.11 'When' expression}} \subsection*{\textbf{3.12 Annotations}} \label{sec:3.12} Each annotation applied to a class, method or constructor should be placed on its own line. Consider the following examples: -1. Annotations applied to the class, method or constructor are placed on separate lines (one annotation per line). +1. Annotations applied to the class, method or constructor are placed on separate lines (one annotation per line). \textbf{Valid example}: \begin{lstlisting}[language=Kotlin] @MustBeDocumented @@ -1526,7 +1526,7 @@ \subsection*{\textbf{3.15 Strings}} \subsubsection*{\textbf{3.15.1 Concatenation of Strings}} \leavevmode\newline \label{sec:3.15.1} -String concatenation is prohibited if the string can fit on one line. Use raw strings and string templates instead. Kotlin has significantly improved the use of Strings: +String concatenation is prohibited if the string can fit on one line. Use raw strings and string templates instead. Kotlin has significantly improved the use of Strings: \href{https://kotlinlang.org/docs/reference/basic-types.html#string-templates}{String templates}, \href{https://kotlinlang.org/docs/reference/basic-types.html#string-literals}{Raw strings}. Therefore, compared to using explicit concatenation, code looks much better when proper Kotlin strings are used for short lines, and you do not need to split them with newline characters. \textbf{Invalid example}: @@ -1573,7 +1573,7 @@ \subsubsection*{\textbf{4.1.1 Do not use Float and Double types when accurate ca \label{sec:4.1.1} Floating-point numbers provide a good approximation over a wide range of values, but they cannot produce accurate results in some cases. Binary floating-point numbers are unsuitable for precise calculations because it is impossible to represent 0.1 or any other negative power of 10 in a \textbf{binary representation} with a finite length. -The following code example seems to be obvious: +The following code example seems to be obvious: \begin{lstlisting}[language=Kotlin] val myValue = 2.0 - 1.1 println(myValue) @@ -1586,7 +1586,7 @@ \subsubsection*{\textbf{4.1.1 Do not use Float and Double types when accurate ca \begin{lstlisting}[language=Kotlin] val eFloat = 2.7182818284f // Float, will be rounded to 2.7182817 \end{lstlisting} -\textbf{Valid example}: (when precise calculations are needed): +\textbf{Valid example}: (when precise calculations are needed): \begin{lstlisting}[language=Kotlin] val income = BigDecimal("2.0") val expense = BigDecimal("1.1") @@ -1611,7 +1611,7 @@ \subsubsection*{\textbf{4.1.2: Comparing numeric float type values}} println("Expected to enter here") } else { println("But this block will be reached") -} +} \end{lstlisting} \textbf{Valid example}: \begin{lstlisting}[language=Kotlin] @@ -1651,13 +1651,13 @@ \subsubsection*{\textbf{4.2.1: Use Contracts and smart cast as much as possible} \end{lstlisting} Also, Kotlin 1.3 introduced \href{https://kotlinlang.org/docs/reference/whatsnew13.html#contracts}{Contracts} that provide enhanced logic for smart-cast. Contracts are used and are very stable in \textbf{stdlib}, for example: - + \begin{lstlisting}[language=Kotlin] fun bar(x: String?) { if (!x.isNullOrEmpty()) { println("length of '$x' is ${x.length}") // smartcasted to not-null } -} +} \end{lstlisting} Smart cast and contracts are a better choice because they reduce boilerplate code and features forced type conversion. \textbf{Invalid example}: @@ -1710,11 +1710,11 @@ \subsubsection*{\textbf{4.3.1: Avoid declaring variables with nullable types}} val a: Int = 0 \end{lstlisting} Nevertheless, when using Java libraries extensively, you have to use nullable types and enrich the code with \textbf{!!} and \textbf{?} symbols. -Avoid using nullable types for Kotlin stdlib (declared in \href{https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/}{official documentation}). +Avoid using nullable types for Kotlin stdlib (declared in \href{https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/}{official documentation}). Try to use initializers for empty collections. For example, if you want to initialize a list instead of \textbf{null}, use \textbf{emptyList()}. \textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] -val a: List? = null +val a: List? = null \end{lstlisting} \textbf{Valid example}: \begin{lstlisting}[language=Kotlin] @@ -1725,24 +1725,24 @@ \subsubsection*{\textbf{4.3.2: Variables of generic types should have an explici \label{sec:4.3.2} Like in Java, classes in Kotlin may have type parameters. To create an instance of such a class, we typically need to provide type arguments: \begin{lstlisting}[language=Kotlin] -val myVariable: Map = emptyMap() +val myVariable: Map = emptyMap() \end{lstlisting} However, the compiler can inherit type parameters from the r-value (value assigned to a variable). Therefore, it will not force users to declare the type explicitly. These declarations are not recommended because programmers would need to find the return value and understand the variable type by looking at the method. \textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] -val myVariable = emptyMap() +val myVariable = emptyMap() \end{lstlisting} \textbf{Valid example}: \begin{lstlisting}[language=Kotlin] -val myVariable: Map = emptyMap() +val myVariable: Map = emptyMap() \end{lstlisting} \subsubsection*{\textbf{4.3.3 Null-safety}} \leavevmode\newline \label{sec:4.3.3} -Try to avoid explicit null checks (explicit comparison with \textbf{null}) +Try to avoid explicit null checks (explicit comparison with \textbf{null}) Kotlin is declared as \href{https://kotlinlang.org/docs/reference/null-safety.html}{Null-safe} language. -However, Kotlin architects wanted Kotlin to be fully compatible with Java; that's why the \textbf{null} keyword was also introduced in Kotlin. +However, Kotlin architects wanted Kotlin to be fully compatible with Java; that's why the \textbf{null} keyword was also introduced in Kotlin. There are several code-structures that can be used in Kotlin to avoid null-checks. For example: \textbf{?:}, \textbf{.let \{\}}, \textbf{.also \{\}}, e.t.c \textbf{Invalid example:} \begin{lstlisting}[language=Kotlin] @@ -1814,8 +1814,8 @@ \section*{\textbf{5. Functions}} \subsection*{\textbf{5.1 Function design}} \label{sec:5.1} Developers can write clean code by gaining knowledge of how to build design patterns and avoid code smells. -You should utilize this approach, along with functional style, when writing Kotlin code. -The concepts behind functional style are as follows: +You should utilize this approach, along with functional style, when writing Kotlin code. +The concepts behind functional style are as follows: Functions are the smallest unit of combinable and reusable code. They should have clean logic, \textbf{high cohesion}, and \textbf{low coupling} to organize the code effectively. The code in functions should be simple and not conceal the author's original intentions. @@ -1824,7 +1824,7 @@ \subsection*{\textbf{5.1 Function design}} The only exceptions to this are state machines. Kotlin is \href{https://www.slideshare.net/abreslav/whos-more-functional-kotlin-groovy-scala-or-java}{designed} to support and encourage functional programming, featuring the corresponding built-in mechanisms. Also, it supports standard collections and sequences feature methods that enable functional programming (for example, \textbf{apply}, \textbf{with}, \textbf{let}, and \textbf{run}), Kotlin Higher-Order functions, function types, lambdas, and default function arguments. -As [previously discussed], Kotlin supports and encourages the use of immutable types, which in turn motivates programmers to write pure functions that avoid side effects and have a corresponding output for specific input. +As [previously discussed], Kotlin supports and encourages the use of immutable types, which in turn motivates programmers to write pure functions that avoid side effects and have a corresponding output for specific input. The pipeline data flow for the pure function comprises a functional paradigm. It is easy to implement concurrent programming when you have chains of function calls, where each step features the following characteristics: 2. Verifiability 3. Testability @@ -1839,7 +1839,7 @@ \subsubsection*{\textbf{5.1.1 Avoid functions that are too long}} The function should be displayable on one screen and only implement one certain logic. If a function is too long, it often means complex and could be split or simplified. Functions should consist of 30 lines (non-empty and non-comment) in total. \textbf{Exception:} Some functions that implement complex algorithms may exceed 30 lines due to aggregation and comprehensiveness. -Linter warnings for such functions \textbf{can be suppressed}. +Linter warnings for such functions \textbf{can be suppressed}. Even if a long function works well, new problems or bugs may appear due to the function's complex logic once it is modified by someone else. Therefore, it is recommended to split such functions into several separate and shorter functions that are easier to manage. This approach will enable other programmers to read and modify the code properly. @@ -1847,7 +1847,7 @@ \subsubsection*{\textbf{5.1.2 Avoid deep nesting of function code blocks}} \leavevmode\newline \label{sec:5.1.2} The nesting depth of a function's code block is the depth of mutual inclusion between the code control blocks in the function (for example: if, for, while, and when). -Each nesting level will increase the amount of effort needed to read the code because you need to remember the current "stack" (for example, entering conditional statements and loops). +Each nesting level will increase the amount of effort needed to read the code because you need to remember the current "stack" (for example, entering conditional statements and loops). \textbf{Exception:} The nesting levels of the lambda expressions, local classes, and anonymous classes in functions are calculated based on the innermost function. The nesting levels of enclosing methods are not accumulated. Functional decomposition should be implemented to avoid confusion for the developer who reads the code. This will help the reader switch between contexts. @@ -1858,12 +1858,12 @@ \subsubsection*{\textbf{5.1.3 Avoid using nested functions}} With nested functions, the visibility context may not be evident to the code reader. \textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] -fun foo() { - fun nested():String { - return "String from nested function" - } - println("Nested Output: ${nested()}") -} +fun foo() { + fun nested():String { + return "String from nested function" + } + println("Nested Output: ${nested()}") +} \end{lstlisting} \subsubsection*{\textbf{5.1.4 Negated function calls}} \leavevmode\newline @@ -1871,23 +1871,23 @@ \subsubsection*{\textbf{5.1.4 Negated function calls}} Don't use negated function calls if it can be replaced with negated version of this function \textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] -fun foo() { +fun foo() { val list = listOf(1, 2, 3) - + if (!list.isEmpty()) { // Some cool logic } -} +} \end{lstlisting} \textbf{Valid example}: \begin{lstlisting}[language=Kotlin] -fun foo() { +fun foo() { val list = listOf(1, 2, 3) - + if (list.isNotEmpty()) { // Some cool logic } -} +} \end{lstlisting} \subsection*{\textbf{5.2 Function arguments}} \label{sec:5.2} @@ -1903,7 +1903,7 @@ \subsubsection*{\textbf{5.2.1 The lambda parameter of the function should be pla // ... } // usage -myFoo(1) { +myFoo(1) { println("hey") } \end{lstlisting} @@ -1943,7 +1943,7 @@ \subsubsection*{\textbf{5.2.4 Synchronizing code inside asynchronous code}} GlobalScope.async { runBlocking { count++ - } + } } \end{lstlisting} \subsubsection*{\textbf{5.2.5 Long lambdas should have explicit parameters}} @@ -1995,11 +1995,11 @@ \subsubsection*{\textbf{6.1.1 Denoting a class with a single constructor}} \end{lstlisting} \textbf{Valid example}: \begin{lstlisting}[language=Kotlin] -class Test(var a: Int) { +class Test(var a: Int) { // ... } // in case of any annotations or modifiers used on a constructor: -class Test private constructor(var a: Int) { +class Test private constructor(var a: Int) { // ... } \end{lstlisting} @@ -2022,7 +2022,7 @@ \subsubsection*{\textbf{6.1.2 Prefer data classes instead of classes without any class Test { var a: Int = 0 var b: Int = 0 - + constructor(a:Int, b: Int) { this.a = a this.b = b @@ -2030,7 +2030,7 @@ \subsubsection*{\textbf{6.1.2 Prefer data classes instead of classes without any } // or class Test(var a: Int = 0, var b: Int = 0) - + // or class Test() { var a: Int = 0 @@ -2085,13 +2085,13 @@ \subsubsection*{\textbf{6.1.4 Do not use redundant init blocks in your class}} make the code logic more coupled. It is always enough to use one \textbf{init} block to implement your idea in Kotlin. \textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] -class YourClass(var name: String) { +class YourClass(var name: String) { init { println("First initializer block that prints ${name}") } - + val property = "Property: ${name.length}".also(::println) - + init { println("Second initializer block that prints ${name.length}") } @@ -2109,7 +2109,7 @@ \subsubsection*{\textbf{6.1.4 Do not use redundant init blocks in your class}} } } \end{lstlisting} -The \textbf{init} block was not added to Kotlin to help you initialize your properties; it is needed for more complex tasks. +The \textbf{init} block was not added to Kotlin to help you initialize your properties; it is needed for more complex tasks. Therefore if the \textbf{init} block contains only assignments of variables - move it directly to properties to be correctly initialized near the declaration. In some cases, this rule can be in clash with [6.1.1], but that should not stop you. \textbf{Invalid example}: @@ -2151,7 +2151,7 @@ \subsubsection*{\textbf{6.1.6 Abstract class should have at least one abstract m \begin{lstlisting}[language=Kotlin] abstract class NotAbstract { fun foo() {} - + fun test() {} } \end{lstlisting} @@ -2159,13 +2159,13 @@ \subsubsection*{\textbf{6.1.6 Abstract class should have at least one abstract m \begin{lstlisting}[language=Kotlin] abstract class NotAbstract { abstract fun foo() - + fun test() {} } // OR class NotAbstract { fun foo() {} - + fun test() {} } \end{lstlisting} @@ -2199,13 +2199,13 @@ \subsubsection*{\textbf{6.1.8 Avoid using custom getters and setters}} println("Side effect") field = value } - // user of this class does not expect calling A.size receive size * 2 + // user of this class does not expect calling A.size receive size * 2 get() = field * 2 } \end{lstlisting} From the callee code, these methods look like access to this property: \textbf{A().isEmpty = true} for setter and \textbf{A().isEmpty} for getter. -However, when \textbf{get} and \textbf{set} are overridden, it isn't very clear for a developer who uses this particular class. -The developer expects to get the property value but receives some unknown value and some extra side-effect hidden by the custom getter/setter. +However, when \textbf{get} and \textbf{set} are overridden, it isn't very clear for a developer who uses this particular class. +The developer expects to get the property value but receives some unknown value and some extra side-effect hidden by the custom getter/setter. Use extra functions instead to avoid confusion. \textbf{Valid example}: \begin{lstlisting}[language=Kotlin] @@ -2214,8 +2214,8 @@ \subsubsection*{\textbf{6.1.8 Avoid using custom getters and setters}} fun initSize(value: Int) { // some custom logic } - - // this will not confuse developer and he will get exactly what he expects + + // this will not confuse developer and he will get exactly what he expects fun goodNameThatDescribesThisGetter() = this.size * 2 } \end{lstlisting} @@ -2243,7 +2243,7 @@ \subsubsection*{\textbf{6.1.10 No trivial getters and setters are allowed in the \textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] class A { - var a: Int = 0 + var a: Int = 0 get() = field set(value: Int) { field = value } // @@ -2252,7 +2252,7 @@ \subsubsection*{\textbf{6.1.10 No trivial getters and setters are allowed in the \textbf{Valid example}: \begin{lstlisting}[language=Kotlin] class A { - var a: Int = 0 + var a: Int = 0 get() = field set(value: Int) { field = value } // @@ -2263,15 +2263,15 @@ \subsubsection*{\textbf{6.1.11 Use 'apply' for grouping object initialization}} \label{sec:6.1.11} In Java, before functional programming became popular, many classes from common libraries used the configuration paradigm. To use these classes, you had to create an object with the constructor with 0-2 arguments and set the fields needed to run the object. -In Kotlin, to reduce the number of dummy code line and to group objects \href{https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/apply.html}{apply extension} was added: - +In Kotlin, to reduce the number of dummy code line and to group objects \href{https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/apply.html}{apply extension} was added: + \textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] class HttpClient(var name: String) { var url: String = "" var port: String = "" var timeout = 0 - + fun doRequest() {} } fun main() { @@ -2279,9 +2279,9 @@ \subsubsection*{\textbf{6.1.11 Use 'apply' for grouping object initialization}} httpClient.url = "http://example.com" httpClient.port = "8080" httpClient.timeout = 100 - + httpCLient.doRequest() -} +} \end{lstlisting} \textbf{Valid example}: \begin{lstlisting}[language=Kotlin] @@ -2319,7 +2319,7 @@ \subsubsection*{\textbf{6.1.12 Prefer Inline classes when a class has a single p \subsection*{\textbf{6.2 Extension functions}} \label{sec:6.2} This section describes the rules of using extension functions in your code. -\href{https://kotlinlang.org/docs/reference/extensions.html}{Extension functions} is a killer-feature in Kotlin. +\href{https://kotlinlang.org/docs/reference/extensions.html}{Extension functions} is a killer-feature in Kotlin. It gives you a chance to extend classes that were already implemented in external libraries and helps you to make classes less heavy. Extension functions are resolved statically. \subsubsection*{\textbf{6.2.1 Use extension functions for making logic of classes less coupled}} @@ -2351,10 +2351,10 @@ \subsubsection*{\textbf{6.2.3 Don't use extension functions for the class in the \textbf{Invalid example}: \begin{lstlisting}[language=Kotlin] class SomeClass { - + } fun SomeClass.deleteAllSpaces() { - + } \end{lstlisting} \subsection*{\textbf{6.3 Interfaces}} @@ -2413,4 +2413,4 @@ \subsubsection*{\textbf{6.5.1 kts files should wrap logic into top-level scope}} } fun foo() { } -\end{lstlisting} \ No newline at end of file +\end{lstlisting} diff --git a/wp/sections/download.tex b/wp/sections/download.tex index 05ac8b516e..7c3db0f406 100644 --- a/wp/sections/download.tex +++ b/wp/sections/download.tex @@ -11,13 +11,13 @@ \subsection{CLI-application} /path/to/project/file.kt:6:5: [WARNING\_ID\_NAME] free text of the warning (cannot be auto-corrected) \end{center} -Please also note, that as diktat is using ktlint framework - the format of the reported warnings can be changed: it can be xml, json and other formats that are supported by ktlint. Please refer to ktlint documentation \footnote{\url{https://github.com/pinterest/ktlint\#creating-a-reporter}} to see the information about custom reporters. +Please also note, that as diktat is using ktlint framework - the format of the reported warnings can be changed: it can be xml, json and other formats that are supported by ktlint. Please refer to ktlint documentation \footnote{\url{https://github.com/pinterest/ktlint\#creating-a-reporter}} to see the information about custom reporters. \subsection{Maven plugin} Maven plugin was introduced for diktat since the version 0.1.3. The following code snippet from \texttt{pom.xml} shows how to use diktat with Maven plugin: \begin{lstlisting}[caption={DiKTat with Maven plugin}, label={lst:maven}, language=Kotlin] - org.cqfn.diktat + com.saveourtool.diktat diktat-maven-plugin ${diktat.version} @@ -51,7 +51,7 @@ \subsection{Gradle plugin} \begin{lstlisting}[caption={DiKTat with Gradle plugin}, label={lst:gradle1}, language=Kotlin] plugins { - id("org.cqfn.diktat.diktat-gradle-plugin") version "0.1.7" + id("com.saveourtool.diktat.diktat-gradle-plugin") version "0.1.7" } \end{lstlisting} @@ -64,10 +64,10 @@ \subsection{Gradle plugin} mavenCentral() } dependencies { - classpath("org.cqfn.diktat:diktat-gradle-plugin:0.1.7") + classpath("com.saveourtool.diktat:diktat-gradle-plugin:0.1.7") } } -apply(plugin = "org.cqfn.diktat.diktat-gradle-plugin") +apply(plugin = "com.saveourtool.diktat.diktat-gradle-plugin") \end{lstlisting} Then you can configure diktat using diktat extension: diff --git a/wp/sections/feature.tex b/wp/sections/feature.tex index 1979cc67b9..e80e8dbeaf 100644 --- a/wp/sections/feature.tex +++ b/wp/sections/feature.tex @@ -35,13 +35,13 @@ \subsection{Create ASTNode} \end{lstlisting} \tikzstyle{every node}=[draw=black,thick,anchor=west, scale = 0.5] - + \begin{tikzpicture}[% grow via three points={one child at (0.3,-0.8) and two children at (0.3,-0.8) and (0.3,-1.5)}, scale=0.5, edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}] - + \node {PROPERTY} child { node {val}} child {node {WHITE\underline{ }SPACE}} @@ -57,7 +57,7 @@ \subsection{Create ASTNode} } child [missing] {} child [missing] {} - child [missing] {} + child [missing] {} child {node {WHITE\underline{ }SPACE}} child {node {EQ}} child {node {WHITE\underline{ }SPACE}} @@ -79,7 +79,7 @@ \subsection{Suppress annotation} * This is example */ -package org.cqfn.diktat +package com.saveourtool.diktat /** * Simple class @@ -95,7 +95,7 @@ \subsection{Suppress annotation} \end{lstlisting} -Diktat will raise the warning: +Diktat will raise the warning: $$ \texttt{ \small{ $\big[$FUNCTION\underline{ }NAME\underline{ }INCORRECT\underline{ }CASE$\big]$ function/method name should be in lowerCamelCase}} $$ @@ -106,7 +106,7 @@ \subsection{Suppress annotation} * This is example */ -package org.cqfn.diktat +package com.saveourtool.diktat /** * Simple class @@ -133,11 +133,11 @@ \subsection{WEB} \begin{figure}[H] \centering \includegraphics[scale=0.3]{pictures/web-example.png} - \caption{Diktat-web online demo} -\end{figure} + \caption{Diktat-web online demo} +\end{figure} \subsection{Options validation} As it has been mention earlier, diktat has a highly customizable configuration file, but manually editing it is error-prone, for example, name of the rule can be incorrect due to a typo. Diktat will validate configuration file on startup and suggest the closest name based on \textsl{Levenshtein} method. \subsection{Self checks} -Diktat fully supports self checking of it's own code using both release and snapshot (master) versions. Diktat uses it's self to validate the code inside during it's CI/CD process. +Diktat fully supports self checking of it's own code using both release and snapshot (master) versions. Diktat uses it's self to validate the code inside during it's CI/CD process. diff --git a/wp/sections/work.tex b/wp/sections/work.tex index 1f171b3382..bae900173e 100644 --- a/wp/sections/work.tex +++ b/wp/sections/work.tex @@ -91,7 +91,7 @@ \subsection{DiKTat} Another feature of ktlint is that at it's startup you can provide a JAR file with additional ruleset(s), that will be discovered by the \texttt{ServiceLoader} and then all AST nodes will be passed to these rules. DiKTat uses this approach. -The only modification Diktat makes to the framework is that it adds a mechanism to disable Inspection from the code using annotations or configuration file. The set of all rules is described in the \textsl{DiktatRuleSetProvider}\footnote{\url{https://github.com/saveourtool/diKTat/blob/v0.1.3/diktat-rules/src/main/kotlin/org/cqfn/diktat/ruleset/rules/DiktatRuleSetProvider.kt}} class. This class overrides the \textsl{get()} method of the \textsl{RuleSetProvider}\footnote{\url{https://github.com/pinterest/ktlint/blob/master/ktlint-core/src/main/kotlin/com/pinterest/ktlint/core/RuleSetProvider.kt}} interface, which returns a set of rules to be "traversed". But before returning this set Diktat is reading the configuration file where the user has independently configured all the Inspections. If there is no configuration file, then a warning will be displayed and Inspections will use the default configuration file. +The only modification Diktat makes to the framework is that it adds a mechanism to disable Inspection from the code using annotations or configuration file. The set of all rules is described in the \textsl{DiktatRuleSetProvider}\footnote{\url{https://github.com/saveourtool/diKTat/blob/v0.1.3/diktat-rules/src/main/kotlin/com/saveourtool/diktat/ruleset/rules/DiktatRuleSetProvider.kt}} class. This class overrides the \textsl{get()} method of the \textsl{RuleSetProvider}\footnote{\url{https://github.com/pinterest/ktlint/blob/master/ktlint-core/src/main/kotlin/com/pinterest/ktlint/core/RuleSetProvider.kt}} interface, which returns a set of rules to be "traversed". But before returning this set Diktat is reading the configuration file where the user has independently configured all the Inspections. If there is no configuration file, then a warning will be displayed and Inspections will use the default configuration file. Each rule must implement the \textsl{visit} method of the abstract Rule class, which describes the logic of the rule. By the way it is a special case of a famous pattern Visitor \cite{ref:gang}. Implementation example of the simple Rule that contains one Inspections can be found below. \begin{lstlisting}[caption={Example of the Rule.}, label={lst:example1}, language=Kotlin] @@ -176,11 +176,11 @@ \subsection{Examples of unique inspections} two children at (0.3,-0.8) and (0.3,-1.5)}, scale=0.5, edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}] - + \node(a) {...} child { node {FUN} child {node {...}} - child {node {BLOCK} + child {node {BLOCK} child {node {FUN} child{node{...}} child{node{BLOCK} @@ -189,39 +189,39 @@ \subsection{Examples of unique inspections} } } }; - + \node(b) [right of=a, xshift=17cm]{...} child { node {FUN} child {node {...}} - child {node {BLOCK} + child {node {BLOCK} child{node{...}} - } + } } child [missing] {} child [missing] {} child { node {FUN} child {node {...}} - child {node {BLOCK} + child {node {BLOCK} child{node{...}} - } + } }; - + \draw[-latex,very thick,shorten <=5mm,shorten >=5mm,] ([xshift=5cm,yshift=-3cm]a.north) to ([xshift=-2cm, yshift=-3cm]b.north); \end{tikzpicture} \\ \item \textbf{FLOAT\underline{ }IN\underline{ }ACCURATE\underline{ }CALCULATIONS} - Inspection that checks that floating-point numbers are not used for accurate calculations (see the corresponding Rule from the code style to get more information). \item \textbf{PACKAGE\underline{ }NAMING} - This Inspection checks that package name is in a proper format and is separated by dots. This inspection is very demonstrative to show how the work with AST is done. - + This inspection receives different nodes and checks them one by one. First it checks their element type (type of the node in AST). When it's element type equals to \texttt{PACKAGE\_DIRECTIVE} it gets the file name and collects all nodes with \texttt{IDENTIFIER} type as it is shown on the following graph: - - + + \begin{center} \begin{tikzpicture}[nodes={draw, circle}, sibling distance=1.5cm, level distance = 1.2cm, minimum size=3.1cm, scale = 1.2, node distance=16cm] \node(main)[text width = 2cm] { PACKAGE DIRECTIVE} child { node(a) [below left] { PACKAGE} } child { node(b)[below] { WHITE SPACE} } - child { node(c)[below right, text width=3cm] { DOT QUALIFIED EXPRESSION} + child { node(c)[below right, text width=3cm] { DOT QUALIFIED EXPRESSION} child { node(d)[below left, text width=2.5cm] { REFERENCE EXPRESSION} child { node(e)[below, fill = selectColor] { IDENTIFIER} } } @@ -241,11 +241,11 @@ \subsection{Examples of unique inspections} \end{tikzpicture} \end{center} - -In order to collect elements with a proper type, Inspection has to do a tree traversal. Tree traversal is done by a special method called \texttt{findAllNodesWithCondition()} (see Listing 3). This function searches for a node with a given condition (in this case it is when node's type equals to \texttt{IDENTIFIER}). As a basis it uses DFS (Depth-first search): it goes recursively in depth of the tree and compares types of AST nodes. When it finds necessary node it returns it and the result from it's parent search as a list, otherwise it returns empty list. At the end the Inspection checks the package name based on identifiers and file name. +In order to collect elements with a proper type, Inspection has to do a tree traversal. Tree traversal is done by a special method called \texttt{findAllNodesWithCondition()} (see Listing 3). This function searches for a node with a given condition (in this case it is when node's type equals to \texttt{IDENTIFIER}). As a basis it uses DFS (Depth-first search): it goes recursively in depth of the tree and compares types of AST nodes. When it finds necessary node it returns it and the result from it's parent search as a list, otherwise it returns empty list. At the end the Inspection checks the package name based on identifiers and file name. -\begin{lstlisting}[caption={Method for AST traversal}, label={lst:example1}, language=Kotlin] + +\begin{lstlisting}[caption={Method for AST traversal}, label={lst:example1}, language=Kotlin] /** * This method performs tree traversal and returns all nodes which satisfy the condition */ @@ -258,4 +258,4 @@ \subsection{Examples of unique inspections} \end{lstlisting} \tikzstyle{every node}=[draw=black,thick,anchor=west, scale = 0.5, font = \large] -\end{enumerate} \ No newline at end of file +\end{enumerate}