-
Notifications
You must be signed in to change notification settings - Fork 25
125 lines (109 loc) · 3.52 KB
/
code_quality.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: CodeQuality
on:
workflow_dispatch:
merge_group:
pull_request:
push:
branches:
- main
- 'KeY-*'
jobs:
checkerFramework:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'corretto'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.1.0
- name: Build with Gradle
run: ./gradlew -DENABLE_NULLNESS=true compileTest
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2024.2.3
- uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '21'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.1.0
- name: SpotlessCheck
run: ./gradlew --continue spotlessCheck
# checkstyle:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - run: scripts/tools/checkstyle/runIncrementalCheckstyle.sh --xml | tee report.xml
# - run: |
# npx violations-command-line -sarif sarif-report.json \
# -v "CHECKSTYLE" "." ".*/report.xml$" "Checkstyle" \
# -diff-to $(git merge-base HEAD origin/main) -pv false
# - uses: github/codeql-action/upload-sarif@v3
# if: success() || failure()
# with:
# sarif_file: sarif-report.json
checkstyle_new:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '21'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.1.0
- name: Checkstyle
run: ./gradlew --continue checkstyleMainChanged
- run: |
npx violations-command-line -sarif sarif-report.json \
-v "CHECKSTYLE" "." ".*/build/reports/checkstyle/main_diff.xml$" "Checkstyle"
#-diff-from $(git merge-base HEAD origin/main)
# - run: python3 ./.github/printcs.py */build/reports/checkstyle/main_diff.xml
# $(git merge-base HEAD origin/main)
- uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: sarif-report.json
pmd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '21'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4.1.0
- name: PMD checks
run: ./gradlew --continue pmdMainChanged
# - run: python3 ./.github/printAnnotations.py */build/reports/pmd/main.xml
- run: |
npx violations-command-line -sarif pmd-report.json \
-v "PMD" "." ".*/build/reports/pmd/main_diff.xml$" "PMD"
# -diff-from $(git merge-base HEAD origin/main)
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: pmd-report.json