Skip to content

Commit

Permalink
Add contribution guidelines (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
SRv6d authored Dec 26, 2023
1 parent 9790871 commit 6b790d1
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/CONTRIBUTING.md
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`.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ Ref: https://rdap.arin.net/registry/entity/THEFA-3

To extract each individual object, the [parse_whois_response] function can be used to parse the response into a `Vec` containing all individual [ObjectView]s within the response. Examples can be found in the function documentation.

## Contributing

Contributions of all sizes that improve `rpsl-rs` in any way, be it DX/UX, documentation, performance or other are highly appreciated.
To get started, please read the [contribution guidelines](.github/CONTRIBUTING.md). Before starting work on a new feature you would like to contribute that may impact simplicity, reliability or performance, please open an issue first.

[RFC 2622]: https://datatracker.ietf.org/doc/html/rfc2622
[Object]: https://docs.rs/rpsl-rs/latest/rpsl/struct.Object.html
[ObjectView]: https://docs.rs/rpsl-rs/latest/rpsl/struct.ObjectView.html
Expand Down

0 comments on commit 6b790d1

Please sign in to comment.