Skip to content

Add typos for CI, include typos.toml #2664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ jobs:
run: rustup update stable && rustup default stable && rustup component add rustfmt
- run: cargo fmt --check

spelling:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Spell Check repo
uses: crate-ci/[email protected]

gui:
name: GUI tests
runs-on: ubuntu-latest
Expand Down
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ Like formatting your code with `rustfmt`, running clippy regularly and before yo
cargo clippy
```

#### Finding typos with `typos-cli`

[typos](https://github.com/crate-ci/typos) is a tool to check for typos in any of the repos files that are not whitelisted inside of `typos.toml`. It runs as a [GitHub Action](https://github.com/crate-ci/typos/blob/master/docs/github-action.md) as part of our CI.

1. To install
```
cargo binstall -y typos
```
2. Running `typos`
```
typos
```

### Change requirements

Please consider the following when making a change:
Expand Down
14 changes: 14 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[files]
extend-exclude = [
"test_book/",
"*.css",
"tests/summary_md_files/the_book-2nd_edition.md",
"CHANGELOG.md",
"tests/parse_existing_summary_files.rs",
"src/front-end/fonts/fontawesome-webfont.svg",
"src/front-end/searcher/elasticlunr.min.js",
"src/front-end/playground_editor/ace.js",
"src/front-end/js/highlight.js",
"src/front-end/js/book.js",
"src/preprocess/links.rs",
]