Skip to content

Latest commit

 

History

History
242 lines (169 loc) · 6.46 KB

File metadata and controls

242 lines (169 loc) · 6.46 KB

Contributing to Blit-Tech

Thank you for your interest in contributing to the Blit-Tech project.

Developer Certificate of Origin (DCO)

This project uses the Developer Certificate of Origin (DCO) to ensure that contributors have the legal right to submit their contributions. By contributing to this project, you certify that:

  1. The contribution was created in whole or in part by you and you have the right to submit it under the project's license.
  2. The contribution is based upon previous work that is covered under an appropriate license and you have the right to submit that work with modifications.
  3. The contribution was provided directly to you by some other person who certified (1) or (2) and you have not modified it.

How to Sign Off Your Commits

All commits must include a Signed-off-by line at the end of the commit message. This line certifies that you agree to the DCO.

Using the -s flag

The easiest way to sign off your commits is to use the -s or --signoff flag:

git commit -s -m "feat(renderer): add circle primitive drawing"

This will automatically add the following line to your commit message:

Signed-off-by: Your Name <your.email@example.com>

Amending an Existing Commit

If you forgot to sign off a commit, you can amend it:

git commit --amend --signoff

Then force push (with lease for safety):

git push --force-with-lease

Signing Off Multiple Commits

To sign off all commits in a branch:

git rebase --signoff origin/main
git push --force-with-lease

Automated DCO Check

All pull requests are automatically checked for DCO compliance via GitHub Actions. If any commit is missing the sign-off, the check will fail and you'll need to add it before the PR can be merged.

Commit Message Format

This project follows the Conventional Commits specification. All commit messages must be formatted as:

<type>(<scope>): <description>

[optional body]

[optional footer(s)]

Signed-off-by: Your Name <your.email@example.com>

Commit Types

  • feat - New feature
  • fix - Bug fix
  • docs - Documentation only
  • style - Formatting, no code change
  • refactor - Code change that neither fixes a bug nor adds a feature
  • perf - Performance improvement
  • test - Adding or updating tests
  • build - Build system or dependencies
  • ci - CI configuration
  • chore - Other changes

Suggested Scopes

  • renderer - Rendering system
  • camera - Camera system
  • assets - Asset loading
  • api - Public API (BT namespace)
  • utils - Utility classes
  • examples - Example projects
  • ci - CI/CD configuration
  • docs - Documentation

Example Commits

feat(renderer): add circle primitive drawing

Signed-off-by: John Doe <john@example.com>
fix(assets): handle missing texture gracefully

The asset loader now provides a fallback when texture loading fails.

Signed-off-by: Jane Smith <jane@example.com>
docs: update API reference section

Signed-off-by: John Doe <john@example.com>

Code Style

All code must follow the project's style guidelines:

  • No emoji anywhere in code, comments, or documentation
  • TypeScript strict mode - All code must pass strict TypeScript checks
  • Formatting - Code is automatically formatted by Biome and Prettier
  • Linting - Code must pass all linting checks
  • JSDoc - Required for public APIs

Pre-commit Checks

Before committing, run the preflight checks:

pnpm preflight

This runs:

  • Code formatting checks
  • Linting
  • TypeScript type checks
  • Spell checking

Available Commands

pnpm build            # Build for production
pnpm lint             # Lint code
pnpm lint:fix         # Fix linting issues
pnpm format           # Format code
pnpm format:check     # Check formatting
pnpm typecheck        # Run TypeScript checks
pnpm spellcheck       # Check spelling
pnpm preflight        # Run all quality checks
pnpm sync-rules       # Sync AI rules to editor configs

Pull Request Process

  1. Fork the repository
  2. Create a feature branch from main
  3. Make your changes
  4. Ensure all commits are signed off (DCO)
  5. Follow the commit message format
  6. Run pnpm preflight to ensure code quality
  7. Push to your fork
  8. Open a pull request against main

All pull requests will be reviewed by maintainers. The DCO check and other CI checks must pass before a PR can be merged.

AI-Assisted Contributions

If you use AI tools (like GitHub Copilot, ChatGPT, or Claude) to help write code, please include the AI trailer in your commit message:

feat(renderer): add sprite batching optimization

Signed-off-by: Your Name <your.email@example.com>
Co-Authored-By: Claude <noreply@anthropic.com>

Or for GitHub Copilot:

Co-Authored-By: GitHub Copilot <noreply@github.com>

License

By contributing to this project, you agree that your contributions will be licensed under the same license as the project.

Questions?

If you have questions about the DCO or contributing process, please open an issue on GitHub.

Full Developer Certificate of Origin Text

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.