Skip to content

Commit dceefde

Browse files
removendo logs de debug
1 parent c52e66b commit dceefde

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

β€Žentrypoint.shβ€Ž

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ run_codenarc() {
2525
-basedir="." \
2626
$includes_arg \
2727
> "$CODENARC_RESULT"
28-
29-
echo "πŸ” DEBUG: Resultado completo do CodeNarc:"
30-
cat "$CODENARC_RESULT"
31-
echo "πŸ” DEBUG: Fim do resultado CodeNarc"
3228
}
3329

3430
run_reviewdog() {
@@ -65,19 +61,14 @@ file_matches_patterns() {
6561
file="$1"
6662
patterns="$2"
6763

68-
echo "πŸ” DEBUG: Verificando arquivo '$file' contra padrΓ΅es '$patterns'"
69-
70-
[ -z "$patterns" ] && echo "πŸ” DEBUG: Sem padrΓ΅es, permitindo arquivo" && return 0
64+
[ -z "$patterns" ] && return 0
7165

7266
for pattern in $patterns; do
73-
echo "πŸ” DEBUG: Testando padrΓ£o '$pattern'"
7467
if echo "$file" | grep -Eq "$pattern"; then
75-
echo "πŸ” DEBUG: MATCH com padrΓ£o '$pattern'"
7668
return 0
7769
fi
7870
done
7971

80-
echo "πŸ” DEBUG: Nenhum padrΓ£o corresponde"
8172
return 1
8273
}
8374

@@ -95,27 +86,20 @@ line_is_in_changed_range() {
9586
target_line="$1"
9687
file="$2"
9788

98-
echo "πŸ” DEBUG: Verificando se linha $target_line do arquivo $file esta alterada"
9989
generate_git_diff "$file" > "$FILE_DIFF"
100-
echo "πŸ” DEBUG: Diff gerado:"
101-
cat "$FILE_DIFF"
10290

10391
while read -r diff_line; do
10492
if echo "$diff_line" | grep -q "^@@"; then
105-
echo "πŸ” DEBUG: Processando linha diff: $diff_line"
10693
range_info=$(parse_diff_range "$diff_line")
10794
start=$(echo "$range_info" | cut -d' ' -f1)
10895
count=$(echo "$range_info" | cut -d' ' -f2)
109-
echo "πŸ” DEBUG: Range: start=$start count=$count, verificando linha $target_line"
11096

11197
if [ "$target_line" -ge "$start" ] && [ "$target_line" -lt "$((start + count))" ]; then
112-
echo "πŸ” DEBUG: MATCH! Linha $target_line esta no range $start-$((start + count - 1))"
11398
return 0
11499
fi
115100
fi
116101
done < "$FILE_DIFF"
117102

118-
echo "πŸ” DEBUG: Linha $target_line NAO esta em nenhum range alterado"
119103
return 1
120104
}
121105

@@ -137,19 +121,14 @@ check_blocking_rules() {
137121

138122
grep -E ':[0-9]+:' "$CODENARC_RESULT" | while IFS=: read -r file line rest; do
139123
[ -z "$file" ] && continue
140-
echo "πŸ” DEBUG: Analisando violacao $file:$line"
141124

142125
if ! file_matches_patterns "$file" "$allowed_patterns"; then
143-
echo "πŸ” DEBUG: Arquivo $file nao corresponde aos padroes"
144126
continue
145127
fi
146-
echo "πŸ” DEBUG: Arquivo $file corresponde aos padroes"
147128

148129
if line_is_in_changed_range "$line" "$file"; then
149130
echo "🚨 Violacao P1 em linha alterada: $file:$line"
150131
echo "1" > "$VIOLATIONS_FLAG"
151-
else
152-
echo "πŸ” DEBUG: Linha $line nao esta no range alterado"
153132
fi
154133
done
155134

0 commit comments

Comments
Β (0)