File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -69,13 +69,18 @@ separate_violations() {
6969run_reviewdog () {
7070 separate_violations
7171
72- has_violations=false
73- [ -s " $LINE_VIOLATIONS " ] || [ -s " $FILE_VIOLATIONS " ] && has_violations=true
74-
75- if [ " $has_violations " = true ]; then
76- echo " 📤 Enviando resultados para reviewdog..."
72+ if [ ! -s " $LINE_VIOLATIONS " ] && [ ! -s " $FILE_VIOLATIONS " ]; then
73+ if grep -qE ' :[0-9]+:|:null:|\|\|' " $CODENARC_RESULT " ; then
74+ echo " 📤 Enviando resultados para reviewdog..."
75+ run_reviewdog_with_config " $CODENARC_RESULT " " %f:%l:%m" \
76+ " ${INPUT_REPORTER:- github-pr-check} " " codenarc" \
77+ " ${INPUT_FILTER_MODE} " " ${INPUT_LEVEL} "
78+ fi
79+ return
7780 fi
7881
82+ echo " 📤 Enviando resultados para reviewdog..."
83+
7984 if [ -s " $LINE_VIOLATIONS " ]; then
8085 run_reviewdog_with_config " $LINE_VIOLATIONS " " %f:%l:%m" \
8186 " ${INPUT_REPORTER:- github-pr-check} " " codenarc" \
@@ -100,12 +105,6 @@ run_reviewdog() {
100105 " github-pr-check" " codenarc" " nofilter" " warning"
101106 fi
102107 fi
103-
104- if [ ! -s " $LINE_VIOLATIONS " ] && [ ! -s " $FILE_VIOLATIONS " ]; then
105- run_reviewdog_with_config " $CODENARC_RESULT " " %f:%l:%m" \
106- " ${INPUT_REPORTER:- github-pr-check} " " codenarc" \
107- " ${INPUT_FILTER_MODE} " " ${INPUT_LEVEL} "
108- fi
109108}
110109
111110generate_git_diff () {
You can’t perform that action at this time.
0 commit comments