Skip to content

Commit 3ac78ae

Browse files
committed
Makefile: add targets to format and check Markdown files
1 parent 48705ae commit 3ac78ae

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
@@ -24,6 +24,12 @@ build-wasm: ## Build WebAssembly node
2424
check: ## Check code for compilation errors
2525
cargo check --all-targets
2626

27+
.PHONY: check-md
28+
check-md: ## Check if markdown files are properly formatted
29+
@echo "Checking markdown formatting..."
30+
npx prettier --check "**/*.md"
31+
@echo "Markdown format check completed."
32+
2733
.PHONY: clean
2834
clean: ## Clean build artifacts
2935
cargo clean
@@ -32,6 +38,12 @@ clean: ## Clean build artifacts
3238
fmt: ## Format code using rustfmt
3339
cargo fmt --all
3440

41+
.PHONY: format-md
42+
format-md: ## Format all markdown files to wrap at 80 characters
43+
@echo "Formatting markdown files..."
44+
npx prettier --write "**/*.md"
45+
@echo "Markdown files have been formatted to 80 characters."
46+
3547
.PHONY: lint
3648
lint: ## Run linter (clippy)
3749
cargo clippy --all-targets -- -D warnings --allow clippy::mutable_key_type

0 commit comments

Comments
 (0)