From 35b4fb3fd961300cc88187b6a8b6597cc036ad4e Mon Sep 17 00:00:00 2001 From: rhysd Date: Mon, 13 Jun 2022 20:25:59 +0900 Subject: [PATCH] add contributing guide --- CONTRIBUTING.md | 16 ++++++++++++++++ README.md | 15 ++++++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7a5d20c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,16 @@ +Please ensure that all tests and linter checks passed on your branch before creating a PR which modifies some source files. + +To run tests: + +```sh +cargo test -- --skip src/lib.rs +``` + +`--skip` is necessary since `cargo test` tries to run code blocks in [README file](./README.md). + +To run linters: + +```sh +cargo clippy --all-features --examples +cargo fmt -- --check +``` diff --git a/README.md b/README.md index 791facc..c94d58e 100644 --- a/README.md +++ b/README.md @@ -149,8 +149,8 @@ let mut textarea = TextArea::new(lines); from any iterators whose elements can be converted to `String`. ```rust -// Create `TextArea` from from `&[&str]` -let mut textarea = TextArea::from(&[ +// Create `TextArea` from from `[&str]` +let mut textarea = TextArea::from([ "this is first line", "this is second line", "this is third line", @@ -467,10 +467,12 @@ loop { ## Contributing to tui-textarea -For feature requests or bug reports, please create an issue on GitHub. For submitting patches, please create a pull -request on GitHub. +This project is developed [on GitHub][repo]. -https://github.com/rhysd/tui-textarea +For feature requests or bug reports, please [create an issue][new-issue]. For submitting patches, please [create a pull +request][pulls]. + +Please see [CONTRIBUTING.md](./CONTRIBUTING.md) before making a PR. ## License @@ -482,3 +484,6 @@ tui-textarea is distributed under [The MIT License](./LICENSE.txt). [crosster]: https://docs.rs/crossterm/latest/crossterm/ [doc]: https://docs.rs/tui-textarea/latest/tui_textarea [tui-backend]: https://docs.rs/tui/latest/tui/backend/trait.Backend.html +[repo]: https://github.com/rhysd/tui-textarea +[new-issue]: https://github.com/rhysd/tui-textarea/issues/new +[pulls]: https://github.com/rhysd/tui-textarea/pulls