Skip to content

Commit

Permalink
chore: Add spellcheck to CI
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
notgull committed Mar 3, 2024
1 parent 5e5dbed commit 70d293f
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -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"]
}
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
fmt:
name: Check Formatting
name: Tidy Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

## 0.4.1 (2021-11-19)

* Added an impl of `HasRawWindowHandle` for `&T`, `Rc<T>`, and `Arc<T>`. The impls for `Rc<T>` and `Arc<T>` require the `alloc` feature.
* Added an impl of `HasRawWindowHandle` for `&T`, `Rc<T>`, and `Arc<T>`. The implementations for `Rc<T>` and `Arc<T>` require the `alloc` feature.

## 0.4.0 (2021-11-15)

Expand Down
27 changes: 27 additions & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down

0 comments on commit 70d293f

Please sign in to comment.