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 23
23
FILES=$( echo $ARGS | jq -r ' .files[]' )
24
24
fi
25
25
26
+ TOTAL_VIOLATIONS=0
26
27
27
28
# If typescript is false, run standard
28
29
if [ $TYPESCRIPT == ' false' ]; then
@@ -35,8 +36,11 @@ if [ $TYPESCRIPT == 'false' ]; then
35
36
# Pass files array as args to standard
36
37
OUTPUT=$( standard $LINT_ARGS | standard-json)
37
38
39
+ # Count total violations
40
+ TOTAL_VIOLATIONS=$( echo $OUTPUT | jq -r ' .results[].messages | length' )
41
+
38
42
if [ $OUTPUT_LEVEL == " 0" ]; then
39
- echo " Linting with StandardJS complete."
43
+ echo " Linting with StandardJS complete. $TOTAL_VIOLATIONS violations found. "
40
44
fi
41
45
42
46
if [ $OUTPUT_LEVEL == " 1" ]; then
@@ -86,6 +90,9 @@ for TS_ROOT in $TS_ROOTS; do
86
90
fi
87
91
88
92
TS_OUTPUT+=$( ts-standard $LINT_ARGS | standard-json)
93
+
94
+ # Count total violations
95
+ TOTAL_VIOLATIONS=$( echo $TS_OUTPUT | jq -r ' .results[].messages | length' )
89
96
# If ts-standard failed and EXIT_CODE is 0, set EXIT_CODE
90
97
if [ $? -ne 0 ] && [ $EXIT_CODE -eq 0 ]; then
91
98
EXIT_CODE=$?
95
102
96
103
97
104
if [ $OUTPUT_LEVEL == " 0" ]; then
98
- echo " Linting with StandardJS (TS) complete."
105
+ echo " Linting with StandardJS (TS) complete. $TOTAL_VIOLATIONS violations found. "
99
106
fi
100
107
101
108
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
21
21
22
22
if [ $OUTPUT_LEVEL == " 0" ]; then
23
23
echo " Linting with ESLint v$ESLINT_VERSION complete."
24
+ TOTAL_VIOLATIONS=$( echo $ESLINT_JSON | jq -r ' .[].messages | length' )
24
25
fi
25
26
26
27
if [ $OUTPUT_LEVEL == " 1" ]; then
You can’t perform that action at this time.
0 commit comments