Skip to content

Commit ffd6772

Browse files
committed
Makefile: add targets to format and check Markdown files
1 parent f8bcb5b commit ffd6772

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ check: ## Check code for compilation errors
2828
check-format: ## Check code formatting
2929
cargo +nightly fmt -- --check
3030

31+
.PHONY: check-md
32+
check-md: ## Check if markdown files are properly formatted
33+
@echo "Checking markdown formatting..."
34+
npx prettier --check "**/*.md"
35+
@echo "Markdown format check completed."
36+
3137
.PHONY: clean
3238
clean: ## Clean build artifacts
3339
cargo clean
@@ -36,6 +42,12 @@ clean: ## Clean build artifacts
3642
format: ## Format code using rustfmt
3743
cargo +nightly fmt
3844

45+
.PHONY: format-md
46+
format-md: ## Format all markdown files to wrap at 80 characters
47+
@echo "Formatting markdown files..."
48+
npx prettier --write "**/*.md"
49+
@echo "Markdown files have been formatted to 80 characters."
50+
3951
.PHONY: lint
4052
lint: ## Run linter (clippy)
4153
cargo clippy --all-targets -- -D warnings --allow clippy::mutable_key_type

0 commit comments

Comments
 (0)