Skip to content

Commit

Permalink
[skip ci] Use Native Qodana linter
Browse files Browse the repository at this point in the history
  • Loading branch information
bagusnl authored Dec 6, 2024
1 parent 7c0eb89 commit 86ba227
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
43 changes: 36 additions & 7 deletions .github/workflows/qodana-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,55 @@ on:

jobs:
qodana:
runs-on: ubuntu-latest
runs-on: windows-latest
strategy:
matrix:
configuration: [Release] # No need to distribute Debug builds
platform: [x64]
framework: [net9.0-windows10.0.22621.0]

env:
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}
DOTNET_INSTALL_DIR: '.\.dotnet'
DOTNET_VERSION: '9.x'
DOTNET_QUALITY: 'ga'
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

permissions:
actions: read
contents: write
pull-requests: write
checks: write
security-events: write

steps:
- uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
submodules: recursive # many many submodules

- name: 'Qodana Scan'
uses: JetBrains/qodana-action@latest
- name: Install winget
uses: Cyberboss/install-winget@v1

- name: Install Qodana CLI
run: |
winget install -e --id JetBrains.QodanaCLI --force
qodana --version
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
pr-mode: false
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} # read the steps about it below
dotnet-version: ${{ env.DOTNET_VERSION }}
dotnet-quality: ${{ env.DOTNET_QUALITY }}
cache: true
cache-dependency-path: CollapseLauncher/packages.lock.json

- name: Qodana Scan
run: |
qodana scan --ide QDNET-EAP -o ${{ runner.temp }}\qodana\results --cache-dir ${{ runner.temp }}\qodana\cache
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
sarif_file: ${{ runner.temp }}\qodana\results\qodana.sarif.json
5 changes: 4 additions & 1 deletion qodana.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
version: "1.0"
linter: jetbrains/qodana-dotnet:latest
ide: QDNET-EAP
bootstrap: dotnet build CollapseLauncher -c Release
dotnet:
solution: CollapseLauncher.sln
profile:
name: qodana.recommended
exclude:
- name: All
paths:
Expand Down

0 comments on commit 86ba227

Please sign in to comment.