scan-scripts.py: ruff failures yield zero findings, every ruff rule is 'high', and the workflow-builder copy flags itself
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start by reading skills/bmad-*/scripts/scan-scripts.py, especially lint_python_ruff(), and compare the workflow-builder and agent-builder copies. Then inspect test_canon_sync.py and run the reproduction steps from the issue to confirm the current lint behavior. Done means ruff setup failures produce a finding, rule severities are calibrated with a fixed ruleset, the workflow-builder copy no longer flags itself, and a test prevents the copies from drifting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
skills/bmad-*-builder/scripts/scan-scripts.py lint_python_ruff() has three problems.
- Silent pass when ruff itself fails. Only rc
-1(not found) and-2(timeout) are handled. When ruff exits 2 (e.g. an invalid[tool.ruff]in the target project), stdout is empty, so the scanner records zero lint findings. The same file reports 7 issues once the config is fixed, includingF821 Undefined name. - No severity calibration, unpinned ruleset. Every ruff hit is
high, soI001import order ranks the same asF821. Ruff runs without--isolated/--select, so it uses whatever config is nearest the target, and results differ between machines. - Drift between copies. The workflow-builder copy flags itself:
scripts/scan-scripts.py: References requirements.txt or pip install — use PEP 723 inline deps(high). The agent-builder copy already uses string concatenation to avoid self-detection, but the fix was never synced back. Related to #115.
Steps to reproduce
mkdir -p sk/scripts && cd sk
printf -- '---\nname: sk\ndescription: x\n---\n' > SKILL.md
printf 'import os, sys\ndef f():\n try:\n x = undefined_name\n except:\n pass\n' > scripts/bad.py
printf '[tool.ruff]\nline-length = "not-a-number"\n' > pyproject.toml
python3 <bmb>/skills/bmad-workflow-builder/scripts/scan-scripts.py . # no lint findings at all
rm pyproject.toml
python3 <bmb>/skills/bmad-workflow-builder/scripts/scan-scripts.py . # 7 findings, all "high"
python3 <bmb>/skills/bmad-workflow-builder/scripts/scan-scripts.py <bmb>/skills/bmad-workflow-builder # self-flag
Expected behavior
- Treat any rc other than 0/1, or unparseable output, as a
lint-setupfinding that names the stderr. - Run
ruff check --isolated --select <documented set>so results are reproducible. - Map rule families to severities, e.g.
F8xx/E9xx/Bhigh andI/E5xx/style low. - Extend
test_canon_sync.py(or add a sibling test) so the two scanner copies can't drift.
Environment
- Model(s) used: n/a (deterministic script)
- Agentic IDE used: n/a (scripts run directly)
- BMad version: bmad-builder
main@d4a921c(v2.2.2 + #118) - Project language: Python 3.13, Linux
- Lingua principale
- Python
- Stelle
- 220
- Fork
- 54
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di bmad-code-org/bmad-builder
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bmad-code-org/bmad-builder#157 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bmad-code-org/bmad-builder#153 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
bmad-code-org/bmad-builder#151 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
bmad-code-org/bmad-builder#127 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
bmad-code-org/bmad-builder#123 ·
Tutte le issue di bmad-code-org/bmad-builder
Issue simili
-
namespace
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
EclipseFdn/open-vsx.org#15604 ·
I maintainer di solito rispondono entro 1 giorno
-
app: scripts severity: low status: backlog type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
netbox-community/netbox-scripts#164 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 5 giorni
-
Public function to read participants.tsvForse già presa @bruAristimunha l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
huggingface/tau#799 ·
I maintainer di solito rispondono entro 2 giorni