Skip to content

Commit 6fc6594

Browse files
ajuste analise do diff
1 parent 9417d07 commit 6fc6594

1 file changed

Lines changed: 10 additions & 13 deletions

File tree

entrypoint.sh

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ check_blocking_rules() {
196196
cat "$CHANGED_FILES_CACHE" 2>/dev/null || echo "(cache vazio)"
197197
echo ""
198198

199-
blocking_found=0
200-
echo "$p1_violations" | while IFS=: read -r file line rest; do
199+
while IFS=: read -r file line rest; do
201200
[ -z "$file" ] && continue
202201
file_matches_filter "$file" || continue
203202

@@ -206,23 +205,21 @@ check_blocking_rules() {
206205
if [ -z "$line" ]; then
207206
if is_changed "$file" ""; then
208207
echo "$file (file-level): $rest"
209-
blocking_found=1
210-
break
208+
echo ""
209+
echo "💡 Corrija as violações ou use o bypass autorizado."
210+
exit 1
211211
fi
212212
else
213213
if is_changed "$file" "$line"; then
214214
echo "$file:$line: $rest"
215-
blocking_found=1
216-
break
215+
echo ""
216+
echo "💡 Corrija as violações ou use o bypass autorizado."
217+
exit 1
217218
fi
218219
fi
219-
done
220-
221-
if [ "$blocking_found" -eq 1 ]; then
222-
echo ""
223-
echo "💡 Corrija as violações ou use o bypass autorizado."
224-
exit 1
225-
fi
220+
done <<EOF
221+
$p1_violations
222+
EOF
226223

227224
echo "✅ P1s existem mas fora das linhas alteradas → merge permitido"
228225
}

0 commit comments

Comments
 (0)