From 2fc0d5faa4c8b13cbfd0828bba089280797cf741 Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sat, 22 Apr 2023 20:58:00 +0200 Subject: [PATCH 1/9] Redo Qodana upgrade --- .github/workflows/docs.yml | 26 +++---------------- .../features/advanced/validation-cicd.adoc | 3 --- qodana.yaml | 5 ++++ 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e71c8e0d1..42fa52545 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,31 +38,14 @@ jobs: with: fetch-depth: ${{ github.event.pull_request.commits }} - - name: Download AsciiDoc plugin for AsciiDoc checks - run: | - curl -L -o asciidoctor-intellij-plugin.zip https://github.com/asciidoctor/asciidoctor-intellij-plugin/releases/download/0.38.2/asciidoctor-intellij-plugin-0.38.2.zip - unzip asciidoctor-intellij-plugin.zip - - - name: Download Grazie plugin for grammar checks - # https://plugins.jetbrains.com/plugin/12175-grazie/versions - run: | - curl -L -o grazie.zip 'https://plugins.jetbrains.com/plugin/download?rel=true&updateId=257026' - unzip grazie.zip - - - name: Download Grazie Professional plugin for grammar checks - # https://plugins.jetbrains.com/plugin/16136-grazie-professional/versions - run: | - curl -L -o grazie-pro.zip 'https://plugins.jetbrains.com/plugin/download?rel=true&updateId=260567' - unzip grazie-pro.zip + - name: Get one more commit so Qodana we can identify the changes + if: github.event_name == 'pull_request' + run: git fetch --deepen=1 - name: Create empty folder to overwrite disabled plugin run: | mkdir empty - - name: Get one more commit so Qodana we can identify the changes - if: github.event_name == 'pull_request' - run: git fetch --deepen=1 - - name: 'Qodana for Docs' uses: JetBrains/qodana-action@v2023.2.1 with: @@ -75,10 +58,7 @@ jobs: args: > --linter,jetbrains/qodana-jvm-community:2023.2, --property=idea.suppressed.plugins.id=com.intellij.gradle, - -v,${{ github.workspace }}/grazie:/opt/idea/plugins/grazie, -v,${{ github.workspace }}/empty:/opt/idea/plugins/gradle-java, - -v,${{ github.workspace }}/grazie-pro:/opt/idea/plugins/grazie-pro, - -v,${{ github.workspace }}/asciidoctor-intellij-plugin:/opt/idea/plugins/asciidoctor-intellij-plugin, --baseline,doc/qodana-baseline.sarif.json # https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#example-workflow-that-runs-the-eslint-analysis-tool diff --git a/doc/users-guide/modules/ROOT/pages/features/advanced/validation-cicd.adoc b/doc/users-guide/modules/ROOT/pages/features/advanced/validation-cicd.adoc index 9a83f041d..74320d877 100644 --- a/doc/users-guide/modules/ROOT/pages/features/advanced/validation-cicd.adoc +++ b/doc/users-guide/modules/ROOT/pages/features/advanced/validation-cicd.adoc @@ -107,8 +107,5 @@ include::example$workflow-docs.yml[tags=!cleanup] The following issues in the Qodana issue tracker are open. Voting for them will make this integration simpler. -* https://youtrack.jetbrains.com/issue/QD-1291[QD-1291^] -Qodana easy plugin installation * https://youtrack.jetbrains.com/issue/QD-1290[QD-1290^] Add soft wrap to code preview - diff --git a/qodana.yaml b/qodana.yaml index 81666cbc1..8f7616d6a 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -1,6 +1,11 @@ version: 1.0 profile: path: doc/asciidoc-inspection.xml +plugins: + # Grazie plugin ('tanvd.grazi') is already installed, no need to download it again + - id: com.intellij.grazie.pro + # Order of plugin in the order which they depend on. AsciiDoc depends on Qodana pro, therefore add it after + - id: org.asciidoctor.intellij.asciidoc exclude: - name: All paths: From 1e3a7d76d94e197aa0be025ccc17fdd783e51b62 Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sat, 24 Jun 2023 17:49:40 +0200 Subject: [PATCH 2/9] make uploading of the report default again --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 42fa52545..d37b95e32 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -56,6 +56,7 @@ jobs: # TODO: the plugin `org.jetbrains.plugins.gradle` should also be suppressed, but the parameter doesn't allow # a comma when called from the Qodana action. Therefore overwrite it with an empty folder. args: > + --upload-result,true --linter,jetbrains/qodana-jvm-community:2023.2, --property=idea.suppressed.plugins.id=com.intellij.gradle, -v,${{ github.workspace }}/empty:/opt/idea/plugins/gradle-java, From c3843f8aab5d5339f8a013a7e3e8861c51133831 Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sat, 24 Jun 2023 18:05:39 +0200 Subject: [PATCH 3/9] only one plugin AsciiDoc --- .github/workflows/docs.yml | 14 ++++++++++++++ qodana.yaml | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d37b95e32..e60153408 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -42,6 +42,18 @@ jobs: if: github.event_name == 'pull_request' run: git fetch --deepen=1 + - name: Download Grazie plugin for grammar checks + # https://plugins.jetbrains.com/plugin/12175-grazie/versions + run: | + curl -L -o grazie.zip 'https://plugins.jetbrains.com/plugin/download?rel=true&updateId=257026' + unzip grazie.zip + + - name: Download Grazie Professional plugin for grammar checks + # https://plugins.jetbrains.com/plugin/16136-grazie-professional/versions + run: | + curl -L -o grazie-pro.zip 'https://plugins.jetbrains.com/plugin/download?rel=true&updateId=260567' + unzip grazie-pro.zip + - name: Create empty folder to overwrite disabled plugin run: | mkdir empty @@ -59,7 +71,9 @@ jobs: --upload-result,true --linter,jetbrains/qodana-jvm-community:2023.2, --property=idea.suppressed.plugins.id=com.intellij.gradle, + -v,${{ github.workspace }}/grazie:/opt/idea/plugins/grazie, -v,${{ github.workspace }}/empty:/opt/idea/plugins/gradle-java, + -v,${{ github.workspace }}/grazie-pro:/opt/idea/plugins/grazie-pro, --baseline,doc/qodana-baseline.sarif.json # https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#example-workflow-that-runs-the-eslint-analysis-tool diff --git a/qodana.yaml b/qodana.yaml index 8f7616d6a..3439bffab 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -2,8 +2,6 @@ version: 1.0 profile: path: doc/asciidoc-inspection.xml plugins: - # Grazie plugin ('tanvd.grazi') is already installed, no need to download it again - - id: com.intellij.grazie.pro # Order of plugin in the order which they depend on. AsciiDoc depends on Qodana pro, therefore add it after - id: org.asciidoctor.intellij.asciidoc exclude: From da452a9795377250dac02a068b22611d6e0e7e3c Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sat, 24 Jun 2023 18:19:18 +0200 Subject: [PATCH 4/9] fix argument --- .github/workflows/docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e60153408..22afd2a65 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -68,7 +68,6 @@ jobs: # TODO: the plugin `org.jetbrains.plugins.gradle` should also be suppressed, but the parameter doesn't allow # a comma when called from the Qodana action. Therefore overwrite it with an empty folder. args: > - --upload-result,true --linter,jetbrains/qodana-jvm-community:2023.2, --property=idea.suppressed.plugins.id=com.intellij.gradle, -v,${{ github.workspace }}/grazie:/opt/idea/plugins/grazie, From e11b54128e6e4bc70b6365c97cd6ff3832fb1478 Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sat, 24 Jun 2023 18:32:13 +0200 Subject: [PATCH 5/9] fix --- .github/workflows/docs.yml | 7 ------- qodana.yaml | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 22afd2a65..8967e2c95 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -48,12 +48,6 @@ jobs: curl -L -o grazie.zip 'https://plugins.jetbrains.com/plugin/download?rel=true&updateId=257026' unzip grazie.zip - - name: Download Grazie Professional plugin for grammar checks - # https://plugins.jetbrains.com/plugin/16136-grazie-professional/versions - run: | - curl -L -o grazie-pro.zip 'https://plugins.jetbrains.com/plugin/download?rel=true&updateId=260567' - unzip grazie-pro.zip - - name: Create empty folder to overwrite disabled plugin run: | mkdir empty @@ -72,7 +66,6 @@ jobs: --property=idea.suppressed.plugins.id=com.intellij.gradle, -v,${{ github.workspace }}/grazie:/opt/idea/plugins/grazie, -v,${{ github.workspace }}/empty:/opt/idea/plugins/gradle-java, - -v,${{ github.workspace }}/grazie-pro:/opt/idea/plugins/grazie-pro, --baseline,doc/qodana-baseline.sarif.json # https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#example-workflow-that-runs-the-eslint-analysis-tool diff --git a/qodana.yaml b/qodana.yaml index 3439bffab..8f7616d6a 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -2,6 +2,8 @@ version: 1.0 profile: path: doc/asciidoc-inspection.xml plugins: + # Grazie plugin ('tanvd.grazi') is already installed, no need to download it again + - id: com.intellij.grazie.pro # Order of plugin in the order which they depend on. AsciiDoc depends on Qodana pro, therefore add it after - id: org.asciidoctor.intellij.asciidoc exclude: From 5561ba2f4de662fc78ee054bd28bd55d983b3dfc Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sat, 24 Jun 2023 18:41:02 +0200 Subject: [PATCH 6/9] fix --- .github/workflows/docs.yml | 7 ------- qodana.yaml | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8967e2c95..42fa52545 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -42,12 +42,6 @@ jobs: if: github.event_name == 'pull_request' run: git fetch --deepen=1 - - name: Download Grazie plugin for grammar checks - # https://plugins.jetbrains.com/plugin/12175-grazie/versions - run: | - curl -L -o grazie.zip 'https://plugins.jetbrains.com/plugin/download?rel=true&updateId=257026' - unzip grazie.zip - - name: Create empty folder to overwrite disabled plugin run: | mkdir empty @@ -64,7 +58,6 @@ jobs: args: > --linter,jetbrains/qodana-jvm-community:2023.2, --property=idea.suppressed.plugins.id=com.intellij.gradle, - -v,${{ github.workspace }}/grazie:/opt/idea/plugins/grazie, -v,${{ github.workspace }}/empty:/opt/idea/plugins/gradle-java, --baseline,doc/qodana-baseline.sarif.json diff --git a/qodana.yaml b/qodana.yaml index 8f7616d6a..d8134539d 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -2,6 +2,7 @@ version: 1.0 profile: path: doc/asciidoc-inspection.xml plugins: + - id: tanvd.grazi # Grazie plugin ('tanvd.grazi') is already installed, no need to download it again - id: com.intellij.grazie.pro # Order of plugin in the order which they depend on. AsciiDoc depends on Qodana pro, therefore add it after From 8e21d9af362c6f9c4fd57767ee83bef7bd1d532c Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sat, 24 Jun 2023 18:45:50 +0200 Subject: [PATCH 7/9] Revert "fix" This reverts commit 06f990773e3171913c2950a01312ef88f6be66e7. --- .github/workflows/docs.yml | 7 +++++++ qodana.yaml | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 42fa52545..8967e2c95 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -42,6 +42,12 @@ jobs: if: github.event_name == 'pull_request' run: git fetch --deepen=1 + - name: Download Grazie plugin for grammar checks + # https://plugins.jetbrains.com/plugin/12175-grazie/versions + run: | + curl -L -o grazie.zip 'https://plugins.jetbrains.com/plugin/download?rel=true&updateId=257026' + unzip grazie.zip + - name: Create empty folder to overwrite disabled plugin run: | mkdir empty @@ -58,6 +64,7 @@ jobs: args: > --linter,jetbrains/qodana-jvm-community:2023.2, --property=idea.suppressed.plugins.id=com.intellij.gradle, + -v,${{ github.workspace }}/grazie:/opt/idea/plugins/grazie, -v,${{ github.workspace }}/empty:/opt/idea/plugins/gradle-java, --baseline,doc/qodana-baseline.sarif.json diff --git a/qodana.yaml b/qodana.yaml index d8134539d..8f7616d6a 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -2,7 +2,6 @@ version: 1.0 profile: path: doc/asciidoc-inspection.xml plugins: - - id: tanvd.grazi # Grazie plugin ('tanvd.grazi') is already installed, no need to download it again - id: com.intellij.grazie.pro # Order of plugin in the order which they depend on. AsciiDoc depends on Qodana pro, therefore add it after From 6f68c0c544ede37f6bc071d74c35a094bbb116df Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sat, 24 Jun 2023 18:52:26 +0200 Subject: [PATCH 8/9] fix --- qodana.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/qodana.yaml b/qodana.yaml index 8f7616d6a..3439bffab 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -2,8 +2,6 @@ version: 1.0 profile: path: doc/asciidoc-inspection.xml plugins: - # Grazie plugin ('tanvd.grazi') is already installed, no need to download it again - - id: com.intellij.grazie.pro # Order of plugin in the order which they depend on. AsciiDoc depends on Qodana pro, therefore add it after - id: org.asciidoctor.intellij.asciidoc exclude: From b45ca40d1d2a5bca4bb47dd6b6df69a9ab4a9126 Mon Sep 17 00:00:00 2001 From: Alexander Schwartz Date: Sat, 24 Jun 2023 18:55:26 +0200 Subject: [PATCH 9/9] fix --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8967e2c95..b44b68d96 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -56,6 +56,7 @@ jobs: uses: JetBrains/qodana-action@v2023.2.1 with: upload-result: true + pr-mode: false # https://hub.docker.com/r/jetbrains/qodana-jvm-community/tags # this disables the Gradle plugin to avoid the Gradle initialization and the dependency download # as that is not necessary for the Grazie and AsciiDoc plugins to check spelling and links. @@ -64,7 +65,6 @@ jobs: args: > --linter,jetbrains/qodana-jvm-community:2023.2, --property=idea.suppressed.plugins.id=com.intellij.gradle, - -v,${{ github.workspace }}/grazie:/opt/idea/plugins/grazie, -v,${{ github.workspace }}/empty:/opt/idea/plugins/gradle-java, --baseline,doc/qodana-baseline.sarif.json