-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# How To Contribute | ||
|
||
Thank you for considering contributing to `rpsl-rs`! | ||
This document intends to make contribution more accessible while aligning expectations. | ||
Please don't hesitate to open issues and PRs regardless if anything is unclear. | ||
|
||
By contributing to `rpsl-rs`, you agree that your code will be licensed under the terms of the MIT License without any additional terms or conditions. | ||
|
||
## Getting Started | ||
|
||
To gain an overview of `rpsl-rs`, please read the [documentation](https://docs.rs/rpsl-rs). | ||
|
||
## General Guidelines | ||
|
||
- Contributions of all sizes are welcome, including single line grammar / typo fixes. | ||
- For new features, documentation and tests are a requirement. | ||
- Changes must pass CI. PRs with failing CI will be treated as drafts unless you explicitly ask for help. | ||
- Simplicity is a core objective of `rpsl-rs`. Please open an issue before working on a new feature to discuss it. | ||
|
||
## Development Environment | ||
|
||
### Devcontainer | ||
|
||
For users of IDEs with support for devcontainers, it's usage is recommended. | ||
|
||
### Other | ||
|
||
Ensure a recent version of rustup is available, otherwise [install it](https://www.rust-lang.org/tools/install). | ||
|
||
## Coding Standards | ||
|
||
`rpsl-rs` uses [`rustfmt`](https://github.com/rust-lang/rustfmt) for uniform fomatting and [`clippy`](https://github.com/rust-lang/rust-clippy) for basic linting and enforcement of best practices. Please run both before submitting a PR to avoid being reprimanded by CI. | ||
|
||
```sh | ||
$ cargo fmt --all --check | ||
$ cargo clippy --all-targets --all-features | ||
``` | ||
|
||
In addition to basic formatting and linting, a high code coverage should be maintained. Property based tests are used to ensure the parser can deal with any kind of RPSL input. All tests need to pass before a PR can be merged. | ||
|
||
```sh | ||
$ cargo test | ||
``` | ||
|
||
## Performance | ||
|
||
To ensure that the parser stays performant, benchmarks are run on every PR. To execute them locally, run `cargo bench`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters