Skip to content

Fortress Rollback

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:

Bash
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 features
  • fix: for fixing a bug
  • doc: for adding/changing documentation
  • test: for adding/changing tests
  • chore: 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

Bash
# 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 fmt for Rust files
  • Linting: cargo clippy for Rust code quality
  • Markdown formatting: markdownlint for 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

Bash
# 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)

Bash
git commit --no-verify -m "emergency fix"

Note: CI will still run these checks on pull requests