Thank you for your interest in contributing to Code in Motion (cim).
This document provides guidelines for contributing to the project.
This project uses the Developer Certificate of Origin (DCO) to ensure
that contributors have the right to submit their contributions. By
contributing to this project, you agree to the DCO as described in the
DCO file in the repository root.
All commits must be signed off using git commit -s. This adds a
Signed-off-by trailer to the commit message, certifying that you
wrote the code or have the right to submit it under the project's
license.
git commit -s -m "Short summary of the change
Longer description of what this commit does and why."Commits without a sign-off will not be accepted.
- Fork the repository and clone your fork.
- Create a feature branch from
main. - Make your changes.
- Run the full quality check before submitting.
- Submit a pull request.
The project uses a Makefile for common development tasks:
make # build, test, clippy, fmt, install
make build # build both binaries in release mode
make test # run all tests
make clippy # run clippy linter
make fmt # format code
make clean # clean build artifactsDuring development, use cargo run -- <command> to test the CLI:
cargo run -- list-targets
cargo run -- init --target dummy1 --workspace /tmp/test-ws- Run
cargo fmtbefore committing. All code must be formatted withrustfmt. - Run
cargo clippyand fix all warnings. Clippy warnings are treated as errors in CI. - Follow idiomatic Rust practices: prefer
Resultoverunwrap(), use proper error handling, and leverage the type system. - Keep lines under 100 characters when possible.
Use Linux kernel style commit messages:
- Subject line: 50 characters or less, imperative mood (e.g., "Add mirror support for toolchains").
- Blank line after the subject.
- Body: Wrap at 72 characters. Explain what and why, not how.
- Sign-off: Always use
git commit -s.
Example:
config: add support for custom mirror paths
Allow users to override the default mirror location through the
config.toml file. This is useful for CI environments where the
default $HOME/tmp/mirror path may not be writable.
Signed-off-by: Your Name <your.email@example.com>
- Keep pull requests focused on a single change.
- Provide a clear title and description explaining the purpose.
- Link any related issues.
- Ensure all CI checks pass before requesting review.
- Rebase on
mainrather than merging to keep a clean history.
Use GitHub Issues to report bugs or request features. When reporting a bug, please include:
- The
cim --versionoutput. - Your operating system and architecture.
- Steps to reproduce the issue.
- Expected versus actual behavior.
By contributing to this project, you agree that your contributions will be licensed under the Apache License 2.0, the same license that covers the project.