Skip to content

Latest commit

 

History

History
96 lines (60 loc) · 3.86 KB

CONTRIBUTING.md

File metadata and controls

96 lines (60 loc) · 3.86 KB

Contributing to Loco

Thank you for taking the time to read this.

The first way to show support is to star our repos :).

Loco is a community driven project. We welcome you to participate, contribute and together build a productivity-first web and api framework in Rust.

Code of Conduct

This project is follows Code of Conduct. By participating, you are expected to uphold this code.

I have a question

If you have a question to ask, feel free to open an new discussion. There are no dumb questions.

I need a feature

Feature requests from anyone is definitely welcomed! You can open an issue. When you can, illustrate a feature with code, simulated console output, and "make believe" console interactions, so we know what you want and what you expect.

I want to support

Awesome! The best way to support us is to recommend it to your classmates/colleagues/friends, write blog posts and tutorials on our projects and help out other users in the community.

I want to join

We are always looking for long-term contributors. If you want to commit longer-term to Loco's open source effort, definitely talk with us!

  • From time to time we will make issues clear for newcomers with mentoring and good-first-issue
  • If no issue exist, just open an issue and ask how to help

Using an example app to test

Our testing grounds is examples/demo which is pointing to the latest local loco framework. You can use it to test out an actual app, using a locally modified loco.

Code style

We use rustfmt/cargo fmt. A few code style options are set in the .rustfmt.toml file, and some of them are not stable yet and require a nightly version of rustfmt.

If you're using rustup, the nightly version of rustfmt can be installed by doing the following:

rustup component add rustfmt --toolchain nightly

And then format your code by running:

cargo +nightly fmt

Testing

Just clone the project and run cargo test. You can see how we test in .github/workflows

Snapshots

To update/create a snapshots we are using insta. all you need to do is install insta (cargo install cargo-insta) and run the following command:

cargo insta test --review

In case of cli changes we snapshot the binary commands. in case of changes run the following command yo update the CLI snapshot

LOCO_CI_MODE=true TRYCMD=overwrite cargo test

Docs

The documentation consists of two main components:

To reduce duplication in documentation and examples, we use snipdoc. As part of our CI process, we ensure that the documentation remains consistent.

Updating the Documentation

  • Download snipdoc.
  • Create the snippet in the yaml file or inline the code.
  • Run snipdoc run.

Open A Pull Request

The most recommended and straightforward method to contribute changes to the project involves forking it on GitHub and subsequently initiating a pull request to propose the integration of your modifications into our repository.

Changes a starters project are not recommended. read more here

In Your Pull Request Description, Include:

  • References to any bugs fixed by the change
  • Informative notes for the reviewer, aiding their comprehension of the necessity for the change or providing insights on how to conduct a more effective review.
  • A clear explanation of how you tested your changes.

Your PR must also:

  • be based on the master branch
  • adhere to the code style
  • Successfully passes the test suite