Skip to content

Commit f4c419a

Browse files
committed
Makefile: add targets to format and check Markdown files
1 parent 5704c20 commit f4c419a

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
@@ -32,6 +32,12 @@ check-tx-fuzzing: ## Check the transaction fuzzing tools, requires nightly Rust
3232
check-format: ## Check code formatting
3333
cargo +nightly fmt -- --check
3434

35+
.PHONY: check-md
36+
check-md: ## Check if markdown files are properly formatted
37+
@echo "Checking markdown formatting..."
38+
npx prettier --check "**/*.md"
39+
@echo "Markdown format check completed."
40+
3541
.PHONY: clean
3642
clean: ## Clean build artifacts
3743
cargo clean
@@ -40,6 +46,12 @@ clean: ## Clean build artifacts
4046
format: ## Format code using rustfmt
4147
cargo +nightly fmt
4248

49+
.PHONY: format-md
50+
format-md: ## Format all markdown files to wrap at 80 characters
51+
@echo "Formatting markdown files..."
52+
npx prettier --write "**/*.md"
53+
@echo "Markdown files have been formatted to 80 characters."
54+
4355
.PHONY: lint
4456
lint: ## Run linter (clippy)
4557
cargo clippy --all-targets -- -D warnings --allow clippy::mutable_key_type

0 commit comments

Comments
 (0)