diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03652b5551..3186c820b4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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/typos@v1.31.1 + gui: name: GUI tests runs-on: ubuntu-latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a6d4afe11c..6b205466a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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: diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000000..3722ac6b0b --- /dev/null +++ b/typos.toml @@ -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", +]