Skip to content

Commit 53cfbc6

Browse files
committed
🔨 add markdown link linter using pytest-check-links
1 parent 5076c99 commit 53cfbc6

6 files changed

Lines changed: 398 additions & 8 deletions

File tree

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ repos:
55
- id: check-added-large-files
66
- repo: local
77
hooks:
8+
- id: lint-links
9+
name: Lint markdown links
10+
entry: make lint_links
11+
language: system
12+
pass_filenames: false
13+
always_run: true
814
- id: make-fmt
915
name: Run formatter (make fmt)
1016
entry: make fmt

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ make fmt # Run ruff formatter + JSON formatting
2525
make ruff # Run ruff linter
2626
make vulture # Find dead code
2727
make ty # Run typer type checker
28-
make ci # Run all CI checks (ruff, vulture, ty)
28+
make lint_links # Check for broken links in markdown files (README, etc.)
29+
make ci # Run all CI checks (ruff, vulture, ty, lint_links)
2930

3031
# Dependencies
3132
uv sync # Install dependencies (not pip install)

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ docs_lint: ## Lint docs links
249249
@cd docs && bun run lint:links
250250
@echo "$(GREEN)✅Docs linting completed.$(RESET)"
251251

252+
lint_links: ## Lint all markdown links using pytest-check-links
253+
@echo "$(YELLOW)🔍Linting all markdown links with pytest-check-links...$(RESET)"
254+
@find . -name "*.md" -not -path "./.venv/*" -not -path "./node_modules/*" -not -path "./docs/node_modules/*" | xargs uv run pytest -p no:cov -o "addopts=" --check-links --check-links-ignore "http://localhost:.*"
255+
@echo "$(GREEN)✅Link linting completed.$(RESET)"
256+
252257
agents_validate: ## Validate AGENTS.md content
253258
@echo "$(YELLOW)🔍Validating AGENTS.md...$(RESET)"
254259
@$(PYTHON) scripts/validate_agents_md.py
@@ -259,7 +264,7 @@ check_deps: install_tools ## Check for unused dependencies
259264
@uv run deptry .
260265
@echo "$(GREEN)✅Dependency check completed.$(RESET)"
261266

262-
ci: ruff vulture import_lint ty docs_lint check_deps ## Run all CI checks (ruff, vulture, import_lint, ty, docs_lint)
267+
ci: ruff vulture import_lint ty docs_lint lint_links check_deps ## Run all CI checks (ruff, vulture, import_lint, ty, docs_lint, lint_links)
263268
@echo "$(GREEN)✅CI checks completed.$(RESET)"
264269

265270
########################################################

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Opinionated Python stack for fast development. The `saas` branch extends `main`
5151
| Referrals + Agent system |||
5252
| Ralph Wiggum Agent Loop |||
5353

54-
[Full comparison](docs/branch_comparison.md)
54+
[Full comparison](manual_docs/branch_comparison.md)
5555

5656
## Quick Start
5757

@@ -74,12 +74,12 @@ global_config.example_parent.example_child
7474
global_config.OPENAI_API_KEY
7575
```
7676

77-
[Full configuration docs](docs/configuration.md)
77+
[Full configuration docs](manual_docs/configuration.md)
7878

7979
## Credits
8080

8181
This software uses the following tools:
82-
- [Cursor: The AI Code Editor](cursor.com)
82+
- [Cursor: The AI Code Editor](https://cursor.com)
8383
- [uv](https://docs.astral.sh/uv/)
8484
- [prek: Rust-based pre-commit framework](https://github.com/j178/prek)
8585
- [DSPY: Pytorch for LLM Inference](https://dspy.ai/)

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,8 @@ omit = [
103103

104104
[tool.coverage.report]
105105
show_missing = true
106+
107+
[dependency-groups]
108+
dev = [
109+
"pytest-check-links>=0.9.1",
110+
]

0 commit comments

Comments
 (0)