Skip to content

Commit 6089d4e

Browse files
authored
feat(docs): add make troubleshoot target (#42)
1 parent 3714aba commit 6089d4e

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ make ci # Run lint (mirrors ci.yml)
183183
make lint # Ruff lint + format check
184184
make ansible-lint # Ansible syntax-check + ansible-lint
185185
make terraform-validate # Terraform fmt, validate, tflint
186+
make troubleshoot # Print numbered troubleshooting index
186187
```
187188

188189
Run `make ci` before pushing to catch issues before they hit CI.

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,10 @@ hooks: ## Install pre-commit hooks into your local repo
7171
help: ## Show this help
7272
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | \
7373
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-22s\033[0m %s\n", $$1, $$2}'
74+
75+
# ── Docs ───────────────────────────────────────────────────────
76+
.PHONY: troubleshoot
77+
troubleshoot: ## Show numbered index of troubleshooting sections
78+
@echo "The Troubleshooting Guide"
79+
@echo ""
80+
@awk '/^## / { if (heading) printf "%2d. %s\n Tip: %s\n\n", ++count, heading, tip; heading=substr($$0,4); tip="" } /^### / && heading && !tip { tip=substr($$0,5) } END { if (heading) printf "%2d. %s\n Tip: %s\n\n", ++count, heading, tip }' docs/troubleshooting.md

0 commit comments

Comments
 (0)