Skip to content

Commit

Permalink
ci: Add spellcheck to CI
Browse files Browse the repository at this point in the history
This commit adds a spellchecker to the CI pipeline. This prevents typos
from being made in future commits.

See also: rust-windowing/winit#3557

Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull authored Mar 13, 2024
1 parent d5f4783 commit bd2cc62
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
branches: [master]

jobs:
Check_Formatting:
fmt:
name: Tidy Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -16,9 +17,17 @@ jobs:
components: rustfmt
- name: Check Formatting
run: cargo +stable fmt --all -- --check
- uses: taiki-e/install-action@v2
with:
tool: typos-cli
- name: Check Formatting
run: cargo fmt --all -- --check
- name: Run Typos
run: typos

miri-tests:
runs-on: ubuntu-latest
needs: fmt
steps:
- uses: actions/checkout@v4
- uses: hecrj/setup-rust-action@v2
Expand All @@ -30,6 +39,7 @@ jobs:

tests:
name: Tests
needs: fmt
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions src/backends/wayland/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ fn create_memfile() -> File {
}
}

panic!("Failed to generate non-existant shm name")
panic!("Failed to generate non-existent shm name")
}

// Round size to use for pool for given dimentions, rounding up to power of 2
// Round size to use for pool for given dimensions, rounding up to power of 2
fn get_pool_size(width: i32, height: i32) -> i32 {
((width * height * 4) as u32).next_power_of_two() as i32
}
Expand Down

0 comments on commit bd2cc62

Please sign in to comment.