Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/qodana-check-duplicatedcode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Qodana - Duplicated Code

on:
workflow_dispatch:
push:
branches: [ main, feature/** ]
pull_request:
branches: [ '**' ]

concurrency:
group: ${{ github.workflow }}${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
qodana:
runs-on: ubuntu-latest
permissions:
contents: read
# PR check
checks: write
# PR comments
pull-requests: write
# SARIF upload
security-events: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Maximize Build Space
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
large-packages: false
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
with:
# --config points to the DuplicatedCode-only Qodana config
args:
--config,${{ github.workspace }}/qodana-configs/duplicated-code/qodana.yaml
cache-default-branch-only: true
# pr-mode off means that the whole repo should be checked for duplicate code, instead of just copy/pastes within the PR
pr-mode: false
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
3 changes: 3 additions & 0 deletions qodana-configs/duplicated-code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Duplicated Code Check

This check only runs the Qodana DuplicatedCode check and should post duplicated code to [Github PRs](../../.github/workflows/qodana-check-duplicatedcode.yml).
10 changes: 10 additions & 0 deletions qodana-configs/duplicated-code/qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 1.0
linter: jetbrains/qodana-jvm-community:latest
projectJDK: "21"
bootstrap: ./gradlew :plugin-core:sdk-codegen:generateSdks :plugin-core:jetbrains-community:generateTelemetry :plugin-toolkit:jetbrains-rider:generateModels
exclude:
- name: All
dot-net:
solution: ReSharper.AWS.sln
include:
- name: DuplicatedCode
1 change: 1 addition & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ include:
- name: SimplifiableServiceRetrieving
- name: QuickFixGetFamilyNameViolation
- name: TokenSetInParserDefinition
- name: DuplicatedCode
Loading