-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
23 lines (20 loc) · 817 Bytes
/
.gitlab-ci.yml
File metadata and controls
23 lines (20 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
stages:
- lint
checkstyle:
stage: lint
image: registry.gitlab.com/eyeo/docker/gitlab-codequality:21.01
script:
# Run checkstyle with our config against all java files
- checkstyle --exclude=.git -c config/checkstyle/checkstyle.xml -f xml $(find . -name "*.java") -o checkstyle-report.xml || true
# Change the paths to relative in the output so gitlab can link them properly
- sed -i -e "s|$(pwd)/./||g" checkstyle-report.xml
# Convert the checkstyle output to code-climate format so gitlab can parse it
- |
violations-command-line \
-detail-level COMPACT \
-code-climate code-climate-report.json \
--violations "CHECKSTYLE" "$(pwd)" ".*checkstyle-report.xml" "Checkstyle"
artifacts:
reports:
codequality:
- code-climate-report.json