Skip to content

Commit 84e67d2

Browse files
authored
Add Linting & Formatting Tooling to the README (#184)
## 📔 Objective Add linting and formatting tooling info to the readme. ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes
1 parent fb6f674 commit 84e67d2

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,34 @@ The list of developer tools is:
115115
`cargo install cargo-nextest --locked`. It can be manually run using
116116
`cargo nextest run --all-features`
117117

118-
## Cargo fmt
118+
## Formatting & Linting
119119

120-
We use certain unstable features for formatting which require the nightly version of cargo-fmt.
120+
This repository uses various tools to check formatting and linting before it's merged. It's
121+
recommended to run the checks prior to submitting a PR.
121122

122-
To install:
123+
### Installation
123124

124-
```
125-
rustup component add rustfmt --toolchain nightly
126-
```
125+
Please see the [lint.yml](./.github/workflows/lint.yml) file for example installation commands &
126+
versions. Here are the cli tools we use:
127+
128+
- Nightly [cargo fmt](https://github.com/rust-lang/rustfmt) and
129+
[cargo udeps](https://github.com/est31/cargo-udeps)
130+
- [rust clippy](https://github.com/rust-lang/rust-clippy)
131+
- [cargo sort](https://github.com/DevinR528/cargo-sort)
132+
- [prettier](https://github.com/prettier/prettier)
127133

128-
To run:
134+
### Checks
135+
136+
To verify if changes need to be made, here are examples for the above tools:
129137

130138
```
131-
cargo +nightly fmt
139+
export RUSTFLAGS="-D warnings"
140+
141+
cargo +nightly fmt --check
142+
cargo +nightly udeps --workspace --all-features
143+
cargo clippy --all-features --tests
144+
cargo sort --workspace --check
145+
npm run lint
132146
```
133147

134148
## Contribute

0 commit comments

Comments
 (0)