rusty-man/CONTRIBUTING.md
Robin Krahl 1a518d7509
Add integration tests
This patch adds an integration test suite using the insta crate for
snapshot testing.  The test suite is tested for all supported Rust
versions and should always succeed for the MSRV (currently 1.40.0) and
the current stable Rust version.

However there are some minor changes in the configuration format between
Rust versions, so tests that don’t work on all supported Rust versions
are marked with the ignore attribute.  But even the ignored tests should
work on the stable Rust release.
2020-08-11 09:31:20 +02:00

3.1 KiB
Raw Blame History

Contributing to rusty-man

Project infrastructure

rusty-man is hosted on sourcehut.org and uses these services:

How to contribute

Writing code

Have a look at the issues in rusty-mans issue tracker, especially those with the label good first issue, to find an issue to work on.

Writing documentation

You can help by proofreading and extending the documentation in the readme file and the contributing and installation guides. Also, rusty-man is lacking a man page and a usage guide contributions are welcome!

Testing

If you are using rusty-man and are encountering any issues, please let me know. Im especially interested in reports from other operating systems than Linux. You can also help by writing unit tests, especially for the HTML documentation parser.

Submitting patches

Please submit patches by sending a mail to the mailing list ~ireas/rusty-man-dev@lists.sr.ht. There are three ways to do that:

  1. Use git send-email to send your patches. If you are not familiar with the git send-email workflow, have a look at this step-by-step guide or contact me for more information.
  2. Or push your changes to a public repository, for example hosted on your own Git server, sourcehut.org, Gitlab or GitHub, and use git request-pull to send a pull request to the mailing list.
  3. If options one and two dont work for you, just use your mail client to send a mail with a link to your changes and a short description to the mailing list.

Testing and checking the code

  • rusty-man currently has very few unit tests. You can execute them using cargo test --bins, but make sure to generate rusty-mans documentation with cargo doc before running the tests!
  • rusty-man has an integration test suite that uses insta for snapshot testing. The test suite takes care of generating the required documentation so you dont have to run cargo doc manually. Use cargo test to execute the tests that should work on all supported Rust versions. Use cargo test -- --ignored to run the tests that only work with the latest stable Rust version.
  • Use cargo fmt for code formatting.
  • Fix all warnings and errors reported by clippy.