Skip to content

Instantly share code, notes, and snippets.

@bwplotka
Last active September 9, 2025 06:26
Show Gist options
  • Save bwplotka/5c668dd4e0926e2045de869fb15ca6ce to your computer and use it in GitHub Desktop.
Save bwplotka/5c668dd4e0926e2045de869fb15ca6ce to your computer and use it in GitHub Desktop.
quizes_total{} 1: Why "make check" will never detect any formatting errors?
.DEFAULT_GOAL := fmt
MD_FILES_TO_FORMAT=$(shell find . -name "*.md")
.PHONY: fmt
fmt: ## Format docs.
fmt:
@echo "Formatting markdown files..."
# <command that correctly formats $(MD_FILES_TO_FORMAT) files>
.PHONY: check
check: ## Checks if doc is formatter and links are correct (don't check external links).
check:
@echo "Checking markdown files. If changes are detected, try running `make` and trying again."
# <command that exit 1 if $(MD_FILES_TO_FORMAT) files are not formatted>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment