rs-mock-server 0.5.6

A simple, file-based mock API server that maps your directory structure to HTTP routes. Ideal for local development and testing.
# Makefile for rs-mock-server

.PHONY: help test test-watch build run clean clippy fmt fmt-check setup-hooks install-hooks

# Default target
help:
	@echo "Available commands:"
	@echo "  test         - Run all tests"
	@echo "  test-watch   - Run tests in watch mode"
	@echo "  build        - Build the project"
	@echo "  run          - Run the application"
	@echo "  clean        - Clean build artifacts"
	@echo "  clippy       - Run Clippy linter"
	@echo "  fmt          - Format code"
	@echo "  fmt-check    - Check code formatting"
	@echo "  setup-hooks  - Install Git pre-commit hooks"
	@echo "  check-all    - Run all checks (tests, clippy, formatting)"

# Test commands
test:
	@echo "๐Ÿงช Running tests..."
	cargo test

test-watch:
	@echo "๐Ÿงช Running tests in watch mode..."
	cargo watch -x test

# Build commands
build:
	@echo "๐Ÿ”จ Building project..."
	cargo build

build-release:
	@echo "๐Ÿ”จ Building project in release mode..."
	cargo build --release

# Run commands
run:
	@echo "๐Ÿš€ Running application..."
	cargo run

# Maintenance commands
clean:
	@echo "๐Ÿงน Cleaning build artifacts..."
	cargo clean

# Code quality commands
clippy:
	@echo "๐Ÿ” Running Clippy..."
	cargo clippy --all-targets --all-features -- -D warnings

fmt:
	@echo "๐Ÿ“ Formatting code..."
	cargo fmt --all

fmt-check:
	@echo "๐Ÿ“ Checking code formatting..."
	cargo fmt --all -- --check

# Git hooks setup
setup-hooks:
	@echo "๐Ÿ”ง Setting up Git hooks..."
	./scripts/setup-git-hooks.sh

install-hooks: setup-hooks

# Run all checks (like pre-commit)
check-all: test clippy fmt-check
	@echo "โœ… All checks passed!"

# Development workflow
dev-setup: setup-hooks
	@echo "๐Ÿ› ๏ธ  Development environment setup complete!"
	@echo "๐Ÿ’ก Use 'make test-watch' for continuous testing during development"

# CI-like checks
ci: test clippy fmt-check
	@echo "๐Ÿค– CI checks completed!"