mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
build: add reflow-md tool + CI guard against hard-wrapped doc prose
scripts/reflow_md.py joins hard-wrapped markdown prose to one line per paragraph, leaving code fences, tables, headings, blockquotes, and front matter byte-identical, and refusing to touch any file whose non-whitespace token sequence would change (so it can only ever edit whitespace). Add `make reflow-docs` (apply) and `make reflow-check` (fail if any in-scope doc is hard-wrapped), and wire reflow-check into `make quality` so CI keeps the manual ~75-char line breaks from creeping back in.
This commit is contained in:
@@ -167,6 +167,16 @@ fix:
|
||||
@uv run ruff check --fix .
|
||||
@find . | grep -E "(__pycache__|\.pyc|\.pyo|\.pytest_cache|\.ruff_cache|\.mypy_cache)" | xargs rm -rf
|
||||
|
||||
# Reflow hard-wrapped markdown prose to one line per paragraph (docs style).
|
||||
.PHONY: reflow-docs
|
||||
reflow-docs:
|
||||
uv run python scripts/reflow_md.py --apply
|
||||
|
||||
# CI guard: fail if any in-scope doc has hard-wrapped prose. Wired into `quality`.
|
||||
.PHONY: reflow-check
|
||||
reflow-check:
|
||||
uv run python scripts/reflow_md.py --check
|
||||
|
||||
# Find dead code with Vulture
|
||||
.PHONY: vulture
|
||||
vulture:
|
||||
@@ -240,6 +250,8 @@ quality:
|
||||
@uv run ruff format --check .
|
||||
@echo "==> ruff check"
|
||||
@uv run ruff check .
|
||||
@echo "==> markdown prose (no hard-wrapping)"
|
||||
@uv run python scripts/reflow_md.py --check
|
||||
@echo "==> mypy"
|
||||
@uv run mypy roboco/ tests/
|
||||
@echo "==> pytest with coverage"
|
||||
|
||||
Reference in New Issue
Block a user