summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhizhen He <hezhizhen.yi@gmail.com>2023-05-09 13:58:34 +0800
committerGitHub <noreply@github.com>2023-05-09 07:58:34 +0200
commit1c743d5e93318554adced7d9c75e85db496e719c (patch)
treec9c2a37d56308928c0dd4380cb2440e623f1fa42
parentd07a8e3668838223aeeb94e810a0b29806e35f78 (diff)
docs: update CONTRIBUTING.md and README.md (#5153)
-rw-r--r--CONTRIBUTING.md8
-rw-r--r--README.md2
2 files changed, 5 insertions, 5 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 52cf669dd..ff3c74351 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -10,7 +10,7 @@ If you have any questions that aren't addressed in this document, please don't h
- **Module**: A component in the prompt giving information based on contextual information from your OS. For example, the `rust` module shows the version of Rust that is currently installed on your computer, if your current directory is a Rust project.
-- **Segment**: Smaller sub-components that compose a module. For example, the `symbol` segment in the `rust` module contains the character that is shown before the version number (`🦀` by default).
+- **Segment**: Smaller subcomponents that compose a module. For example, the `symbol` segment in the `rust` module contains the character that is shown before the version number (`🦀` by default).
## Philosophy
@@ -50,7 +50,7 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
## External commands
-To run a external command (e.g. to get the version of a tool) and to allow for mocking use the `context.exec_cmd` function. Here's a quick example:
+To run an external command (e.g. to get the version of a tool) and to allow for mocking use the `context.exec_cmd` function. Here's a quick example:
```rust
use super::{Context, Module, ModuleConfig};
@@ -127,7 +127,7 @@ STARSHIP_LOG=trace cargo run
## Linting
-Starship source files are linted with [clippy](https://crates.io/crates/clippy). Clippy will be ran as part of CI. Linting errors will fail a build, so it is suggested that you run Clippy locally:
+Starship source files are linted with [clippy](https://crates.io/crates/clippy). Clippy will be run as part of CI. Linting errors will fail a build, so it is suggested that you run Clippy locally:
```sh
rustup component add clippy
@@ -218,7 +218,7 @@ mod tests {
}
```
-If a module depends on output of another program, then that output should be added to the match statement in [`utils.rs`](src/utils.rs). The match has to be exactly the same as the call to `utils::exec_cmd()`, including positional arguments and flags. The array of arguments are joined by a `" "`, so `utils::exec_cmd("program", &["arg", "more_args"])` would match with the `program arg more_args` match statement.
+If a module depends on output of another program, then that output should be added to the match statement in [`utils.rs`](src/utils.rs). The match has to be exactly the same as the call to `utils::exec_cmd()`, including positional arguments and flags. The array of arguments is joined by a `" "`, so `utils::exec_cmd("program", &["arg", "more_args"])` would match with the `program arg more_args` match statement.
If the program cannot be mocked (e.g. It performs some filesystem operations, either writing or reading files) then it has to added to the project's GitHub Actions workflow file([`.github/workflows/workflow.yml`](.github/workflows/workflow.yml)) and the test has to be marked with an `#[ignored]`. This ensures that anyone can run the test suite locally without needing to pre-configure their environment. The `#[ignored]` attribute is bypassed during CI runs in GitHub Actions.
diff --git a/README.md b/README.md
index 8df28fd17..b12c1a277 100644
--- a/README.md
+++ b/README.md
@@ -271,7 +271,7 @@ Install Starship using any of the following package managers:
</details>
-### Step 2. Setup your shell to use Starship
+### Step 2. Set up your shell to use Starship
Configure your shell to initialize starship. Select yours from the list below: