Skip to content
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

Introduce typos auto-checker on CI (written in Rust btw) #634

Merged
merged 6 commits into from
Mar 21, 2024

Conversation

Veetaha
Copy link
Contributor

@Veetaha Veetaha commented Mar 17, 2024

Typos CLI repo link.

Made this new CI check required to pass for merging PRs.

Here is the full typos report output from typos CLI call:

error: `descibes` should be `describes`
  --> ./CONTRIBUTING.md:23:81
   |
23 | When reporting a bug or unexpected behaviour in a project, make sure your issue descibes steps to reproduce the behaviour, including the platform you were using, what steps you took, and any error messages.
   |                                                                                 ^^^^^^^^
   |
error: `identifers` should be `identifiers`
  --> ./src/advisories.rs:121:27
    |
121 |     // Check for advisory identifers that were set to be ignored, but
    |                           ^^^^^^^^^^
    |
error: `identifers` should be `identifiers`
  --> ./src/advisories.rs:129:27
    |
129 |     // Check for advisory identifers that were set to be ignored, but
    |                           ^^^^^^^^^^
    |
error: `enountered` should be `encountered`
  --> ./src/bans/diags.rs:240:61
    |
240 |             .with_message("wrapper for banned crate was not enountered")
    |                                                             ^^^^^^^^^^
    |
error: `occured` should be `occurred`
  --> ./docs/src/checks/bans/diags.md:97:14
   |
97 | An I/O error occured when opening or reading a file from disk.
   |              ^^^^^^^
   |
error: `overriden` should be `overridden`
  --> ./src/bans/cfg.rs:345:24
    |
345 |     /// crates, can be overriden in `features` on a crate by crate basis
    |                        ^^^^^^^^^
    |
error: `overriden` should be `overridden`
  --> ./src/bans/cfg.rs:348:9
    |
348 |     /// overriden in `features` on a crate by crate basis
    |         ^^^^^^^^^
    |
error: `isntead` should be `instead`
  --> ./examples/08_target_filtering/Cargo.toml:32:40
   |
32 | # You can also use full target triples isntead of a cfg expression
   |                                        ^^^^^^^
   |
error: `targetting` should be `targeting`
  --> ./examples/08_target_filtering/Cargo.toml:33:60
   |
33 | # We actually **ban** the nix package, but since we aren't targetting
   |                                                            ^^^^^^^^^^
   |
error: `Encourge` should be `Encourage`
  --> ./src/cfg/package_spec.rs:76:24
   |
76 |                     // Encourge user to use the 'crate' spec instead
   |                        ^^^^^^^^
   |
error: `targetting` should be `targeting`
  --> ./examples/08_target_filtering/deny.toml:13:37
   |
13 |     # because it is only built when targetting x86_64-unknown-linux-musl,
   |                                     ^^^^^^^^^^
   |
error: `targetting` should be `targeting`
  --> ./examples/08_target_filtering/README.md:16:466
   |
16 | By default, cargo resolves every single dependency, including for target specific dependencies. However, it's unlikely that your project is actually built for all (143 at the time of this writing) targets that are built in to rustc itself, which means that there may be crates in your graph that are never actually compiled or used in any way. By specifying the `targets = []` configuration in your `deny.toml`, you can specify a list of targets you _actually_ are targetting, removing any crates that don't match at least 1 of the targets you specify.
   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ^^^^^^^^^^
   |
error: `impelemented` should be `implemented`
  --> ./examples/09_bans/Cargo.toml:11:6
   |
11 | # is impelemented via openssl-sys on linux
   |      ^^^^^^^^^^^^
   |
error: `impelemented` should be `implemented`
  --> ./examples/09_bans/README.md:12:6
   |
12 | # is impelemented via openssl-sys on linux
   |      ^^^^^^^^^^^^
   |
error: `examle` should be `example`
  --> ./examples/09_bans/README.md:45:6
   |
45 | This examle shows how the `bans` check works. `reqwest` by default uses native-tls, which on linux uses openssl. But we've decided to **deny** openssl, so adding a dependency on it triggers the lint. It also happens to pull in multiple
   |      ^^^^^^
   |
error: `peform` should be `perform`
  --> ./src/advisories/helpers/db.rs:450:54
    |
450 |         // If we didn't open a fresh repo we need to peform a fetch ourselves, and
    |                                                      ^^^^^^
    |
error: `compatiblity` should be `compatibility`
  --> ./src/advisories/helpers/db.rs:534:23
    |
534 |     /// For backwards compatiblity with cargo-audit, we optionally serialize the
    |                       ^^^^^^^^^^^^
    |
error: `nam` should be `name`
  --> ./src/advisories/helpers/db.rs:741:70
    |
741 |             let url = Url::parse("https://example.com/countries/việt nam").unwrap();
    |                                                                      ^^^
    |
error: `aheared` should be `adhered`
  --> ./tests/LICENSE-RING:116:33
    |
116 |  * the following conditions are aheared to.  The following conditions
    |                                 ^^^^^^^
    |
error: `rouines` should be `routines`
  --> ./tests/LICENSE-RING:141:55
    |
141 |  *    The word 'cryptographic' can be left out if the rouines from the library
    |                                                       ^^^^^^^
    |
error: `publically` should be `publicly`
  --> ./tests/LICENSE-RING:159:47
    |
159 |  * The licence and distribution terms for any publically available version or
    |                                               ^^^^^^^^^^
    |
error: `furst` should be `first`
  --> ./src/advisories/cfg.rs:966:52
    |
966 |                     expand!(exp, "FIRST", Ok(Some("furst".into())))
    |                                                    ^^^^^
    |
error: `secund` should be `second`
  --> ./src/advisories/cfg.rs:968:53
    |
