diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96068912a5..3bd0a0b1d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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/typos@v1.18.2 + - 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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f4f2aa890b..51ee566dfa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -334,19 +334,19 @@ If you're new to Bevy, here's the workflow we use: * `cargo run -p ci -- doc` - to run doc tests and doc checks. * `cargo run -p ci -- compile` - to check that everything that must compile still does (examples and benches), and that some that shouldn't still don't ([`crates/bevy_ecs_compile_fail_tests`](./crates/bevy_ecs_compile_fail_tests)). * to get more information on commands available and what is run, check the [tools/ci crate](./tools/ci). - 4. When working with Markdown (`.md`) files, Bevy's CI will check markdown files (like this one) using [markdownlint](https://github.com/DavidAnson/markdownlint). To locally lint your files using the same workflow as our CI: 1. Install [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli). 2. Run `markdownlint -f -c .github/linters/.markdown-lint.yml .` in the root directory of the Bevy project. - 5. When working with Toml (`.toml`) files, Bevy's CI will check toml files using [taplo](https://taplo.tamasfe.dev/): `taplo fmt --check --diff` 1. If you use VSCode, install [Even better toml](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml) and format your files. 2. If you want to use the cli tool, install [taplo-cli](https://taplo.tamasfe.dev/cli/installation/cargo.html) and run `taplo fmt --check --diff` to check for the formatting. Fix any issues by running `taplo fmt` in the root directory of the Bevy project. - -6. Push your changes to your fork on Github and open a Pull Request. -7. Respond to any CI failures or review feedback. While CI failures must be fixed before we can merge your PR, you do not need to *agree* with all feedback from your reviews, merely acknowledge that it was given. If you cannot come to an agreement, leave the thread open and defer to a Maintainer or Project Lead's final judgement. -8. When your PR is ready to merge, a Maintainer or Project Lead will review it and suggest final changes. If those changes are minimal they may even apply them directly to speed up merging. +6. Check for typos. Bevy's CI will check for them using [typos](https://github.com/crate-ci/typos). + 1. If you use VSCode, install [Typos Spell Checker](https://marketplace.visualstudio.com/items?itemName=tekumara.typos-vscode). + 2. You can also use the cli tool. Install [typos-cli](https://github.com/crate-ci/typos?tab=readme-ov-file#install) and run `typos` to check for typos, and fix them by running `typos -w`. +7. Push your changes to your fork on Github and open a Pull Request. +8. Respond to any CI failures or review feedback. While CI failures must be fixed before we can merge your PR, you do not need to *agree* with all feedback from your reviews, merely acknowledge that it was given. If you cannot come to an agreement, leave the thread open and defer to a Maintainer or Project Lead's final judgement. +9. When your PR is ready to merge, a Maintainer or Project Lead will review it and suggest final changes. If those changes are minimal they may even apply them directly to speed up merging. If you end up adding a new official Bevy crate to the `bevy` repo: diff --git a/crates/bevy_ecs/src/schedule/executor/simple.rs b/crates/bevy_ecs/src/schedule/executor/simple.rs index 882a7736f6..7e5ce65a20 100644 --- a/crates/bevy_ecs/src/schedule/executor/simple.rs +++ b/crates/bevy_ecs/src/schedule/executor/simple.rs @@ -133,7 +133,7 @@ fn evaluate_and_fold_conditions(conditions: &mut [BoxedCondition], world: &mut W #[cfg(test)] #[test] fn skip_automatic_sync_points() { - // Schedules automatically insert appy_deferred systems, but these should + // Schedules automatically insert apply_deferred systems, but these should // not be executed as they only serve as markers and are not initialized use crate::prelude::*; let mut sched = Schedule::default(); diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000000..4e77918adc --- /dev/null +++ b/typos.toml @@ -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", +]