mirror of
https://gitee.com/openharmony/third_party_rust_nom
synced 2024-11-26 17:20:29 +00:00
add issue and PR templates
This commit is contained in:
parent
6d6c0d2078
commit
d63f958831
40
.github/ISSUE_TEMPLATE.md
vendored
Normal file
40
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
Hello, and thank you for submitting an issue to nom!
|
||||
|
||||
|
||||
First, please note that, for family reasons, I have limited time to work on
|
||||
nom, so following the advice here will make sure I will quickly understand
|
||||
your problem and answer as soon as possible.
|
||||
Second, if I don't get to work on your issue quickly, that does not mean I
|
||||
don't consider it important or useful. Major version releases happen once
|
||||
a year, and a lot of fixes are done for the occasion, once I have had time
|
||||
to think of the right solution. So I will get back to you :)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Here are a few things you should provide to help me understand the issue:
|
||||
|
||||
- Rust version : `rustc -V`
|
||||
- nom version :
|
||||
- nom compilation features used:
|
||||
|
||||
## Test case
|
||||
|
||||
Please provide a short, complete (with crate import, etc) test case for
|
||||
the issue, showing clearly the expected and obtained results.
|
||||
|
||||
Example test case:
|
||||
|
||||
```
|
||||
#[macro_use]
|
||||
extern crate nom;
|
||||
|
||||
named!(multi<&[u8], Vec<&[u8]> >, many1!( tag!( "abcd" ) ) );
|
||||
|
||||
let a = b"abcdabcd";
|
||||
|
||||
fn main() {
|
||||
let res = vec![&b"abcd"[..], &b"abcd"[..]];
|
||||
assert_eq!(multi(&a[..]),Ok((&b""[..], res))); // returns Err::Incomplete(Unknown))
|
||||
}
|
||||
```
|
||||
|
40
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
40
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
Hello, and thank you for submitting a pull request to nom!
|
||||
|
||||
First, please note that, for family reasons, I have limited time to work on
|
||||
nom, so following the advice here will make sure I will quickly understand
|
||||
your work and be able to merge it early.
|
||||
Second, if I don't get to work on your PR quickly, that does not mean I won't
|
||||
include it later. Major version releases happen once a year, and a lot of
|
||||
interesting work is merged for the occasion. So I will get back to you :)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Please provide the following information with this pull request:
|
||||
|
||||
- related issue number (I need some context to understand a PR with a lot of
|
||||
code, except for documentation typos)
|
||||
- a test case reproducing the issue. You can write it in [issues.rs](https://github.com/Geal/nom/blob/master/tests/issues.rs)
|
||||
- if adding a new combinator, please add code documentation and some unit tests
|
||||
in the same file. Also, pelase update the [combinatornator list](https://github.com/Geal/nom/blob/master/doc/choosing_a_combinator.md)
|
||||
|
||||
## Code style
|
||||
|
||||
This project follows a [code style](https://github.com/Geal/nom/blob/master/rustfmt.toml)
|
||||
checked by [rustfmt][https://github.com/rust-lang-nursery/rustfmt].
|
||||
|
||||
Please avoid cosmetic fixes unrelated to the pull request. Keeping the changes
|
||||
as small as possible increase your chances of getting this merged quickly.
|
||||
|
||||
## Rebasing
|
||||
|
||||
To make sure the changes will work properly once merged into the master branch
|
||||
(which might have changed while you were working on your PR), please
|
||||
[rebase your PR on master](https://git-scm.com/book/en/v2/Git-Branching-Rebasing).
|
||||
|
||||
## Squashing the commits
|
||||
|
||||
If the pull request include a lot of small commits used for testing, debugging,
|
||||
or correcting previous work, it might be useful to
|
||||
[squash the commits](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History)
|
||||
to make the code easier to merge.
|
||||
|
@ -65,7 +65,7 @@ If possible provide:
|
||||
|
||||
### Coding style
|
||||
|
||||
The normal rust coding style is suggested as enforced by [rustfmt][cs1] is suggested.
|
||||
The normal rust coding style is checked by [rustfmt][cs1].
|
||||
Readable code is the first step on having good and safe libraries.
|
||||
|
||||
[cs1]: https://github.com/rust-lang-nursery/rustfmt
|
||||
|
Loading…
Reference in New Issue
Block a user