From 70d293f1ddc03b7c1dc70b79f8f261e7c206e576 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Sun, 3 Mar 2024 10:01:19 -0800 Subject: [PATCH 1/4] chore: Add spellcheck to CI In order to ensure that typos are not introduced in future commits, this commit adds a spellchecker to CI. See also: rust-windowing/winit#3557 Signed-off-by: John Nunley --- .cspell.json | 13 +++++++++++++ .github/workflows/ci.yml | 5 ++++- CHANGELOG.md | 2 +- project-words.txt | 27 +++++++++++++++++++++++++++ src/lib.rs | 2 +- 5 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 .cspell.json create mode 100644 project-words.txt diff --git a/.cspell.json b/.cspell.json new file mode 100644 index 0000000..3bd5b21 --- /dev/null +++ b/.cspell.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", + "version": "0.2", + "dictionaryDefinitions": [ + { + "name": "project-words", + "path": "./project-words.txt", + "addWords": true + } + ], + "dictionaries": ["project-words"], + "ignorePaths": ["/target", "/project-words.txt"] +} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9caf99a..5a6e41c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ env: jobs: fmt: - name: Check Formatting + name: Tidy Code runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -23,9 +23,12 @@ jobs: components: rustfmt - name: Check Formatting run: cargo fmt --all -- --check + - name: Check Spelling + run: npx -y cspell --no-progress --no-summary '**/*.rs' '**/*.md' tests: name: Tests + needs: fmt # `raw-window-handle` only has `cfg` guards for Android, so we just run Ubuntu # and manually test Android runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b439e5..3e8405e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ ## 0.4.1 (2021-11-19) -* Added an impl of `HasRawWindowHandle` for `&T`, `Rc`, and `Arc`. The impls for `Rc` and `Arc` require the `alloc` feature. +* Added an impl of `HasRawWindowHandle` for `&T`, `Rc`, and `Arc`. The implementations for `Rc` and `Arc` require the `alloc` feature. ## 0.4.0 (2021-11-15) diff --git a/project-words.txt b/project-words.txt new file mode 100644 index 0000000..0e04b5d --- /dev/null +++ b/project-words.txt @@ -0,0 +1,27 @@ +Borrowable +GWLP +HINSTANCE +HWND +Osspial +Winit +Xlib +alloc +appkit +bindgen +docsrs +fltk +glfw +glutin +hwnd +icrate +macabi +madsmtm +objc +orbclient +repr +structs +tvos +visualid +watchos +wgpu +xros diff --git a/src/lib.rs b/src/lib.rs index ef3871b..558800a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -159,7 +159,7 @@ pub enum RawWindowHandle { /// /// ## Availability Hints /// This variant is present regardless of windowing backend and likely to be used with - /// EGL_MESA_platfrom_gbm or EGL_KHR_platfrom_gbm. + /// EGL_MESA_platform_gbm or EGL_KHR_platform_gbm. Gbm(GbmWindowHandle), /// A raw window handle for Win32. /// From 39415793fff443dce37b70d3080c6de305053395 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Mon, 11 Mar 2024 19:31:01 -0700 Subject: [PATCH 2/4] ci: Change from cspell to typos-cli Signed-off-by: John Nunley --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a6e41c..ac48bc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,13 @@ jobs: with: rust-version: stable components: rustfmt + - uses: taiki-e/install-action@v2 + with: + tool: typos-cli - name: Check Formatting run: cargo fmt --all -- --check - - name: Check Spelling - run: npx -y cspell --no-progress --no-summary '**/*.rs' '**/*.md' + - name: Run Typos + run: typos tests: name: Tests From 7e11ec44c4f3d0b47e4425571a83f4ee544335b2 Mon Sep 17 00:00:00 2001 From: John Nunley Date: Mon, 11 Mar 2024 19:32:07 -0700 Subject: [PATCH 3/4] chore: Remove cspell-related files Signed-off-by: John Nunley --- .cspell.json | 13 ------------- project-words.txt | 27 --------------------------- 2 files changed, 40 deletions(-) delete mode 100644 .cspell.json delete mode 100644 project-words.txt diff --git a/.cspell.json b/.cspell.json deleted file mode 100644 index 3bd5b21..0000000 --- a/.cspell.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", - "version": "0.2", - "dictionaryDefinitions": [ - { - "name": "project-words", - "path": "./project-words.txt", - "addWords": true - } - ], - "dictionaries": ["project-words"], - "ignorePaths": ["/target", "/project-words.txt"] -} \ No newline at end of file diff --git a/project-words.txt b/project-words.txt deleted file mode 100644 index 0e04b5d..0000000 --- a/project-words.txt +++ /dev/null @@ -1,27 +0,0 @@ -Borrowable -GWLP -HINSTANCE -HWND -Osspial -Winit -Xlib -alloc -appkit -bindgen -docsrs -fltk -glfw -glutin -hwnd -icrate -macabi -madsmtm -objc -orbclient -repr -structs -tvos -visualid -watchos -wgpu -xros From 0f9a45afaf5e217f7db66eaedfd7ff303aa7dfca Mon Sep 17 00:00:00 2001 From: John Nunley Date: Mon, 11 Mar 2024 20:47:13 -0700 Subject: [PATCH 4/4] chore: Revert 'impls -> implementations' fix Signed-off-by: John Nunley --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e8405e..6b439e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ ## 0.4.1 (2021-11-19) -* Added an impl of `HasRawWindowHandle` for `&T`, `Rc`, and `Arc`. The implementations for `Rc` and `Arc` require the `alloc` feature. +* Added an impl of `HasRawWindowHandle` for `&T`, `Rc`, and `Arc`. The impls for `Rc` and `Arc` require the `alloc` feature. ## 0.4.0 (2021-11-15)