🐓 Escanea tu proyecto en busca de TODOs, FIXMEs y HACKs. Genera un árbol de tareas en Markdown y un dashboard HTML con estadísticas. Perfecto para desarrolladores que depuran bugs antes del café.
Project description
todo-tree
🐓 todo-tree es un generador de árbol de tareas pendientes que ayuda a los desarrolladores a encontrar TODOs, FIXMEs, HACKs y NOTEs escondidos en un proyecto.
¿Qué hace?
- Escanea tu proyecto recursivamente.
- Extrae comentarios especiales como
TODO,FIXME,HACKyNOTE. - Genera reportes en Markdown y un dashboard HTML.
- Ideal para equipos que quieren visualizar deuda técnica al despertar con una buena taza de café.
Instalación en modo desarrollo
pip install -e .
Uso rápido
todo-tree scan .
Ejemplo de configuración
Crea un archivo .todo-tree.toml en el raíz de tu proyecto:
[scan]
tags = ["TODO", "FIXME", "HACK", "NOTE"]
extensions = ["py", "js", "ts"]
ignore_dirs = [".git", "node_modules", "venv"]
recursive = true
[output]
format = "both"
sort_by = "priority"
output_dir = "./docs"
[custom_tags]
OPTIMIZE = "media"
DOCS = "baja"
Este archivo controla el escaneo y la generación de reportes en cada proyecto.
Hooks de Git y CI
Instala un hook de Git con:
todo-tree hook install .
Para instalar un hook pre-push que bloquee si hay FIXME:
todo-tree hook install . --pre-push --block-on-fixme
El hook crea un log JSON en:
.git/hooks/todo-tree-ci.json
Esto permite inspeccionar el resultado del chequeo CI incluso cuando falla.
El hook usa ci-check --json para evaluar si el repositorio puede continuar.
GitHub Actions
El workflow de ejemplo en .github/workflows/example.yml ejecuta:
todo-tree ci-check --max-fixmes 0 --json
Si ci-check falla, el job también falla y el pipeline detiene la ejecución.
Comando CI
todo-tree ci-check . --max-fixmes 0 --max-hacks 0 --json
Esta salida JSON incluye conteos globales y detalles por archivo, como priority y weight por tarea.
Cuando se usa desde un hook, el resultado se escribe en:
.git/hooks/todo-tree-ci.json
Esto facilita la depuración posterior al fallo.
Ejemplo de salida JSON:
{
"todos": 3,
"fixmes": 1,
"hacks": 2,
"failed": true,
"reasons": ["fixmes>0"],
"files": {
"src/app.py": {
"todos": 1,
"fixmes": 1,
"hacks": 0,
"tasks": [
{
"tag": "FIXME",
"message": "arreglar esto",
"line": 42,
"priority": "Crítica",
"weight": 1
}
]
}
}
}
python -c "from todo_tree.models import Task, ScanResult; t = Task('TODO', 'test', 'file.py', 1); print(t)"
Estructura del proyecto
todo-tree/
├── src/
│ └── todo_tree/
│ ├── __init__.py
│ ├── models.py
│ ├── generators/
│ │ ├── __init__.py
│ └── templates/
│ └── dashboard.html
├── tests/
│ └── __init__.py
├── pyproject.toml
├── README.md
├── LICENSE
└── .gitignore
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file todo_tree_cli-0.1.0.tar.gz.
File metadata
- Download URL: todo_tree_cli-0.1.0.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad6801848d6fb77fe7e4e422b89fed5df463ceef07da6e59c16d8ee1adc58099
|
|
| MD5 |
afcdf949fd2cae49c32dc382ab52fc8d
|
|
| BLAKE2b-256 |
249d86735283a7b8f30aa18b08610c250f6ca58ccc821a0dcac77fb28d1747f4
|
File details
Details for the file todo_tree_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: todo_tree_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f03e1e4a03e5a7259c1ae97107cf0edce11b4f8f94cbf214845fbabc10a0a3a0
|
|
| MD5 |
e5d9045ad726b4dfd61b9d8116c78c0c
|
|
| BLAKE2b-256 |
ed15587c74854d5d93d2b8eefc5dd0e95ea90d46357e5edc2d3ae1c815015c2b
|