968 |                     expand!(exp, "SECOND", Ok(Some("secund".into())))
    |                                                     ^^^^^^
    |
error: `overriden` should be `overridden`
  --> ./tests/feature_bans.rs:158:49
    |
158 | /// Ensures that a workspace default ban can be overriden by a crate specific allow = 'default'
    |                                                 ^^^^^^^^^
    |
error: `overriden` should be `overridden`
  --> ./tests/feature_bans.rs:207:49
    |
207 | /// Ensures that a workspace default ban can be overriden by a crate specific allow = 'default'
    |                                                 ^^^^^^^^^
    |
error: `dependendencies` should be `dependencies`
  --> ./tests/bans.rs:154:22
    |
154 | /// Ensures that dev dependendencies are ignored
    |                      ^^^^^^^^^^^^^^^
    |
error: `deprected` should be `deprecated`
  --> ./src/cargo-deny/main.rs:250:18
    |
250 |         // we've deprected it and it will go away at some point
    |                  ^^^^^^^^^
    |
error: `enountered` should be `encountered`
  --> ./tests/snapshots/bans__warns_on_unused_wrappers.snap:64:52
   |
64 |       "message": "wrapper for banned crate was not enountered",
   |                                                    ^^^^^^^^^^
   |
error: `strat` should be `start`, `strata`
  --> ./src/licenses/gather.rs:204:9
    |
204 |         strat: &askalono::ScanStrategy<'_>,
    |         ^^^^^
    |
error: `strat` should be `start`, `strata`
  --> ./src/licenses/gather.rs:240:27
    |
240 |                     match strat.scan(&text) {
    |                           ^^^^^
    |
error: `lables` should be `labels`
  --> ./src/licenses/gather.rs:756:49
    |
756 |                         Err((new_toml, lic_file_lables)) => {
    |                                                 ^^^^^^
    |
error: `lables` should be `labels`
  --> ./src/licenses/gather.rs:771:51
    |
771 |                             for label in lic_file_lables {
    |                                                   ^^^^^^
    |
error: `enountered` should be `encountered`
  --> ./tests/snapshots/bans__disallows_denied_with_wrapper.snap:122:52
    |
122 |       "message": "wrapper for banned crate was not enountered",
    |                                                    ^^^^^^^^^^
    |
error: `reqest` should be `request`
  --> ./tests/test_data/features/Cargo.toml:7:1
  |
7 | reqest = { version = "0.11", package = "reqwest", default-features = false, optional = true, features = [
  | ^^^^^^
  |
error: `reqest` should be `request`
  --> ./tests/test_data/features/Cargo.toml:18:1
   |
18 | reqest = { version = "0.11", package = "reqwest", default-features = false, optional = true, features = [
   | ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features/Cargo.toml:24:24
   |
24 | blocking = ["simple", "reqest?/blocking"]
   |                        ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features/Cargo.toml:25:10
   |
25 | json = ["reqest?/json"]
   |          ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features/Cargo.toml:26:15
   |
26 | multipart = ["reqest?/multipart"]
   |               ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features/Cargo.toml:29:12
   |
29 | stream = ["reqest?/stream"]
   |            ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features/Cargo.toml:30:32
   |
30 | zlib = ["git/zlib-ng-compat", "reqest?/deflate"]
   |                                ^^^^^^
   |
error: `overriden` should be `overridden`
  --> ./src/diag/sink.rs:41:68
   |
41 | /// Each diagnostic will have a default severity, but these can be overriden
   |                                                                    ^^^^^^^^^
   |
error: `databses` should be `databases`
  --> ./CHANGELOG.md:373:91
    |
373 | - `advisories.db-url` has been deprecated in favor of `advisories.db-urls` since multiple databses are now supported.
    |                                                                                           ^^^^^^^^
    |
error: `slighly` should be `slightly`
  --> ./CHANGELOG.md:434:37
    |
434 | - Upgraded to rustsec 0.18.0, which slighly reworks how yanked crate detection is done
    |                                     ^^^^^^^
    |
error: `reqest` should be `request`
  --> ./tests/test_data/features-galore/Cargo.toml:8:1
  |
8 | reqest = { version = "0.11", package = "reqwest", default-features = false, optional = true, features = [
  | ^^^^^^
  |
error: `reqest` should be `request`
  --> ./tests/test_data/features-galore/Cargo.toml:25:1
   |
25 | reqest = { version = "0.11", package = "reqwest", default-features = false, optional = true, features = [
   | ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features-galore/Cargo.toml:34:24
   |
34 | blocking = ["simple", "reqest?/blocking"]
   |                        ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features-galore/Cargo.toml:35:10
   |
35 | json = ["reqest?/json"]
   |          ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features-galore/Cargo.toml:37:15
   |
37 | multipart = ["reqest?/multipart"]
   |               ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features-galore/Cargo.toml:41:12
   |
41 | stream = ["reqest?/stream"]
   |            ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features-galore/Cargo.toml:42:27
   |
42 | tls = ["tls-no-reqwest", "reqest?/rustls-tls"]
   |                           ^^^^^^
   |
error: `reqest` should be `request`
  --> ./tests/test_data/features-galore/Cargo.toml:44:32
   |
44 | zlib = ["git/zlib-ng-compat", "reqest?/deflate"]
   |                                ^^^^^^
   |
error: `existant` should be `existent`
  --> ./tests/test_data/wildcards/allow-git/Cargo.toml:13:35
   |
13 | # An arbitrary choice of actually existant Git repository
   |                                   ^^^^^^^^
   |

@Veetaha Veetaha requested a review from Jake-Shadle as a code owner March 17, 2024 13:59
@Jake-Shadle Jake-Shadle merged commit 621ff39 into EmbarkStudios:main Mar 21, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants