Skip to content

Commit

Permalink
ci: run clippy and test on subcrates (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroo authored Jun 28, 2023
1 parent 1f63e76 commit 6eecb8d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 22 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
paths:
- Cargo.*
- src/**/*
- keyberon/**/*
- cfg_samples/**/*
- parser/**/*
- test_cfgs/**/*
- .github/workflows/**/*
pull_request:
Expand All @@ -15,6 +17,7 @@ on:
- Cargo.*
- src/**/*
- keyberon/**/*
- parser/**/*
- cfg_samples/**/*
- test_cfgs/**/*
- .github/workflows/**/*
Expand Down Expand Up @@ -42,13 +45,13 @@ jobs:
workspaces: ./
- run: rustup component add clippy
- name: Run tests
run: cargo test --verbose
run: cargo test --verbose -p kanata -p kanata-parser -p kanata-keyberon
- name: Run tests all features
run: cargo test --all-features --verbose
run: cargo test --all-features --verbose -p kanata -p kanata-parser -p kanata-keyberon
- name: Run clippy no features
run: cargo clippy -- -D warnings
run: cargo clippy --all -- -D warnings
- name: Run clippy all features
run: cargo clippy --all-features -- -D warnings
run: cargo clippy --all --all-features -- -D warnings

build-test-clippy-windows:
runs-on: windows-latest
Expand All @@ -64,10 +67,10 @@ jobs:
workspaces: ./
- run: rustup component add clippy
- name: Run tests
run: cargo test --verbose
run: cargo test --verbose -p kanata -p kanata-parser -p kanata-keyberon
- name: Run tests all features
run: cargo test --all-features --verbose
run: cargo test --all-features --verbose -p kanata -p kanata-parser -p kanata-keyberon
- name: Run clippy no features
run: cargo clippy
run: cargo clippy --all -- -D warnings
- name: Run clippy all features
run: cargo clippy --all-features
run: cargo clippy --all --all-features -- -D warnings
28 changes: 14 additions & 14 deletions parser/src/cfg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@
//!
//! If the mapped keys are defined as:
//!
//! (defsrc
//! esc 1 2 3 4
//! )
//! (defsrc
//! esc 1 2 3 4
//! )
//!
//! and the layers are:
//!
//! (deflayer one
//! _ a s d _
//! )
//! (deflayer one
//! _ a s d _
//! )
//!
//! (deflayer two
//! _ a o e _
//! )
//! (deflayer two
//! _ a o e _
//! )
//!
//! Then the keyberon layers will be as follows:
//!
//! xx means unimportant and _ means transparent.
//! (xx means unimportant and _ means transparent)
//!
//! layers[0] = { xx, esc, a, s, d, 4, xx... }
//! layers[1] = { xx, _ , a, s, d, _, xx... }
//! layers[2] = { xx, esc, a, o, e, 4, xx... }
//! layers[3] = { xx, _ , a, o, e, _, xx... }
//! layers[0] = { xx, esc, a, s, d, 4, xx... }
//! layers[1] = { xx, _ , a, s, d, _, xx... }
//! layers[2] = { xx, esc, a, o, e, 4, xx... }
//! layers[3] = { xx, _ , a, o, e, _, xx... }
//!
//! Note that this example isn't practical, but `(defsrc esc 1 2 3 4)` is used because these keys
//! are at the beginning of the array. The column index for layers is the numerical value of
Expand Down

0 comments on commit 6eecb8d

Please sign in to comment.