File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 2323 FILES=$( echo $ARGS | jq -r ' .files[]' )
2424fi
2525
26+ TOTAL_VIOLATIONS=0
2627
2728# If typescript is false, run standard
2829if [ $TYPESCRIPT == ' false' ]; then
@@ -35,8 +36,11 @@ if [ $TYPESCRIPT == 'false' ]; then
3536 # Pass files array as args to standard
3637 OUTPUT=$( standard $LINT_ARGS | standard-json)
3738
39+ # Count total violations
40+ TOTAL_VIOLATIONS=$( echo $OUTPUT | jq -r ' .results[].messages | length' )
41+
3842 if [ $OUTPUT_LEVEL == " 0" ]; then
39- echo " Linting with StandardJS complete."
43+ echo " Linting with StandardJS complete. $TOTAL_VIOLATIONS violations found. "
4044 fi
4145
4246 if [ $OUTPUT_LEVEL == " 1" ]; then
@@ -86,6 +90,9 @@ for TS_ROOT in $TS_ROOTS; do
8690 fi
8791
8892 TS_OUTPUT+=$( ts-standard $LINT_ARGS | standard-json)
93+
94+ # Count total violations
95+ TOTAL_VIOLATIONS=$( echo $TS_OUTPUT | jq -r ' .results[].messages | length' )
8996 # If ts-standard failed and EXIT_CODE is 0, set EXIT_CODE
9097 if [ $? -ne 0 ] && [ $EXIT_CODE -eq 0 ]; then
9198 EXIT_CODE=$?
95102
96103
97104 if [ $OUTPUT_LEVEL == " 0" ]; then
98- echo " Linting with StandardJS (TS) complete."
105+ echo " Linting with StandardJS (TS) complete. $TOTAL_VIOLATIONS violations found. "
99106 fi
100107
101108 if [ $OUTPUT_LEVEL == " 1" ]; then
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ ESLINT_JSON=$(npx --no-install "eslint@$ESLINT_VERSION" --format json "$ESLINT_A
2121
2222if [ $OUTPUT_LEVEL == " 0" ]; then
2323 echo " Linting with ESLint v$ESLINT_VERSION complete."
24+ TOTAL_VIOLATIONS=$( echo $ESLINT_JSON | jq -r ' .[].messages | length' )
2425fi
2526
2627if [ $OUTPUT_LEVEL == " 1" ]; then
You can’t perform that action at this time.
0 commit comments