Skip to content

Commit b351f1c

Browse files
testando abordagem hibrida reviewdog
1 parent 645a9a1 commit b351f1c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

entrypoint.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ run_reviewdog_with_config() {
5252

5353
separate_violations() {
5454
grep -E ':[0-9]+:' "$CODENARC_RESULT" > "$LINE_VIOLATIONS" || true
55-
grep -E ':null:|::' "$CODENARC_RESULT" > "$FILE_VIOLATIONS" || true
55+
grep -E ':null:' "$CODENARC_RESULT" > "$FILE_VIOLATIONS" || true
56+
57+
echo "🔍 DEBUG: Line violations encontradas:"
58+
[ -s "$LINE_VIOLATIONS" ] && head -3 "$LINE_VIOLATIONS" || echo "Nenhuma"
59+
echo "🔍 DEBUG: File violations encontradas:"
60+
[ -s "$FILE_VIOLATIONS" ] && head -3 "$FILE_VIOLATIONS" || echo "Nenhuma"
5661
}
5762

5863
run_reviewdog() {
@@ -71,7 +76,7 @@ run_reviewdog() {
7176
# Violações file-based forçando github-pr-check
7277
if [ -s "$FILE_VIOLATIONS" ]; then
7378
echo "📤 Enviando violações file-based (github-pr-check)..."
74-
run_reviewdog_with_config "$FILE_VIOLATIONS" "%f::%m" \
79+
run_reviewdog_with_config "$FILE_VIOLATIONS" "%f:%l:%m" \
7580
"github-pr-check" "codenarc-files" "nofilter" "warning"
7681
fi
7782

@@ -184,7 +189,7 @@ check_blocking_rules() {
184189

185190
echo "0" > "$VIOLATIONS_FLAG"
186191

187-
grep -E ':[0-9]+:|:null:|\|\|' "$CODENARC_RESULT" | while IFS=: read -r file line rest; do
192+
grep -E ':[0-9]+:|:null:' "$CODENARC_RESULT" | while IFS=: read -r file line rest; do
188193
[ -z "$file" ] && continue
189194
file_matches_patterns "$file" "$allowed_patterns" || continue
190195

0 commit comments

Comments
 (0)