Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Update the contributing.md #726

Merged
merged 4 commits into from
Dec 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Remember that there are many ways to contribute other than writing code: writing

## Development Workflow

We're using a stable version of Rust for the tests and Clippy but the nightly version of Rust for the formatting of the code.

### Test

```bash
Expand All @@ -55,6 +57,34 @@ Don't forget to specify the `id` of the documents. Also, note that it supports J
streaming: you can send them to the engine by using the `content-type:application/json` and
`content-type:application/x-ndjson` headers respectively.

### Format

For your first run you'll need to run this command:

```bash
touch benchmarks/benches/datasets_paths.rs
```
Comment on lines +64 to +66
Copy link
Member

@curquiza curquiza Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? Can't we change this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I tried to, but git doesn't like it.

Basically, this file is auto-generated with a path in your filesystem when you run the benchmarks, and thus if we start tracking it with git, it will show up every time as a spurious change 😩

And no, force pushing the file but adding it to the .gitignore doesn't change anything, git is not meant to be used like that, if he tracks a file he'll track it whatever happens 😩


Then you can format your code BUT you need to do it with rust-fmt.
If you have not installed the rust nightly version yet here is how to do it:

```bash
rustup toolchain install nightly
```

You can read more about it here: https://rust-lang.github.io/rustup/concepts/channels.html

And finally, to format your code you can run:

```bash
cargo +nightly fmt --all
irevoire marked this conversation as resolved.
Show resolved Hide resolved
```

### Clippy

```bash
cargo clippy
```
## Git Guidelines

### Git Branches
Expand Down