@@ -62,39 +62,127 @@ cd submod
6262git remote add upstream https://github.com/originaluser/submod.git
6363```
6464
65- ### 2. Install Dependencies
65+ ### 2. Install Mise and Dependencies
6666
6767``` bash
68- # Using Mise (recommended for consistent environment)
68+ # Install mise (if you haven't already)
69+ curl https://mise.run | sh
70+
71+ # Install all development tools and dependencies
6972mise install
7073
71- # Or install Rust manually
72- curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
74+ # This automatically installs:
75+ # - Rust 1.87+
76+ # - hk (git hooks)
77+ # - cargo tools (nextest, audit, deny, watch)
78+ # - prettier, typos, and other linters
7379```
7480
7581### 3. Verify Setup
7682
7783``` bash
7884# Build the project
79- cargo build
85+ mise run build
8086
8187# Run tests to ensure everything works
82- cargo test
88+ mise run test
8389
84- # Run the comprehensive test suite
85- ./scripts/run-tests.sh
90+ # Run the full CI suite
91+ mise run ci
92+
93+ # Verify git hooks are installed
94+ hk --version
95+ ```
96+
97+ ### 4. Development Workflow
98+
99+ With mise and hk installed, you have access to streamlined development commands:
100+
101+ ``` bash
102+ # Development tasks
103+ mise run build # Build the project
104+ mise run test # Run tests
105+ mise run lint # Run clippy
106+ mise run ci # Full CI pipeline
107+
108+ # Git hooks (run automatically on commit)
109+ hk pre-commit # Run pre-commit checks manually
110+ hk fix # Auto-fix issues where possible
111+ hk check # Run all linters
86112```
87113
88- ### 4. Install Development Tools
114+ ### 5. Manual Setup (Alternative)
115+
116+ If you prefer not to use mise:
89117
90118``` bash
91- # Install useful development tools
119+ # Install Rust manually
120+ curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
121+
122+ # Install development tools manually
92123cargo install cargo-watch # Watch for changes
93124cargo install cargo-audit # Security auditing
94125cargo install cargo-deny # Dependency checking
95126cargo install cargo-nextest # Better test runner
127+
128+ # Build and test
129+ cargo build
130+ cargo test
131+ ./scripts/run-tests.sh
132+ ```
133+
134+ ## 🔧 Development Tools Overview
135+
136+ This project uses modern development tools to streamline the contribution process:
137+
138+ ### Mise - Task Runner & Tool Manager
139+
140+ [ Mise] ( https://mise.jdx.dev/ ) manages our development environment and provides consistent task execution:
141+
142+ ``` bash
143+ # Available tasks
144+ mise run build # Build the project (alias: mise run b)
145+ mise run test # Run the test suite
146+ mise run lint # Run clippy linting
147+ mise run ci # Full CI pipeline (build + lint + test)
148+ mise run clean # Clean build artifacts
149+ mise run release # Cut a new release (maintainers only)
150+ ```
151+
152+ ### hk - Git Hooks Manager
153+
154+ [ hk] ( https://github.com/jdx/hk ) provides automated git hooks for code quality:
155+
156+ ``` bash
157+ # Hook commands
158+ hk pre-commit # Run pre-commit checks
159+ hk pre-push # Run pre-push checks
160+ hk check # Run all linters
161+ hk fix # Auto-fix issues where possible
162+ hk test # Run tests only
163+ hk ci # Run CI checks
96164```
97165
166+ ### Automated Quality Checks
167+
168+ The pre-commit hooks automatically run these tools on every commit:
169+
170+ - ** cargo fmt** - Formats Rust code
171+ - ** cargo clippy** - Lints Rust code for common issues
172+ - ** cargo test** - Runs the test suite (with nextest for parallel execution)
173+ - ** typos** - Checks for spelling errors in code and documentation
174+ - ** prettier** - Formats TOML, YAML, and other configuration files
175+ - ** cargo deny** - Audits dependencies for security vulnerabilities and license compliance
176+ - ** pkl** - Validates pkl configuration files
177+
178+ ### Tool Integration
179+
180+ Both tools work together seamlessly:
181+ - ** mise** handles tool installation and version management
182+ - ** hk** uses the tools installed by mise for git hooks
183+ - Both can run the same underlying commands (e.g., ` mise run test ` and ` hk test ` )
184+ - CI uses the same tools for consistency between local and remote environments
185+
98186## 🔄 Making Changes
99187
100188### 1. Create a Branch
@@ -168,17 +256,22 @@ My philosophy on testing is to "test what matters." Tests focus on integration a
168256# ## Running All Tests
169257
170258` ` ` bash
171- # Quick test run
172- cargo test
173-
174- # Comprehensive test suite with reporting
175- ./scripts/run-tests.sh --verbose
176-
177- # Include performance tests
178- ./scripts/run-tests.sh --performance
179-
180- # Filter specific tests
181- ./scripts/run-tests.sh --filter sparse_checkout
259+ # Using mise (recommended)
260+ mise run test # Quick test run
261+ mise run ci # Full CI suite (build + lint + test)
262+
263+ # Using hk
264+ hk test # Run tests only
265+ hk ci # Run CI checks
266+ hk check # Run all linters and checks
267+
268+ # Using cargo directly
269+ cargo test # Quick test run
270+
271+ # Using the test script
272+ ./scripts/run-tests.sh --verbose # Comprehensive test suite with reporting
273+ ./scripts/run-tests.sh --performance # Include performance tests
274+ ./scripts/run-tests.sh --filter sparse_checkout # Filter specific tests
182275` ` `
183276
184277# ## Writing Tests
@@ -235,13 +328,19 @@ fn test_submod_init_command() {
235328Before submitting your PR, ensure:
236329
237330- [ ] ** Code compiles** without warnings
238- - [ ] ** All tests pass** (` ./scripts/run-tests.sh` )
239- - [ ] ** Code is formatted** (` cargo fmt` )
240- - [ ] ** Lints pass** (` cargo clippy` )
331+ - [ ] ** All tests pass** (` mise run ci` or ` hk ci` )
332+ - [ ] ** Pre-commit hooks pass** (automatically run on commit, or manually with ` hk pre-commit` )
241333- [ ] ** Documentation is updated** if needed
242334- [ ] ** CHANGELOG is updated** for user-facing changes
243335- [ ] ** Commit messages follow conventions**
244336
337+ ** Note** : If you' re using the recommended mise/hk setup, many checks are automated:
338+ - **Code formatting** (`cargo fmt`) - Auto-fixed by pre-commit hooks
339+ - **Linting** (`cargo clippy`) - Checked by pre-commit hooks
340+ - **Spell checking** (`typos`) - Checked and auto-fixed by pre-commit hooks
341+ - **TOML/YAML formatting** (`prettier`) - Auto-fixed by pre-commit hooks
342+ - **Security auditing** (`cargo deny`) - Checked by pre-commit hooks
343+
245344### 2. Submitting the PR
246345
247346```bash
0 commit comments