-
Notifications
You must be signed in to change notification settings - Fork 218
36 lines (34 loc) · 1.12 KB
/
checkstyle.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
name: Checkstyle
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
checkstyle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run check style
run: ./gradlew --continue clean checkstyleMain checkstyleTest checkstyleIntegration checkstyleJmh -PmaxCheckstyleWarnings=0
- name: Run reviewdog
if: ${{ success() || failure() }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for f in $(find . -regex '.*/build/reports/checkstyle/.*\.xml'); do
module_name=$(echo "$f" | cut -d "/" -f2)
reviewdog -f=checkstyle -level=warning -filter-mode=nofilter -reporter=github-check -name="checkstyle-$module_name" < $f
done