Skip to content

Commit a5bae89

Browse files
authored
Update documentation (#604)
* book: Update developers guide * Explain how to build rust-code-analysis in README
1 parent bdea7d2 commit a5bae89

File tree

2 files changed

+68
-10
lines changed

2 files changed

+68
-10
lines changed

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,45 @@ On the
3636
</a> page, there is a list of commands that can be run to get information
3737
about metrics, nodes, and other general data provided by this software.
3838

39+
## Building
40+
41+
To build the `rust-code-analysis` library, you need to run the following
42+
command:
43+
44+
```console
45+
cargo build
46+
```
47+
48+
If you want to build the `cli`:
49+
50+
```console
51+
cargo build -p rust-code-analysis-cli
52+
```
53+
54+
If you want to build the `web` server:
55+
56+
```console
57+
cargo build -p rust-code-analysis-web
58+
```
59+
60+
If you want to build everything in one fell swoop:
61+
62+
```console
63+
cargo build --workspace
64+
```
65+
66+
## Testing
67+
68+
To verify whether all tests pass, run the `cargo test` command.
69+
70+
```console
71+
cargo test --workspace --all-features --verbose
72+
```
3973

4074
# Contributing
4175

42-
If you want to contribute to the development of this software
43-
or you are just interested in building **rust-code-analysis**, have a look at the
76+
If you want to contribute to the development of this software, have a look at the
77+
guidelines contained in our
4478
<a href="https://mozilla.github.io/rust-code-analysis/developers/index.html" target="_blank">Developers Guide</a>.
4579

4680

rust-code-analysis-book/src/developers/README.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ You can learn how to do that
1010

1111
## Clone Repository
1212

13-
First of all, you need to clone the repository and all of its submodules.
13+
First of all, you need to clone the repository.
1414
You can do that:
1515

1616
through **HTTPS**
1717

1818
```
19-
git clone --recurse-submodules -j8 https://github.com/mozilla/rust-code-analysis.git
19+
git clone -j8 https://github.com/mozilla/rust-code-analysis.git
2020
```
2121

2222
or through **SSH**
2323

2424
```
25-
git clone --recurse-submodules -j8 [email protected]:mozilla/rust-code-analysis.git
25+
git clone -j8 [email protected]:mozilla/rust-code-analysis.git
2626
```
2727

2828
## Building
@@ -34,10 +34,22 @@ command:
3434
cargo build
3535
```
3636

37-
If you are also interested in the cli tool:
37+
If you want to build the `cli`:
3838

3939
```console
40-
cargo build --all
40+
cargo build -p rust-code-analysis-cli
41+
```
42+
43+
If you want to build the `web` server:
44+
45+
```console
46+
cargo build -p rust-code-analysis-web
47+
```
48+
49+
If you want to build everything in one fell swoop:
50+
51+
```console
52+
cargo build --workspace
4153
```
4254

4355
## Testing
@@ -46,7 +58,7 @@ After you have finished changing the code, you should **always** verify whether
4658
all tests pass with the `cargo test` command.
4759

4860
```console
49-
cargo test --all --all-features --verbose
61+
cargo test --workspace --all-features --verbose
5062
```
5163

5264
## Code Formatting
@@ -86,7 +98,7 @@ rustup component add clippy
8698
To detect errors and warnings:
8799

88100
```console
89-
cargo clippy --all-targets --all --
101+
cargo clippy --workspace --all-targets --
90102
```
91103

92104
## Code Documentation
@@ -106,7 +118,7 @@ each dependency used by **rust-code-analysis**.
106118
You can run **rust-code-analysis-cli** using:
107119

108120
```console
109-
cargo run -- [rust-code-analysis-cli-parameters]
121+
cargo run -p rust-code-analysis-cli -- [rust-code-analysis-cli-parameters]
110122
```
111123

112124
To know the list of **rust-code-analysis-cli** parameters, run:
@@ -115,6 +127,18 @@ To know the list of **rust-code-analysis-cli** parameters, run:
115127
cargo run -p rust-code-analysis-cli -- --help
116128
```
117129

130+
You can run **rust-code-analysis-web** using:
131+
132+
```console
133+
cargo run -p rust-code-analysis-web -- [rust-code-analysis-web-parameters]
134+
```
135+
136+
To know the list of **rust-code-analysis-web** parameters, run:
137+
138+
```console
139+
cargo run -p rust-code-analysis-web -- --help
140+
```
141+
118142
## Practical advice
119143

120144
- When you add a new feature, add at least one unit or integration test to

0 commit comments

Comments
 (0)