diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e7cb13c..8737db8e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,7 @@ # GitHub Actions Workflow created for testing and preparing the plugin release in following steps: # - validate Gradle Wrapper, # - run 'test' and 'verifyPlugin' tasks, +# - run Qodana inspections, # - run 'buildPlugin' task and prepare artifact for the further tests, # - run 'runPluginVerifier' task, # @@ -76,6 +77,10 @@ jobs: name: tests-result path: ${{ github.workspace }}/build/reports/tests + # Run plugin build + - name: Run Build + - run: ./gradlew clean buildPlugin + # until https://github.com/JetBrains/gradle-intellij-plugin/issues/1027 is solved # # Cache Plugin Verifier IDEs @@ -97,6 +102,10 @@ jobs: # name: pluginVerifier-result # path: ${{ github.workspace }}/build/reports/pluginVerifier + # Run Qodana inspections + - name: Qodana - Code Inspection + uses: JetBrains/qodana-action@v4.2.5 + # Prepare plugin archive content for creating artifact - name: Prepare Plugin Artifact id: artifact diff --git a/build.gradle.kts b/build.gradle.kts index 006273da..817ff135 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,6 +12,8 @@ plugins { id("org.jetbrains.intellij") version "1.6.0" // Gradle Changelog Plugin id("org.jetbrains.changelog") version "1.3.1" + // Gradle Qodana Plugin + id("org.jetbrains.qodana") version "0.1.13" } group = properties("pluginGroup") @@ -30,8 +32,6 @@ dependencies { implementation("org.zeroturnaround:zt-exec:1.12") { exclude("org.slf4j") } - - } // Configure project's dependencies @@ -57,6 +57,14 @@ changelog { groups.set(emptyList()) } +// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin +qodana { + cachePath.set(projectDir.resolve(".qodana").canonicalPath) + reportPath.set(projectDir.resolve("build/reports/inspections").canonicalPath) + saveReport.set(true) + showReport.set(System.getenv("QODANA_SHOW_REPORT")?.toBoolean() ?: false) +} + tasks { buildPlugin { exclude { "coroutines" in it.name }