From f53bdc43202859b81cbb56fbde64d54bf547cdb5 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 6 Dec 2022 17:41:05 +0100 Subject: [PATCH 1/4] update the contributing.md --- CONTRIBUTING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83bfc5a5f..a9a0c95ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,6 +31,8 @@ Remember that there are many ways to contribute other than writing code: writing ## Development Workflow +We're using rust stable for the tests and clippy but rust nightly for the formatting of the code. + ### Test ```bash @@ -55,6 +57,28 @@ 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 +``` + +Then you can format your code BUT you need to do it with rust-fmt. + +```bash +cargo +nightly fmt --all +``` + +### Clippy + +```bash +cargo clippy +``` + + + ## Git Guidelines ### Git Branches From 0e5c3b1f64ea4b765cfd72d9a67b145cee3e961e Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 7 Dec 2022 12:23:06 +0100 Subject: [PATCH 2/4] Update CONTRIBUTING.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clémentine Urquizar - curqui --- CONTRIBUTING.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a9a0c95ff..e44e502e0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -76,9 +76,6 @@ cargo +nightly fmt --all ```bash cargo clippy ``` - - - ## Git Guidelines ### Git Branches From 5eecb8489df3649793197451c2232b76806e4465 Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 7 Dec 2022 12:23:12 +0100 Subject: [PATCH 3/4] Update CONTRIBUTING.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clémentine Urquizar - curqui --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e44e502e0..d78627580 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ Remember that there are many ways to contribute other than writing code: writing ## Development Workflow -We're using rust stable for the tests and clippy but rust nightly for the formatting of the code. +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 From 250743885df3a7fcd04303e21a9311221f4df9e5 Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 7 Dec 2022 12:31:43 +0100 Subject: [PATCH 4/4] add a sentence about installing rust-nightly --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d78627580..377aadea0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,6 +66,15 @@ touch benchmarks/benches/datasets_paths.rs ``` 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