Contribution Guidelines¶
First and foremost: Thank you for showing interest in contributing to Fortress Rollback (a fork of GGRS)! Make sure to read the Code of Conduct. If you have a cool example or showcase of Fortress Rollback in use, let me know so your project can be highlighted!
Create an issue¶
Visit GitHub Issues to:
- Report a bug
- Request a feature
Contribute to Fortress Rollback¶
Please send a GitHub Pull Request with a clear list of what you've done
(read more about pull requests). When you send a pull request,
it would be great if you wrote unit- or integration tests for your changes. Please format your code via cargo fmt and
make sure all of your commits are atomic (one feature per commit).
Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
git commit -m "prefix: brief summary of the commit
A paragraph describing what changed and its impact."
With the following prefixes commonly used:
feat: for new featuresfix: for fixing a bugdoc: for adding/changing documentationtest: for adding/changing testschore: for any minor code cleanups
More about the GitHub flow. More about the Conventional Commits Specification
Pre-commit Hooks¶
This project uses pre-commit to ensure code quality before commits.
Setup¶
# Install pre-commit (requires Python)
pip install pre-commit
# Install the git hooks
pre-commit install
What's Checked¶
The pre-commit hooks validate:
- Code formatting:
cargo fmtfor Rust files - Linting:
cargo clippyfor Rust code quality - Markdown formatting:
markdownlintfor consistent documentation - Link validation: Local file references and markdown links
- Rustdoc links: Intra-doc link resolution
- General hygiene: Trailing whitespace, YAML/TOML syntax, merge conflicts
Running Manually¶
# Run all hooks on all files
pre-commit run --all-files
# Run a specific hook
pre-commit run markdownlint --all-files
pre-commit run check-links --all-files
# Run the link checker script directly
./scripts/check-links.sh --verbose
# Verify markdown code samples compile
./scripts/verify-markdown-code.sh
# With verbose output for debugging
./scripts/verify-markdown-code.sh --verbose
# Check a specific file
./scripts/verify-markdown-code.sh docs/user-guide.md
# Check for invalid rustdoc-style code fence attributes in markdown
./scripts/check-code-fence-syntax.sh
# Check a specific directory
./scripts/check-code-fence-syntax.sh docs/
Bypassing Hooks (Emergencies Only)¶
Note: CI will still run these checks on pull requests