From 227bff9318a401301030696db8f43dbab64e12c1 Mon Sep 17 00:00:00 2001 From: Peter Trifanov Date: Fri, 13 Dec 2024 14:51:10 +0100 Subject: [PATCH] SONARGO-70 Add "integration-test" to common Gradle modules --- .cirrus.yml | 8 +-- .gitmodules | 1 + README.md | 6 +-- build-logic | 2 +- its/plugin/build.gradle | 23 ++++---- .../org/sonarsource/slang/CoverageTest.java | 0 .../sonarsource/slang/DuplicationsTest.java | 0 .../sonarsource/slang/ExternalReportTest.java | 0 .../org/sonarsource/slang/MeasuresTest.java | 0 .../org/sonarsource/slang/NoSonarTest.java | 0 .../org/sonarsource/slang/SonarLintTest.java | 0 .../java/org/sonarsource/slang/TestBase.java | 0 .../org/sonarsource/slang/TestReportTest.java | 0 .../java/org/sonarsource/slang/Tests.java | 2 +- .../resources/nosonar-go.xml | 0 its/ruling/build.gradle | 21 ++++---- .../org/sonarsource/slang/GoRulingTest.java | 4 +- .../resources/expected/go-ParsingError.json | 5 ++ .../resources/expected/go-S100.json | 0 .../resources/expected/go-S103.json | 4 +- .../resources/expected/go-S104.json | 0 .../resources/expected/go-S1067.json | 0 .../resources/expected/go-S107.json | 2 +- .../resources/expected/go-S108.json | 4 +- .../resources/expected/go-S1110.json | 5 ++ .../resources/expected/go-S1125.json | 5 ++ .../resources/expected/go-S1134.json | 0 .../resources/expected/go-S1135.json | 2 +- .../resources/expected/go-S1145.json | 0 .../resources/expected/go-S1151.json | 0 .../resources/expected/go-S117.json | 0 .../resources/expected/go-S1186.json | 4 +- .../resources/expected/go-S1192.json | 2 +- .../resources/expected/go-S122.json | 10 ++++ .../resources/expected/go-S126.json | 2 +- .../resources/expected/go-S131.json | 2 +- .../resources/expected/go-S1313.json | 5 ++ .../resources/expected/go-S1314.json | 5 ++ .../resources/expected/go-S134.json | 0 .../resources/expected/go-S138.json | 0 .../resources/expected/go-S1451.json | 34 ++++++------ .../resources/expected/go-S1479.json | 0 .../resources/expected/go-S1656.json | 6 +++ .../resources/expected/go-S1763.json | 2 +- .../resources/expected/go-S1764.json | 5 ++ .../resources/expected/go-S1821.json | 0 .../resources/expected/go-S1862.json | 10 ++++ .../resources/expected/go-S1871.json | 0 .../resources/expected/go-S1940.json | 0 .../resources/expected/go-S2068.json | 2 +- .../resources/expected/go-S2757.json | 6 +++ .../resources/expected/go-S3776.json | 0 .../resources/expected/go-S3923.json | 5 ++ .../resources/expected/go-S4144.json | 0 .../resources/expected/go-S4663.json | 5 ++ .../resources/sources/ParsingError.go | 2 +- .../resources/sources/S100.go | 32 +++++------ .../resources/sources/S103.go | 0 .../resources/sources/S105.go | 0 .../resources/sources/S107.go | 0 .../resources/sources/S108.go | 54 +++++++++---------- .../resources/sources/S1110.go | 0 .../resources/sources/S1116.go | 0 .../resources/sources/S1125.go | 0 .../resources/sources/S1135.go | 0 .../resources/sources/S1192.go | 0 .../resources/sources/S122.go | 0 .../resources/sources/S1313.go | 0 .../resources/sources/S1314.go | 16 +++--- .../resources/sources/S1656.go | 0 .../resources/sources/S1763.go | 0 .../resources/sources/S1862.go | 0 .../resources/sources/S2068.go | 0 .../resources/sources/S2757.go | 0 .../resources/sources/S3923.go | 0 .../resources/sources/S4663.go | 30 +++++------ .../resources/expected/go-ParsingError.json | 5 -- .../src/test/resources/expected/go-S1110.json | 5 -- .../src/test/resources/expected/go-S1125.json | 5 -- .../src/test/resources/expected/go-S122.json | 10 ---- .../src/test/resources/expected/go-S1313.json | 5 -- .../src/test/resources/expected/go-S1314.json | 5 -- .../src/test/resources/expected/go-S1656.json | 6 --- .../src/test/resources/expected/go-S1764.json | 5 -- .../src/test/resources/expected/go-S1862.json | 10 ---- .../src/test/resources/expected/go-S2757.json | 6 --- .../src/test/resources/expected/go-S3923.json | 5 -- .../src/test/resources/expected/go-S4663.json | 5 -- 88 files changed, 203 insertions(+), 202 deletions(-) rename its/plugin/src/{test => integrationTest}/java/org/sonarsource/slang/CoverageTest.java (100%) rename its/plugin/src/{test => integrationTest}/java/org/sonarsource/slang/DuplicationsTest.java (100%) rename its/plugin/src/{test => integrationTest}/java/org/sonarsource/slang/ExternalReportTest.java (100%) rename its/plugin/src/{test => integrationTest}/java/org/sonarsource/slang/MeasuresTest.java (100%) rename its/plugin/src/{test => integrationTest}/java/org/sonarsource/slang/NoSonarTest.java (100%) rename its/plugin/src/{test => integrationTest}/java/org/sonarsource/slang/SonarLintTest.java (100%) rename its/plugin/src/{test => integrationTest}/java/org/sonarsource/slang/TestBase.java (100%) rename its/plugin/src/{test => integrationTest}/java/org/sonarsource/slang/TestReportTest.java (100%) rename its/plugin/src/{test => integrationTest}/java/org/sonarsource/slang/Tests.java (96%) rename its/plugin/src/{test => integrationTest}/resources/nosonar-go.xml (100%) rename its/ruling/src/{test => integrationTest}/java/org/sonarsource/slang/GoRulingTest.java (97%) create mode 100644 its/ruling/src/integrationTest/resources/expected/go-ParsingError.json rename its/ruling/src/{test => integrationTest}/resources/expected/go-S100.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S103.json (99%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S104.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1067.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S107.json (97%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S108.json (79%) create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S1110.json create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S1125.json rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1134.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1135.json (99%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1145.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1151.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S117.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1186.json (97%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1192.json (99%) create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S122.json rename its/ruling/src/{test => integrationTest}/resources/expected/go-S126.json (99%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S131.json (99%) create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S1313.json create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S1314.json rename its/ruling/src/{test => integrationTest}/resources/expected/go-S134.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S138.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1451.json (95%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1479.json (100%) create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S1656.json rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1763.json (83%) create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S1764.json rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1821.json (100%) create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S1862.json rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1871.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S1940.json (100%) rename its/ruling/src/{test => integrationTest}/resources/expected/go-S2068.json (67%) create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S2757.json rename its/ruling/src/{test => integrationTest}/resources/expected/go-S3776.json (100%) create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S3923.json rename its/ruling/src/{test => integrationTest}/resources/expected/go-S4144.json (100%) create mode 100644 its/ruling/src/integrationTest/resources/expected/go-S4663.json rename its/ruling/src/{test => integrationTest}/resources/sources/ParsingError.go (83%) rename its/ruling/src/{test => integrationTest}/resources/sources/S100.go (88%) rename its/ruling/src/{test => integrationTest}/resources/sources/S103.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S105.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S107.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S108.go (95%) rename its/ruling/src/{test => integrationTest}/resources/sources/S1110.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S1116.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S1125.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S1135.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S1192.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S122.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S1313.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S1314.go (94%) rename its/ruling/src/{test => integrationTest}/resources/sources/S1656.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S1763.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S1862.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S2068.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S2757.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S3923.go (100%) rename its/ruling/src/{test => integrationTest}/resources/sources/S4663.go (93%) delete mode 100644 its/ruling/src/test/resources/expected/go-ParsingError.json delete mode 100644 its/ruling/src/test/resources/expected/go-S1110.json delete mode 100644 its/ruling/src/test/resources/expected/go-S1125.json delete mode 100644 its/ruling/src/test/resources/expected/go-S122.json delete mode 100644 its/ruling/src/test/resources/expected/go-S1313.json delete mode 100644 its/ruling/src/test/resources/expected/go-S1314.json delete mode 100644 its/ruling/src/test/resources/expected/go-S1656.json delete mode 100644 its/ruling/src/test/resources/expected/go-S1764.json delete mode 100644 its/ruling/src/test/resources/expected/go-S1862.json delete mode 100644 its/ruling/src/test/resources/expected/go-S2757.json delete mode 100644 its/ruling/src/test/resources/expected/go-S3923.json delete mode 100644 its/ruling/src/test/resources/expected/go-S4663.json diff --git a/.cirrus.yml b/.cirrus.yml index 3a76f0ca..eca91538 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -112,19 +112,19 @@ gradle_its_template: &GRADLE_ITS_TEMPLATE run_its_script: - git submodule update --init --depth 1 - source cirrus-env QA - - ./gradlew "${GRADLE_TASK}" "-P${ITS_PROJECT}" + - ./gradlew "${GRADLE_TASK}" "-Dsonar.runtimeVersion=${SQ_VERSION}" "-Dorchestrator.artifactory.accessToken=${ARTIFACTORY_ACCESS_TOKEN}" "-DbuildNumber=$BUILD_NUMBER" -I "${GRADLE_HOME}/init.d/repoxAuth.init.gradle.kts" - -Pqa --info --stacktrace --console plain --no-daemon --build-cache + --info --stacktrace --console plain --no-daemon --build-cache <<: *CLEANUP_GRADLE_CACHE_SCRIPT qa_plugin_task: <<: *QA_TASK_FILTER env: ITS_PROJECT: "plugin" - GRADLE_TASK: ":its:plugin:test" + GRADLE_TASK: ":its:plugin:integrationTest" matrix: - SQ_VERSION: "DEV" - SQ_VERSION: "LATEST_RELEASE" @@ -137,7 +137,7 @@ qa_ruling_task: <<: *QA_TASK_FILTER env: SQ_VERSION: "LATEST_RELEASE" - GRADLE_TASK: ":its:ruling:test" + GRADLE_TASK: ":its:ruling:integrationTest" ITS_PROJECT: "ruling" <<: *LINUX_4_CPU_8G <<: *GRADLE_ITS_TEMPLATE diff --git a/.gitmodules b/.gitmodules index 73aed1c5..d842b08a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,4 @@ [submodule "build-logic"] path = build-logic url = https://github.com/SonarSource/cloud-native-gradle-modules + branch = SONARGO-70 diff --git a/README.md b/README.md index 23b0bd48..d062dee1 100644 --- a/README.md +++ b/README.md @@ -38,13 +38,13 @@ git submodule update --init Then build and run the Integration Tests using the `its` property: ```shell - ./gradlew build -Pits --info --no-daemon + ./gradlew integrationTest --info --no-daemon ``` -You can also build and run only Ruling Tests using the `ruling` property: +You can also build and run only Ruling Tests: ```shell -./gradlew build -Pruling --info --no-daemon +./gradlew :its:ruling:integrationTest --info --no-daemon ``` ## License headers diff --git a/build-logic b/build-logic index 0f118907..9cd50c34 160000 --- a/build-logic +++ b/build-logic @@ -1 +1 @@ -Subproject commit 0f118907e5b1a898753d8ec01e4f1f1894107edc +Subproject commit 9cd50c34d9a4ddcfa1a7248a943cd0903d89e314 diff --git a/its/plugin/build.gradle b/its/plugin/build.gradle index bc3e54ef..ad965b6f 100644 --- a/its/plugin/build.gradle +++ b/its/plugin/build.gradle @@ -1,26 +1,27 @@ plugins { id("org.sonarsource.cloud-native.java-conventions") + id("org.sonarsource.cloud-native.integration-test") } dependencies { - testImplementation libs.sonar.analyzer.commons - testImplementation testLibs.sonar.ws - testImplementation testLibs.assertj.core - testImplementation testLibs.sonarlint.core - testImplementation testLibs.sonar.orchestrator - testRuntimeOnly testLibs.junit.vintage.engine + integrationTestImplementation libs.sonar.analyzer.commons + integrationTestImplementation testLibs.sonar.ws + integrationTestImplementation testLibs.assertj.core + integrationTestImplementation testLibs.sonarlint.core + integrationTestImplementation testLibs.sonar.orchestrator + integrationTestRuntimeOnly testLibs.junit.vintage.engine } sonar.skipProject = true -test { - onlyIf { - project.hasProperty("plugin") || project.hasProperty("its") - } +integrationTest { + testSources.set(file("projects")) +} + +tasks.integrationTest { filter { includeTestsMatching 'org.sonarsource.slang.Tests' includeTestsMatching 'org.sonarsource.slang.SonarLintTest' } systemProperty 'java.awt.headless', 'true' - outputs.upToDateWhen {false} } diff --git a/its/plugin/src/test/java/org/sonarsource/slang/CoverageTest.java b/its/plugin/src/integrationTest/java/org/sonarsource/slang/CoverageTest.java similarity index 100% rename from its/plugin/src/test/java/org/sonarsource/slang/CoverageTest.java rename to its/plugin/src/integrationTest/java/org/sonarsource/slang/CoverageTest.java diff --git a/its/plugin/src/test/java/org/sonarsource/slang/DuplicationsTest.java b/its/plugin/src/integrationTest/java/org/sonarsource/slang/DuplicationsTest.java similarity index 100% rename from its/plugin/src/test/java/org/sonarsource/slang/DuplicationsTest.java rename to its/plugin/src/integrationTest/java/org/sonarsource/slang/DuplicationsTest.java diff --git a/its/plugin/src/test/java/org/sonarsource/slang/ExternalReportTest.java b/its/plugin/src/integrationTest/java/org/sonarsource/slang/ExternalReportTest.java similarity index 100% rename from its/plugin/src/test/java/org/sonarsource/slang/ExternalReportTest.java rename to its/plugin/src/integrationTest/java/org/sonarsource/slang/ExternalReportTest.java diff --git a/its/plugin/src/test/java/org/sonarsource/slang/MeasuresTest.java b/its/plugin/src/integrationTest/java/org/sonarsource/slang/MeasuresTest.java similarity index 100% rename from its/plugin/src/test/java/org/sonarsource/slang/MeasuresTest.java rename to its/plugin/src/integrationTest/java/org/sonarsource/slang/MeasuresTest.java diff --git a/its/plugin/src/test/java/org/sonarsource/slang/NoSonarTest.java b/its/plugin/src/integrationTest/java/org/sonarsource/slang/NoSonarTest.java similarity index 100% rename from its/plugin/src/test/java/org/sonarsource/slang/NoSonarTest.java rename to its/plugin/src/integrationTest/java/org/sonarsource/slang/NoSonarTest.java diff --git a/its/plugin/src/test/java/org/sonarsource/slang/SonarLintTest.java b/its/plugin/src/integrationTest/java/org/sonarsource/slang/SonarLintTest.java similarity index 100% rename from its/plugin/src/test/java/org/sonarsource/slang/SonarLintTest.java rename to its/plugin/src/integrationTest/java/org/sonarsource/slang/SonarLintTest.java diff --git a/its/plugin/src/test/java/org/sonarsource/slang/TestBase.java b/its/plugin/src/integrationTest/java/org/sonarsource/slang/TestBase.java similarity index 100% rename from its/plugin/src/test/java/org/sonarsource/slang/TestBase.java rename to its/plugin/src/integrationTest/java/org/sonarsource/slang/TestBase.java diff --git a/its/plugin/src/test/java/org/sonarsource/slang/TestReportTest.java b/its/plugin/src/integrationTest/java/org/sonarsource/slang/TestReportTest.java similarity index 100% rename from its/plugin/src/test/java/org/sonarsource/slang/TestReportTest.java rename to its/plugin/src/integrationTest/java/org/sonarsource/slang/TestReportTest.java diff --git a/its/plugin/src/test/java/org/sonarsource/slang/Tests.java b/its/plugin/src/integrationTest/java/org/sonarsource/slang/Tests.java similarity index 96% rename from its/plugin/src/test/java/org/sonarsource/slang/Tests.java rename to its/plugin/src/integrationTest/java/org/sonarsource/slang/Tests.java index 7814b458..396689ed 100644 --- a/its/plugin/src/test/java/org/sonarsource/slang/Tests.java +++ b/its/plugin/src/integrationTest/java/org/sonarsource/slang/Tests.java @@ -51,7 +51,7 @@ public class Tests { ORCHESTRATOR = orchestratorBuilder .useDefaultAdminCredentialsForBuilds(true) .setSonarVersion(System.getProperty(SQ_VERSION_PROPERTY, DEFAULT_SQ_VERSION)) - .restoreProfileAtStartup(FileLocation.of("src/test/resources/nosonar-go.xml")) + .restoreProfileAtStartup(FileLocation.of("src/integrationTest/resources/nosonar-go.xml")) .build(); } diff --git a/its/plugin/src/test/resources/nosonar-go.xml b/its/plugin/src/integrationTest/resources/nosonar-go.xml similarity index 100% rename from its/plugin/src/test/resources/nosonar-go.xml rename to its/plugin/src/integrationTest/resources/nosonar-go.xml diff --git a/its/ruling/build.gradle b/its/ruling/build.gradle index a847ad92..804ffaec 100644 --- a/its/ruling/build.gradle +++ b/its/ruling/build.gradle @@ -1,22 +1,21 @@ plugins { id("org.sonarsource.cloud-native.java-conventions") + id("org.sonarsource.cloud-native.integration-test") } dependencies { - testImplementation libs.sonar.analyzer.commons - testImplementation testLibs.assertj.core - testImplementation testLibs.sonar.orchestrator - testRuntimeOnly testLibs.junit.vintage.engine + integrationTestImplementation(libs.sonar.analyzer.commons) + integrationTestImplementation(testLibs.assertj.core) + integrationTestImplementation(testLibs.sonar.orchestrator) + integrationTestRuntimeOnly(testLibs.junit.vintage.engine) } sonar.skipProject = true -test { - onlyIf { - project.hasProperty("its") || - project.hasProperty("ruling") - } +integrationTest { + testSources.set(rootProject.file("its/sources")) +} - systemProperty 'java.awt.headless', 'true' - outputs.upToDateWhen { false } +tasks.integrationTest { + systemProperty("java.awt.headless", "true") } diff --git a/its/ruling/src/test/java/org/sonarsource/slang/GoRulingTest.java b/its/ruling/src/integrationTest/java/org/sonarsource/slang/GoRulingTest.java similarity index 97% rename from its/ruling/src/test/java/org/sonarsource/slang/GoRulingTest.java rename to its/ruling/src/integrationTest/java/org/sonarsource/slang/GoRulingTest.java index 7a6d52ec..f347578a 100644 --- a/its/ruling/src/test/java/org/sonarsource/slang/GoRulingTest.java +++ b/its/ruling/src/integrationTest/java/org/sonarsource/slang/GoRulingTest.java @@ -96,7 +96,7 @@ public void go_manual_keep_sonarqube_server_up() throws IOException { @Test public void test_go() throws IOException { Map properties = new HashMap<>(); - properties.put("sonar.inclusions", "sources/**/*.go, ruling/src/test/resources/sources/**/*.go"); + properties.put("sonar.inclusions", "sources/**/*.go, ruling/src/integrationTest/resources/sources/**/*.go"); properties.put("sonar.exclusions", "**/*generated*.go, **/*.pb.go"); properties.put("sonar.tests", "."); properties.put("sonar.test.inclusions", "**/*_test.go"); @@ -123,7 +123,7 @@ private void run_ruling_test(Map projectProperties) throws IOExc .setSourceDirs("./") .setSourceEncoding("utf-8") .setProperties(properties) - .setProperty("sonar.lits.dump.old", Path.of("src/test/resources/expected").toAbsolutePath().toString()) + .setProperty("sonar.lits.dump.old", Path.of("src/integrationTest/resources/expected").toAbsolutePath().toString()) .setProperty("sonar.lits.dump.new", actualDirectory.getAbsolutePath()) .setProperty("sonar.lits.differences", litsDifferencesFile.getAbsolutePath()) .setProperty("sonar.cpd.exclusions", "**/*") diff --git a/its/ruling/src/integrationTest/resources/expected/go-ParsingError.json b/its/ruling/src/integrationTest/resources/expected/go-ParsingError.json new file mode 100644 index 00000000..da3c3eca --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-ParsingError.json @@ -0,0 +1,5 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/ParsingError.go':[ +0, +], +} diff --git a/its/ruling/src/test/resources/expected/go-S100.json b/its/ruling/src/integrationTest/resources/expected/go-S100.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S100.json rename to its/ruling/src/integrationTest/resources/expected/go-S100.json diff --git a/its/ruling/src/test/resources/expected/go-S103.json b/its/ruling/src/integrationTest/resources/expected/go-S103.json similarity index 99% rename from its/ruling/src/test/resources/expected/go-S103.json rename to its/ruling/src/integrationTest/resources/expected/go-S103.json index b1c1dbeb..ec68763d 100644 --- a/its/ruling/src/test/resources/expected/go-S103.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S103.json @@ -1,8 +1,8 @@ { -'go-project:ruling/src/test/resources/sources/S103.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S103.go':[ 7, ], -'go-project:ruling/src/test/resources/sources/S107.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S107.go':[ 4, ], 'go-project:sources/kubernetes-client-go/applyconfigurations/admissionregistration/v1/matchresources.go':[ diff --git a/its/ruling/src/test/resources/expected/go-S104.json b/its/ruling/src/integrationTest/resources/expected/go-S104.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S104.json rename to its/ruling/src/integrationTest/resources/expected/go-S104.json diff --git a/its/ruling/src/test/resources/expected/go-S1067.json b/its/ruling/src/integrationTest/resources/expected/go-S1067.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S1067.json rename to its/ruling/src/integrationTest/resources/expected/go-S1067.json diff --git a/its/ruling/src/test/resources/expected/go-S107.json b/its/ruling/src/integrationTest/resources/expected/go-S107.json similarity index 97% rename from its/ruling/src/test/resources/expected/go-S107.json rename to its/ruling/src/integrationTest/resources/expected/go-S107.json index 83d343bb..3da94084 100644 --- a/its/ruling/src/test/resources/expected/go-S107.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S107.json @@ -1,5 +1,5 @@ { -'go-project:ruling/src/test/resources/sources/S107.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S107.go':[ 4, ], 'go-project:sources/kubernetes-client-go/gentype/fake.go':[ diff --git a/its/ruling/src/test/resources/expected/go-S108.json b/its/ruling/src/integrationTest/resources/expected/go-S108.json similarity index 79% rename from its/ruling/src/test/resources/expected/go-S108.json rename to its/ruling/src/integrationTest/resources/expected/go-S108.json index 5e7f9185..07fff6ae 100644 --- a/its/ruling/src/test/resources/expected/go-S108.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S108.json @@ -1,10 +1,10 @@ { -'go-project:ruling/src/test/resources/sources/S108.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S108.go':[ 10, 18, 22, ], -'go-project:ruling/src/test/resources/sources/S1862.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1862.go':[ 4, 6, ], diff --git a/its/ruling/src/integrationTest/resources/expected/go-S1110.json b/its/ruling/src/integrationTest/resources/expected/go-S1110.json new file mode 100644 index 00000000..b4485d9e --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S1110.json @@ -0,0 +1,5 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S1110.go':[ +4, +], +} diff --git a/its/ruling/src/integrationTest/resources/expected/go-S1125.json b/its/ruling/src/integrationTest/resources/expected/go-S1125.json new file mode 100644 index 00000000..cd244f0c --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S1125.json @@ -0,0 +1,5 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S1125.go':[ +4, +], +} diff --git a/its/ruling/src/test/resources/expected/go-S1134.json b/its/ruling/src/integrationTest/resources/expected/go-S1134.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S1134.json rename to its/ruling/src/integrationTest/resources/expected/go-S1134.json diff --git a/its/ruling/src/test/resources/expected/go-S1135.json b/its/ruling/src/integrationTest/resources/expected/go-S1135.json similarity index 99% rename from its/ruling/src/test/resources/expected/go-S1135.json rename to its/ruling/src/integrationTest/resources/expected/go-S1135.json index f867999f..ca535c8c 100644 --- a/its/ruling/src/test/resources/expected/go-S1135.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S1135.json @@ -1,5 +1,5 @@ { -'go-project:ruling/src/test/resources/sources/S1135.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1135.go':[ 6, 7, ], diff --git a/its/ruling/src/test/resources/expected/go-S1145.json b/its/ruling/src/integrationTest/resources/expected/go-S1145.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S1145.json rename to its/ruling/src/integrationTest/resources/expected/go-S1145.json diff --git a/its/ruling/src/test/resources/expected/go-S1151.json b/its/ruling/src/integrationTest/resources/expected/go-S1151.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S1151.json rename to its/ruling/src/integrationTest/resources/expected/go-S1151.json diff --git a/its/ruling/src/test/resources/expected/go-S117.json b/its/ruling/src/integrationTest/resources/expected/go-S117.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S117.json rename to its/ruling/src/integrationTest/resources/expected/go-S117.json diff --git a/its/ruling/src/test/resources/expected/go-S1186.json b/its/ruling/src/integrationTest/resources/expected/go-S1186.json similarity index 97% rename from its/ruling/src/test/resources/expected/go-S1186.json rename to its/ruling/src/integrationTest/resources/expected/go-S1186.json index 13e6421c..a08041c7 100644 --- a/its/ruling/src/test/resources/expected/go-S1186.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S1186.json @@ -1,9 +1,9 @@ { -'go-project:ruling/src/test/resources/sources/S107.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S107.go':[ 7, 10, ], -'go-project:ruling/src/test/resources/sources/S108.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S108.go':[ 25, ], 'go-project:sources/kubernetes-client-go/rest/warnings.go':[ diff --git a/its/ruling/src/test/resources/expected/go-S1192.json b/its/ruling/src/integrationTest/resources/expected/go-S1192.json similarity index 99% rename from its/ruling/src/test/resources/expected/go-S1192.json rename to its/ruling/src/integrationTest/resources/expected/go-S1192.json index a479b279..af369820 100644 --- a/its/ruling/src/test/resources/expected/go-S1192.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S1192.json @@ -1,5 +1,5 @@ { -'go-project:ruling/src/test/resources/sources/S1192.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1192.go':[ 15, ], 'go-project:sources/kubernetes-client-go/dynamic/fake/simple.go':[ diff --git a/its/ruling/src/integrationTest/resources/expected/go-S122.json b/its/ruling/src/integrationTest/resources/expected/go-S122.json new file mode 100644 index 00000000..a3cde617 --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S122.json @@ -0,0 +1,10 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S1116.go':[ +11, +], +'go-project:ruling/src/integrationTest/resources/sources/S122.go':[ +8, +13, +17, +], +} diff --git a/its/ruling/src/test/resources/expected/go-S126.json b/its/ruling/src/integrationTest/resources/expected/go-S126.json similarity index 99% rename from its/ruling/src/test/resources/expected/go-S126.json rename to its/ruling/src/integrationTest/resources/expected/go-S126.json index a05d97b8..77682778 100644 --- a/its/ruling/src/test/resources/expected/go-S126.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S126.json @@ -1,5 +1,5 @@ { -'go-project:ruling/src/test/resources/sources/S1862.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1862.go':[ 6, 13, 20, diff --git a/its/ruling/src/test/resources/expected/go-S131.json b/its/ruling/src/integrationTest/resources/expected/go-S131.json similarity index 99% rename from its/ruling/src/test/resources/expected/go-S131.json rename to its/ruling/src/integrationTest/resources/expected/go-S131.json index 3ac1904e..2e1fc095 100644 --- a/its/ruling/src/test/resources/expected/go-S131.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S131.json @@ -1,5 +1,5 @@ { -'go-project:ruling/src/test/resources/sources/S108.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S108.go':[ 18, ], 'go-project:sources/kubernetes-client-go/applyconfigurations/utils.go':[ diff --git a/its/ruling/src/integrationTest/resources/expected/go-S1313.json b/its/ruling/src/integrationTest/resources/expected/go-S1313.json new file mode 100644 index 00000000..c1020a4c --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S1313.json @@ -0,0 +1,5 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S1313.go':[ +4, +], +} diff --git a/its/ruling/src/integrationTest/resources/expected/go-S1314.json b/its/ruling/src/integrationTest/resources/expected/go-S1314.json new file mode 100644 index 00000000..485c871a --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S1314.json @@ -0,0 +1,5 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S1314.go':[ +6, +], +} diff --git a/its/ruling/src/test/resources/expected/go-S134.json b/its/ruling/src/integrationTest/resources/expected/go-S134.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S134.json rename to its/ruling/src/integrationTest/resources/expected/go-S134.json diff --git a/its/ruling/src/test/resources/expected/go-S138.json b/its/ruling/src/integrationTest/resources/expected/go-S138.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S138.json rename to its/ruling/src/integrationTest/resources/expected/go-S138.json diff --git a/its/ruling/src/test/resources/expected/go-S1451.json b/its/ruling/src/integrationTest/resources/expected/go-S1451.json similarity index 95% rename from its/ruling/src/test/resources/expected/go-S1451.json rename to its/ruling/src/integrationTest/resources/expected/go-S1451.json index 5a538153..ce238c64 100644 --- a/its/ruling/src/test/resources/expected/go-S1451.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S1451.json @@ -1,53 +1,53 @@ { -'go-project:ruling/src/test/resources/sources/S103.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S103.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S105.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S105.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S107.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S107.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S1110.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1110.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S1116.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1116.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S1125.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1125.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S1135.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1135.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S1192.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1192.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S122.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S122.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S1313.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1313.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S1656.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1656.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S1763.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1763.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S1862.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1862.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S2068.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S2068.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S2757.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S2757.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S3923.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S3923.go':[ 0, ], -'go-project:ruling/src/test/resources/sources/S4663.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S4663.go':[ 0, ], 'go-project:sources/kubernetes-client-go/third_party/forked/golang/template/exec.go':[ diff --git a/its/ruling/src/test/resources/expected/go-S1479.json b/its/ruling/src/integrationTest/resources/expected/go-S1479.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S1479.json rename to its/ruling/src/integrationTest/resources/expected/go-S1479.json diff --git a/its/ruling/src/integrationTest/resources/expected/go-S1656.json b/its/ruling/src/integrationTest/resources/expected/go-S1656.json new file mode 100644 index 00000000..7a1ef3ce --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S1656.json @@ -0,0 +1,6 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S1656.go':[ +7, +9, +], +} diff --git a/its/ruling/src/test/resources/expected/go-S1763.json b/its/ruling/src/integrationTest/resources/expected/go-S1763.json similarity index 83% rename from its/ruling/src/test/resources/expected/go-S1763.json rename to its/ruling/src/integrationTest/resources/expected/go-S1763.json index d85b14bd..d1fefc47 100644 --- a/its/ruling/src/test/resources/expected/go-S1763.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S1763.json @@ -1,5 +1,5 @@ { -'go-project:ruling/src/test/resources/sources/S1763.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S1763.go':[ 8, 19, 23, diff --git a/its/ruling/src/integrationTest/resources/expected/go-S1764.json b/its/ruling/src/integrationTest/resources/expected/go-S1764.json new file mode 100644 index 00000000..a1462227 --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S1764.json @@ -0,0 +1,5 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S122.go':[ +10, +], +} diff --git a/its/ruling/src/test/resources/expected/go-S1821.json b/its/ruling/src/integrationTest/resources/expected/go-S1821.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S1821.json rename to its/ruling/src/integrationTest/resources/expected/go-S1821.json diff --git a/its/ruling/src/integrationTest/resources/expected/go-S1862.json b/its/ruling/src/integrationTest/resources/expected/go-S1862.json new file mode 100644 index 00000000..0a2375b1 --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S1862.json @@ -0,0 +1,10 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S1862.go':[ +6, +13, +20, +28, +30, +37, +], +} diff --git a/its/ruling/src/test/resources/expected/go-S1871.json b/its/ruling/src/integrationTest/resources/expected/go-S1871.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S1871.json rename to its/ruling/src/integrationTest/resources/expected/go-S1871.json diff --git a/its/ruling/src/test/resources/expected/go-S1940.json b/its/ruling/src/integrationTest/resources/expected/go-S1940.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S1940.json rename to its/ruling/src/integrationTest/resources/expected/go-S1940.json diff --git a/its/ruling/src/test/resources/expected/go-S2068.json b/its/ruling/src/integrationTest/resources/expected/go-S2068.json similarity index 67% rename from its/ruling/src/test/resources/expected/go-S2068.json rename to its/ruling/src/integrationTest/resources/expected/go-S2068.json index 5adba164..9ce21882 100644 --- a/its/ruling/src/test/resources/expected/go-S2068.json +++ b/its/ruling/src/integrationTest/resources/expected/go-S2068.json @@ -1,5 +1,5 @@ { -'go-project:ruling/src/test/resources/sources/S2068.go':[ +'go-project:ruling/src/integrationTest/resources/sources/S2068.go':[ 4, 9, 10, diff --git a/its/ruling/src/integrationTest/resources/expected/go-S2757.json b/its/ruling/src/integrationTest/resources/expected/go-S2757.json new file mode 100644 index 00000000..18a25017 --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S2757.json @@ -0,0 +1,6 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S2757.go':[ +6, +7, +], +} diff --git a/its/ruling/src/test/resources/expected/go-S3776.json b/its/ruling/src/integrationTest/resources/expected/go-S3776.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S3776.json rename to its/ruling/src/integrationTest/resources/expected/go-S3776.json diff --git a/its/ruling/src/integrationTest/resources/expected/go-S3923.json b/its/ruling/src/integrationTest/resources/expected/go-S3923.json new file mode 100644 index 00000000..2529ceb5 --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S3923.json @@ -0,0 +1,5 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S3923.go':[ +4, +], +} diff --git a/its/ruling/src/test/resources/expected/go-S4144.json b/its/ruling/src/integrationTest/resources/expected/go-S4144.json similarity index 100% rename from its/ruling/src/test/resources/expected/go-S4144.json rename to its/ruling/src/integrationTest/resources/expected/go-S4144.json diff --git a/its/ruling/src/integrationTest/resources/expected/go-S4663.json b/its/ruling/src/integrationTest/resources/expected/go-S4663.json new file mode 100644 index 00000000..112ba6f6 --- /dev/null +++ b/its/ruling/src/integrationTest/resources/expected/go-S4663.json @@ -0,0 +1,5 @@ +{ +'go-project:ruling/src/integrationTest/resources/sources/S4663.go':[ +7, +], +} diff --git a/its/ruling/src/test/resources/sources/ParsingError.go b/its/ruling/src/integrationTest/resources/sources/ParsingError.go similarity index 83% rename from its/ruling/src/test/resources/sources/ParsingError.go rename to its/ruling/src/integrationTest/resources/sources/ParsingError.go index 051d1857..01f8e2a3 100644 --- a/its/ruling/src/test/resources/sources/ParsingError.go +++ b/its/ruling/src/integrationTest/resources/sources/ParsingError.go @@ -1 +1 @@ -$!#@ +$!#@ diff --git a/its/ruling/src/test/resources/sources/S100.go b/its/ruling/src/integrationTest/resources/sources/S100.go similarity index 88% rename from its/ruling/src/test/resources/sources/S100.go rename to its/ruling/src/integrationTest/resources/sources/S100.go index e77c2285..690fedbc 100644 --- a/its/ruling/src/test/resources/sources/S100.go +++ b/its/ruling/src/integrationTest/resources/sources/S100.go @@ -1,16 +1,16 @@ -// S100 Copyright -package samples - -func SUPERNAME() { - //Empty -} - -func _() { - //Empty -} - - -func _() int { - //Empty -} - +// S100 Copyright +package samples + +func SUPERNAME() { + //Empty +} + +func _() { + //Empty +} + + +func _() int { + //Empty +} + diff --git a/its/ruling/src/test/resources/sources/S103.go b/its/ruling/src/integrationTest/resources/sources/S103.go similarity index 100% rename from its/ruling/src/test/resources/sources/S103.go rename to its/ruling/src/integrationTest/resources/sources/S103.go diff --git a/its/ruling/src/test/resources/sources/S105.go b/its/ruling/src/integrationTest/resources/sources/S105.go similarity index 100% rename from its/ruling/src/test/resources/sources/S105.go rename to its/ruling/src/integrationTest/resources/sources/S105.go diff --git a/its/ruling/src/test/resources/sources/S107.go b/its/ruling/src/integrationTest/resources/sources/S107.go similarity index 100% rename from its/ruling/src/test/resources/sources/S107.go rename to its/ruling/src/integrationTest/resources/sources/S107.go diff --git a/its/ruling/src/test/resources/sources/S108.go b/its/ruling/src/integrationTest/resources/sources/S108.go similarity index 95% rename from its/ruling/src/test/resources/sources/S108.go rename to its/ruling/src/integrationTest/resources/sources/S108.go index 3dc7cd24..4841fd59 100644 --- a/its/ruling/src/test/resources/sources/S108.go +++ b/its/ruling/src/integrationTest/resources/sources/S108.go @@ -1,27 +1,27 @@ -// Copyright S108 -package samples - -func foo() { - for { } //Compliant, FN due to the fact that loop are not mapped to LoopTree - - n := 3 - for n < 10 { } //Compliant, this is equivalent to a while loop and not reported by the rule - - for i := 0; i < 10; i++ { } //NonCompliant - - for i := 0; i < 10; i++ { - //Compliant, this comment is inside - } - - tag := 1 - - switch tag { } //NonCompliant - - cond := false - - if cond { } //NonCompliant -} -//Next line compliant for rule 108 (but will trigger rule S1186) -func bar() { - -} +// Copyright S108 +package samples + +func foo() { + for { } //Compliant, FN due to the fact that loop are not mapped to LoopTree + + n := 3 + for n < 10 { } //Compliant, this is equivalent to a while loop and not reported by the rule + + for i := 0; i < 10; i++ { } //NonCompliant + + for i := 0; i < 10; i++ { + //Compliant, this comment is inside + } + + tag := 1 + + switch tag { } //NonCompliant + + cond := false + + if cond { } //NonCompliant +} +//Next line compliant for rule 108 (but will trigger rule S1186) +func bar() { + +} diff --git a/its/ruling/src/test/resources/sources/S1110.go b/its/ruling/src/integrationTest/resources/sources/S1110.go similarity index 100% rename from its/ruling/src/test/resources/sources/S1110.go rename to its/ruling/src/integrationTest/resources/sources/S1110.go diff --git a/its/ruling/src/test/resources/sources/S1116.go b/its/ruling/src/integrationTest/resources/sources/S1116.go similarity index 100% rename from its/ruling/src/test/resources/sources/S1116.go rename to its/ruling/src/integrationTest/resources/sources/S1116.go diff --git a/its/ruling/src/test/resources/sources/S1125.go b/its/ruling/src/integrationTest/resources/sources/S1125.go similarity index 100% rename from its/ruling/src/test/resources/sources/S1125.go rename to its/ruling/src/integrationTest/resources/sources/S1125.go diff --git a/its/ruling/src/test/resources/sources/S1135.go b/its/ruling/src/integrationTest/resources/sources/S1135.go similarity index 100% rename from its/ruling/src/test/resources/sources/S1135.go rename to its/ruling/src/integrationTest/resources/sources/S1135.go diff --git a/its/ruling/src/test/resources/sources/S1192.go b/its/ruling/src/integrationTest/resources/sources/S1192.go similarity index 100% rename from its/ruling/src/test/resources/sources/S1192.go rename to its/ruling/src/integrationTest/resources/sources/S1192.go diff --git a/its/ruling/src/test/resources/sources/S122.go b/its/ruling/src/integrationTest/resources/sources/S122.go similarity index 100% rename from its/ruling/src/test/resources/sources/S122.go rename to its/ruling/src/integrationTest/resources/sources/S122.go diff --git a/its/ruling/src/test/resources/sources/S1313.go b/its/ruling/src/integrationTest/resources/sources/S1313.go similarity index 100% rename from its/ruling/src/test/resources/sources/S1313.go rename to its/ruling/src/integrationTest/resources/sources/S1313.go diff --git a/its/ruling/src/test/resources/sources/S1314.go b/its/ruling/src/integrationTest/resources/sources/S1314.go similarity index 94% rename from its/ruling/src/test/resources/sources/S1314.go rename to its/ruling/src/integrationTest/resources/sources/S1314.go index 51eff16c..cc476e73 100644 --- a/its/ruling/src/test/resources/sources/S1314.go +++ b/its/ruling/src/integrationTest/resources/sources/S1314.go @@ -1,8 +1,8 @@ -// Copyright -package samples - -func octalTest() int { - i := 42 // Compliant - octalLit := 042 // Noncompliant - j := 0.42 // Compliant -} +// Copyright +package samples + +func octalTest() int { + i := 42 // Compliant + octalLit := 042 // Noncompliant + j := 0.42 // Compliant +} diff --git a/its/ruling/src/test/resources/sources/S1656.go b/its/ruling/src/integrationTest/resources/sources/S1656.go similarity index 100% rename from its/ruling/src/test/resources/sources/S1656.go rename to its/ruling/src/integrationTest/resources/sources/S1656.go diff --git a/its/ruling/src/test/resources/sources/S1763.go b/its/ruling/src/integrationTest/resources/sources/S1763.go similarity index 100% rename from its/ruling/src/test/resources/sources/S1763.go rename to its/ruling/src/integrationTest/resources/sources/S1763.go diff --git a/its/ruling/src/test/resources/sources/S1862.go b/its/ruling/src/integrationTest/resources/sources/S1862.go similarity index 100% rename from its/ruling/src/test/resources/sources/S1862.go rename to its/ruling/src/integrationTest/resources/sources/S1862.go diff --git a/its/ruling/src/test/resources/sources/S2068.go b/its/ruling/src/integrationTest/resources/sources/S2068.go similarity index 100% rename from its/ruling/src/test/resources/sources/S2068.go rename to its/ruling/src/integrationTest/resources/sources/S2068.go diff --git a/its/ruling/src/test/resources/sources/S2757.go b/its/ruling/src/integrationTest/resources/sources/S2757.go similarity index 100% rename from its/ruling/src/test/resources/sources/S2757.go rename to its/ruling/src/integrationTest/resources/sources/S2757.go diff --git a/its/ruling/src/test/resources/sources/S3923.go b/its/ruling/src/integrationTest/resources/sources/S3923.go similarity index 100% rename from its/ruling/src/test/resources/sources/S3923.go rename to its/ruling/src/integrationTest/resources/sources/S3923.go diff --git a/its/ruling/src/test/resources/sources/S4663.go b/its/ruling/src/integrationTest/resources/sources/S4663.go similarity index 93% rename from its/ruling/src/test/resources/sources/S4663.go rename to its/ruling/src/integrationTest/resources/sources/S4663.go index 259fcf10..9d74cc6f 100644 --- a/its/ruling/src/test/resources/sources/S4663.go +++ b/its/ruling/src/integrationTest/resources/sources/S4663.go @@ -1,15 +1,15 @@ -// S4663 -package samples - -func longLine() int { - // - // The following multi-lines comment is empty - /* - - */ - // The following multi-lines comment is NOT empty - /* - - Not empty - */ -} +// S4663 +package samples + +func longLine() int { + // + // The following multi-lines comment is empty + /* + + */ + // The following multi-lines comment is NOT empty + /* + + Not empty + */ +} diff --git a/its/ruling/src/test/resources/expected/go-ParsingError.json b/its/ruling/src/test/resources/expected/go-ParsingError.json deleted file mode 100644 index 6e539a2b..00000000 --- a/its/ruling/src/test/resources/expected/go-ParsingError.json +++ /dev/null @@ -1,5 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/ParsingError.go':[ -0, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S1110.json b/its/ruling/src/test/resources/expected/go-S1110.json deleted file mode 100644 index cfb76a9a..00000000 --- a/its/ruling/src/test/resources/expected/go-S1110.json +++ /dev/null @@ -1,5 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S1110.go':[ -4, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S1125.json b/its/ruling/src/test/resources/expected/go-S1125.json deleted file mode 100644 index 45c20660..00000000 --- a/its/ruling/src/test/resources/expected/go-S1125.json +++ /dev/null @@ -1,5 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S1125.go':[ -4, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S122.json b/its/ruling/src/test/resources/expected/go-S122.json deleted file mode 100644 index b2cf4077..00000000 --- a/its/ruling/src/test/resources/expected/go-S122.json +++ /dev/null @@ -1,10 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S1116.go':[ -11, -], -'go-project:ruling/src/test/resources/sources/S122.go':[ -8, -13, -17, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S1313.json b/its/ruling/src/test/resources/expected/go-S1313.json deleted file mode 100644 index 33091335..00000000 --- a/its/ruling/src/test/resources/expected/go-S1313.json +++ /dev/null @@ -1,5 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S1313.go':[ -4, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S1314.json b/its/ruling/src/test/resources/expected/go-S1314.json deleted file mode 100644 index bc45f14b..00000000 --- a/its/ruling/src/test/resources/expected/go-S1314.json +++ /dev/null @@ -1,5 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S1314.go':[ -6, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S1656.json b/its/ruling/src/test/resources/expected/go-S1656.json deleted file mode 100644 index 318d624d..00000000 --- a/its/ruling/src/test/resources/expected/go-S1656.json +++ /dev/null @@ -1,6 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S1656.go':[ -7, -9, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S1764.json b/its/ruling/src/test/resources/expected/go-S1764.json deleted file mode 100644 index c3d76445..00000000 --- a/its/ruling/src/test/resources/expected/go-S1764.json +++ /dev/null @@ -1,5 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S122.go':[ -10, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S1862.json b/its/ruling/src/test/resources/expected/go-S1862.json deleted file mode 100644 index a109ca3d..00000000 --- a/its/ruling/src/test/resources/expected/go-S1862.json +++ /dev/null @@ -1,10 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S1862.go':[ -6, -13, -20, -28, -30, -37, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S2757.json b/its/ruling/src/test/resources/expected/go-S2757.json deleted file mode 100644 index a3cb9319..00000000 --- a/its/ruling/src/test/resources/expected/go-S2757.json +++ /dev/null @@ -1,6 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S2757.go':[ -6, -7, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S3923.json b/its/ruling/src/test/resources/expected/go-S3923.json deleted file mode 100644 index a525a3ae..00000000 --- a/its/ruling/src/test/resources/expected/go-S3923.json +++ /dev/null @@ -1,5 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S3923.go':[ -4, -], -} diff --git a/its/ruling/src/test/resources/expected/go-S4663.json b/its/ruling/src/test/resources/expected/go-S4663.json deleted file mode 100644 index 393cc0de..00000000 --- a/its/ruling/src/test/resources/expected/go-S4663.json +++ /dev/null @@ -1,5 +0,0 @@ -{ -'go-project:ruling/src/test/resources/sources/S4663.go':[ -7, -], -}