From 0fbc294896a4b39f2e0aeaec293207a6a44a336b Mon Sep 17 00:00:00 2001 From: Ruihang Xia Date: Sun, 28 Apr 2024 19:43:03 +0800 Subject: [PATCH] docs: revise style guide about test mod Signed-off-by: Ruihang Xia --- CONTRIBUTING.md | 2 +- docs/style-guide.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94bfb60ac35c..5084e288ef45 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,7 +50,7 @@ GreptimeDB uses the [Apache 2.0 license](https://github.com/GreptimeTeam/greptim - To ensure that community is free and confident in its ability to use your contributions, please sign the Contributor License Agreement (CLA) which will be incorporated in the pull request process. - Make sure all files have proper license header (running `docker run --rm -v $(pwd):/github/workspace ghcr.io/korandoru/hawkeye-native:v3 format` from the project root). -- Make sure all your codes are formatted and follow the [coding style](https://pingcap.github.io/style-guide/rust/) and [style guide](http://github.com/greptimeTeam/docs/style-guide.md). +- Make sure all your codes are formatted and follow the [coding style](https://pingcap.github.io/style-guide/rust/) and [style guide](https://github.com/GreptimeTeam/greptimedb/blob/main/docs/style-guide.md). - Make sure all unit tests are passed (using `cargo test --workspace` or [nextest](https://nexte.st/index.html) `cargo nextest run`). - Make sure all clippy warnings are fixed (you can check it locally by running `cargo clippy --workspace --all-targets -- -D warnings`). diff --git a/docs/style-guide.md b/docs/style-guide.md index 901bd56efaec..ece7d8aca64d 100644 --- a/docs/style-guide.md +++ b/docs/style-guide.md @@ -12,7 +12,7 @@ It's mainly an complement to the [Rust Style Guide](https://pingcap.github.io/st ## Formatting -- Place all `mod` declaration before any `use`. +- Place all `mod` declaration before any `use` (except the test mod). - Use `unimplemented!()` instead of `todo!()` for things that aren't likely to be implemented. - Add an empty line before and after declaration blocks. - Place comment before attributes (`#[]`) and derive (`#[derive]`).