From 1e0dc6863da463a17a9545da86aa7bfee90b7bc8 Mon Sep 17 00:00:00 2001 From: zim514 Date: Sun, 7 Apr 2024 12:25:15 -0400 Subject: [PATCH] Update Qodana config --- .github/workflows/code_quality.yml | 10 +++++++++- qodana.yaml | 11 +++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml index d917d5c9..8ff6c75e 100644 --- a/.github/workflows/code_quality.yml +++ b/.github/workflows/code_quality.yml @@ -1,16 +1,24 @@ name: Qodana on: pull_request: + workflow_dispatch: push: + branches: + - main jobs: Qodana: runs-on: ubuntu-latest if: github.repository == 'zim514/script.service.hue' + permissions: + contents: write + pull-requests: write + checks: write steps: - uses: actions/checkout@v4 with: + ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit fetch-depth: 0 - name: 'Qodana Scan' uses: JetBrains/qodana-action@latest @@ -19,4 +27,4 @@ jobs: cache-default-branch-only: true args: --baseline,qodana.sarif.json env: - QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} \ No newline at end of file diff --git a/qodana.yaml b/qodana.yaml index 0655c00f..63376554 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -3,15 +3,12 @@ # https://www.jetbrains.com/help/qodana/qodana-yaml.html # #-------------------------------------------------------------------------------# version: "1.0" - #Specify inspection profile for code analysis profile: name: qodana.starter - #Enable inspections #include: # - name: - #Disable inspections #exclude: # - name: @@ -21,18 +18,16 @@ exclude: - name: All paths: - script.service.hue/resources/lib/rgbxy - - + - name: PyPep8Inspection #Execute shell command before Qodana execution (Applied in CI/CD pipeline) #bootstrap: sh ./prepare-qodana.sh - bootstrap: | rm -rf .idea pip install -r requirements.txt - #Install IDE plugins before Qodana execution (Applied in CI/CD pipeline) #plugins: # - id: #(plugin id can be found at https://plugins.jetbrains.com) - #Specify Qodana linter for analysis (Applied in CI/CD pipeline) linter: jetbrains/qodana-python:latest +include: + - name: LongLine