- Introduction
- Code of Conduct
- Matrix Room
- Reporting Bugs and Suggesting Improvements
- Contribution Workflow
- Quality Standards
- Release Process
Hello, and welcome to the contributing guide for Codespan!
Codespan is mostly maintained in the spare time of contributors, so immediate reactions are not to be expected! By following this guide you'll make it easier for us to address your issues or incorporate your contributions.
We look forward to working with you!
Please note that this project is released with a Code of Conduct. By participating in this project you agree to abide by its terms.
Joining the matrix room at #codespan:matrix.org is a good way to get in touch with the developers and community.
Bugs (unwanted behaviour) and suggested improvements are tracked as GitHub issues. Before reporting an issue, please check the following points:
- The issue is caused by
codespan-reporting
itself and not by how it is used. Have a look at the documentation if you are not sure. If the documentation is not helpful, you can contact the developers at the above matrix chat address or make an issue. - Your issue has not already been reported by someone else. Please look through the open issues in the issue tracker.
When reporting an issue, please add as much relevant information as possible. This will help developers and maintainers to resolve your issue. Some things you might consider:
- Use a descriptive title.
- Describe how a problem can be reproduced. Ideally give a minimal example.
- Explain what exactly is the problem and what you expect instead. If it is related to rendering, add screenshots or other illustrations.
Follow these steps to contribute to the project:
- Make a fork of the codespan repository.
- Within your fork, create a branch for your contribution. Use a meaningful name.
- Create your contribution, meeting all contribution quality standards.
- Ensure all the tests pass (
cargo test
). - Create a pull request against the
master
branch of the repository. - Once the pull request is reviewed and CI passes, it will be merged.
Most quality and style standards are checked automatically by the CI build. Contributions should:
- Separate each logical change into its own commit.
- Include tests for any new functionality and fixed issues in your pull request.
- Update the changelogs with any added, removed, changed, or fixed functionality.
- Document public functions.
- Format code with
cargo fmt
. - Avoid adding
unsafe
code. If it is necessary, provide an explanatory comment on anyunsafe
block explaining its rationale and why it's safe. - Add a descriptive message for each commit. Follow these commit message guidelines.
- Document your pull requests. Include the reasoning behind each change, and the testing done.
- Bump the version numbers of each crate appropriately.
- Update the changelogs with the new version ranges.
- Create a new PR for the release, and if it passes CI merge it.
- Create a new tag for the release, pointing to the merge commit.
- Run the following commands in order from the root of the repository.
Note that doing this too quickly may result in an error,
due to a server-side delay in crate publishing:
cd codespan-reporting && cargo publish; cd .. cd codespan && cargo publish; cd .. cd codespan-lsp && cargo publish; cd ..