-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
typos
- Source code spell checker (#12036)
# Objective - Avoid misspellings throughout the codebase by using [`typos`](https://github.com/crate-ci/typos) in CI Inspired by gfx-rs/wgpu#5191 Typos is a minimal code speller written in rust that finds and corrects spelling mistakes among source code. - Fast enough to run on monorepos - Low false positives so you can run on PRs ## Solution - Use [typos-action](https://github.com/marketplace/actions/typos-action) in CI - Add how to use typos in the Contribution Guide --------- Co-authored-by: François <[email protected]> Co-authored-by: Alice Cecile <[email protected]> Co-authored-by: Joona Aalto <[email protected]>
- Loading branch information
1 parent
2b7a3b2
commit c97d010
Showing
4 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,6 +183,22 @@ jobs: | |
echo 'Or if you use VSCode, use the `Even Better Toml` extension with 2 spaces' | ||
echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml' | ||
typos: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check for typos | ||
uses: crate-ci/[email protected] | ||
- name: Typos info | ||
if: failure() | ||
run: | | ||
echo 'To fix typos, please run `typos -w`' | ||
echo 'To check for a diff, run `typos`' | ||
echo 'You can find typos here: https://crates.io/crates/typos' | ||
echo 'if you use VSCode, you can also install `Typos Spell Checker' | ||
echo 'You can find the extension here: https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode' | ||
run-examples-on-windows-dx12: | ||
runs-on: windows-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[files] | ||
extend-exclude = [ | ||
"*.pbxproj", # metadata file | ||
"CHANGELOG.md", # To keep consistency between the commit history/PRs. | ||
] | ||
|
||
# Corrections take the form of a key/value pair. The key is the incorrect word | ||
# and the value is the correct word. If the key and value are the same, the | ||
# word is treated as always correct. If the value is an empty string, the word | ||
# is treated as always incorrect. | ||
# the toi of the mountain | ||
|
||
# Match Whole Word - Case Sensitive | ||
[default.extend-identifiers] | ||
ser = "ser" # ron::ser - Serializer | ||
Sur = "Sur" # macOS Big Sur - South | ||
|
||
# Match Inside a Word - Case Insensitive | ||
[default.extend-words] | ||
LOD = "LOD" # Level of detail | ||
TOI = "TOI" # Time of impact | ||
|
||
[default] | ||
extend-ignore-identifiers-re = [ | ||
"NDK", # NDK - Native Development Kit | ||
"inventario", # Inventory in Portuguese | ||
# Used in bevy_mikktspace | ||
"iFO", | ||
"vOt", | ||
"fLenOt", | ||
] |