fix: parse reporters utPLSQL 3.2.x + Windows cmd.exe bypass (PRDs-35,36) - #47
Merged
Conversation
- parseReportersOutput: regex ^([A-Za-z0-9_]+) sem .trim() para ignorar descrições indentadas do formato utPLSQL 3.2.x (PRD-36) - coverageEnabled flag previne mensagem falsa 'GRANT EXECUTE' quando reporter de cobertura não está disponível - Windows launcher: usa cmd.exe diretamente com shell:false, bypassing o wrap duplo de quoting do Node.js (PRD-35) - Log [debug] CLI com args sem connection string - +9 testes unitários (quoteArg, parseReportersOutput, applyCoverage) - CHANGELOG, .vscodeignore atualizados - Versão 0.7.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descrição
Corrige duas causas de falha silenciosa na cobertura de código:
parseReportersOutputusava.trim()que removia a indentação das descrições, fazendo linhas comoGenerates a Cobertura...serem capturadas como falsos reporters. A regex^([A-Za-z0-9_]+)sem.trim()ancora no início real da linha, ignorando corretamente linhas indentadas.launcher, o Node.js adiciona"..."ao redor do comando já quotado peloquoteArg, e ocmd.exe /Spode não reconstituir corretamente com múltiplas aspas internas. Agora usamoscmd.exediretamente comshell: false.coverageEnabled: evita queapplyCoverageseja chamado quando o reporter não está disponível, prevenindo a mensagem falsa deGRANT EXECUTE ON SYS.DBMS_PROFILER.Tipo de mudança
Como foi testado?
Passos realizados:
npm test→ 138/138 unitáriosnpm run test:integration→ 18/18 (launcher + java, cobertura funcional)npm run package→ .vsix gerado (457 KB)utplsql reportersmostrava reporter com:, extensão não reconhecia → corrigidoChecklist
npm run compileexecuta sem errosnpm testpassa localmenteF5)README.md(tabela de Configuração/Comandos), se necessárioCHANGELOG.mdpackage.json, mantive as descrições em português, no padrão do projetolauncher/java), revisei possíveis impactos de escaping/injeçãoNotas adicionais
O bug era silencioso porque a extensão mostrava a mensagem enganosa sobre
GRANT EXECUTE ON SYS.DBMS_PROFILER(herdada de versões antigas), quando na verdade o problema era o parse do output doutplsql reporters. O novo formato com descrições indentadas foi introduzido no CLI 3.2.x e não era exercitado pelos testes de integração (que usam CLI 3.2.0.local com formato antigo).