Skip to content

Conversation

@anaalves-asaas
Copy link
Contributor

Impacto

Corrige bug que bloqueava PRs incorretamente com violacoes P1 em codigo legado nao modificado.

Causa raiz (2 bugs combinados):

  1. Substring matching no grep: grep -F "arquivo:22" dava match em arquivo:220, arquivo:224, arquivo:225
  2. AWK gerando ranges completos: Gerava linhas 20-32 para todo o hunk ao inves de apenas linhas com prefixo +

Solucao:

  • grep -Fgrep -xF: Match exato de linha inteira (previne :22 dar match em :220)
  • AWK: Detecta apenas linhas com + (codigo realmente adicionado)

Problema:

image image

Cenarios testados

Cenario 1: PR com P1 em codigo legado (linhas nao modificadas) image image

https://github.com/asaasdev/asaas/pull/56138

https://github.com/asaasdev/asaas/actions/runs/21439419412/job/61782060843?pr=56138

Cenario 2: PR com P1 em linha realmente modificada image image

https://github.com/asaasdev/asaas/pull/56169

https://github.com/asaasdev/asaas/actions/runs/21454044692/job/61790054958?pr=56169

@github-actions
Copy link
Contributor

🏷️ [bumpr]
Next version:2.10.0
Changes:2.9.0...asaasdev:corrige-falso-positivo-p1-grep-substring

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

$includes_arg >/dev/null 2>&1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

${INPUT_REVIEWDOG_FLAGS} >/dev/null || true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

${INPUT_REVIEWDOG_FLAGS} >/dev/null || true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

${INPUT_REVIEWDOG_FLAGS} >/dev/null || true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck (suggestion)] reported by reviewdog 🐶

$includes_arg >/dev/null 2>&1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck (suggestion)] reported by reviewdog 🐶

${INPUT_REVIEWDOG_FLAGS} >/dev/null || true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck (suggestion)] reported by reviewdog 🐶

${INPUT_REVIEWDOG_FLAGS} >/dev/null || true

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck (suggestion)] reported by reviewdog 🐶

${INPUT_REVIEWDOG_FLAGS} >/dev/null || true

@felipeeffting felipeeffting merged commit c32dd1d into main Jan 29, 2026
19 checks passed
@felipeeffting felipeeffting deleted the corrige-falso-positivo-p1-grep-substring branch January 29, 2026 09:36
@github-actions
Copy link
Contributor

🚀 [bumpr] Bumped!
New version:2.10.0
Changes:2.9.0...2.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants