Skip to content

Commit bb41a2c

Browse files
committed
check-build-and-verify.sh: run CodeNarc.
1 parent 3f5b3b3 commit bb41a2c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/main/scripts/ci/check-build-and-verify.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ fi
99

1010
CS_FAIL=
1111
PMD_FAIL=
12+
CODENARC_FAIL=
1213
LICENSE_FAIL=
1314
POM_FAIL=
1415
BOOTLINT_FAIL=
@@ -20,6 +21,11 @@ VERIFY_FAIL=
2021
if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
2122
mvn --batch-mode checkstyle:check -Dcheckstyle.violationSeverity=warning >cs.log 2>&1 || CS_FAIL=yes
2223
mvn --batch-mode pmd:check >pmd.log 2>&1 || PMD_FAIL=yes
24+
mvn --batch-mode codenarc:codenarc \
25+
-Dcodenarc.maxPriority1Violations=0 \
26+
-Dcodenarc.maxPriority2Violations=0 \
27+
-Dcodenarc.maxPriority3Violations=0 \
28+
>codenarc.log 2>&1 || CODENARC_FAIL=yes
2329
mvn --batch-mode license:check >license.log 2>&1 || LICENSE_FAIL=yes
2430
mvn --batch-mode sortpom:verify -Dsort.verifyFail=stop >pom.log || POM_FAIL=yes
2531
find src -type f -name '*.html' | xargs bootlint >bootlint.log 2>&1 || BOOTLINT_FAIL=yes
@@ -46,6 +52,7 @@ echo
4652
if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
4753
print_status "$CS_FAIL" 'Run CheckStyle'
4854
print_status "$PMD_FAIL" 'Run PMD'
55+
print_status "$CODENARC_FAIL" 'Run CodeNarc'
4956
print_status "$LICENSE_FAIL" 'Check license headers'
5057
print_status "$POM_FAIL" 'Check sorting of pom.xml'
5158
print_status "$BOOTLINT_FAIL" 'Run bootlint'
@@ -61,6 +68,7 @@ echo
6168
if [ "$RUN_ONLY_INTEGRATION_TESTS" = 'no' ]; then
6269
print_log cs.log 'Run CheckStyle'
6370
print_log pmd.log 'Run PMD'
71+
print_log codenarc.log 'Run CodeNarc'
6472
print_log license.log 'Check license headers'
6573
print_log pom.log 'Check sorting of pom.xml'
6674
print_log bootlint.log 'Run bootlint'
@@ -71,8 +79,8 @@ fi
7179

7280
print_log verify.log 'Run integration tests'
7381

74-
rm -f cs.log pmd.log license.log bootlint.log jasmine.log validator.log test.log verify.log
82+
rm -f cs.log pmd.log codenarc.log license.log bootlint.log jasmine.log validator.log test.log verify.log
7583

76-
if [ -n "$CS_FAIL$PMD_FAIL$LICENSE_FAIL$POM_FAIL$BOOTLINT_FAIL$JASMINE_FAIL$HTML_FAIL$TEST_FAIL$VERIFY_FAIL" ]; then
84+
if [ -n "$CS_FAIL$PMD_FAIL$CODENARC_FAIL$LICENSE_FAIL$POM_FAIL$BOOTLINT_FAIL$JASMINE_FAIL$HTML_FAIL$TEST_FAIL$VERIFY_FAIL" ]; then
7785
exit 1
7886
fi

0 commit comments

Comments
 (0)