From 1c41881fa25193136161b60307140965549587d7 Mon Sep 17 00:00:00 2001 From: Aditi Rawat Date: Fri, 15 May 2026 21:34:46 +0530 Subject: [PATCH] feat(docs): add make troubleshoot target --- CONTRIBUTING.md | 1 + Makefile | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2783640..9558865 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -183,6 +183,7 @@ make ci # Run lint (mirrors ci.yml) make lint # Ruff lint + format check make ansible-lint # Ansible syntax-check + ansible-lint make terraform-validate # Terraform fmt, validate, tflint +make troubleshoot # Print numbered troubleshooting index ``` Run `make ci` before pushing to catch issues before they hit CI. diff --git a/Makefile b/Makefile index ec1e1f3..29544f5 100644 --- a/Makefile +++ b/Makefile @@ -71,3 +71,10 @@ hooks: ## Install pre-commit hooks into your local repo help: ## Show this help @grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | \ awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-22s\033[0m %s\n", $$1, $$2}' + +# ── Docs ─────────────────────────────────────────────────────── +.PHONY: troubleshoot +troubleshoot: ## Show numbered index of troubleshooting sections + @echo "The Troubleshooting Guide" + @echo "" + @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 \ No newline at end of file