Files
CleanMM/CONTRIBUTING.md

53 lines
734 B
Markdown
Raw Normal View History

2025-10-12 20:49:10 +08:00
# Contributing to Mole
## Setup
```bash
2025-10-13 10:20:46 +08:00
# Install development tools
2025-10-12 20:49:10 +08:00
brew install shfmt shellcheck bats-core
```
## Development
2025-10-13 10:20:46 +08:00
Run all quality checks before committing:
2025-10-12 20:49:10 +08:00
2025-10-13 10:20:46 +08:00
```bash
./scripts/check.sh
2025-10-12 20:49:10 +08:00
```
2025-10-13 10:20:46 +08:00
This command runs:
2025-10-12 20:49:10 +08:00
2025-10-13 10:20:46 +08:00
- Code formatting check
- ShellCheck linting
- Unit tests
Individual commands:
2025-10-12 21:43:37 +08:00
2025-10-12 20:49:10 +08:00
```bash
2025-10-13 10:20:46 +08:00
# Format code
./scripts/format.sh
2025-10-12 20:49:10 +08:00
2025-10-13 10:20:46 +08:00
# Run tests only
./tests/run.sh
```
2025-10-12 20:49:10 +08:00
## Code Style
- Bash 3.2+ compatible
- 4 spaces indent
- Use `set -euo pipefail`
- Quote all variables
- BSD commands not GNU
Config: `.editorconfig` and `.shellcheckrc`
## Pull Requests
1. Fork and create branch
2. Make changes
2025-10-13 10:20:46 +08:00
3. Run checks: `./scripts/check.sh`
4. Commit and push
5. Open PR
2025-10-12 20:49:10 +08:00
2025-10-13 10:20:46 +08:00
CI will verify formatting, linting, and tests.