-
Notifications
You must be signed in to change notification settings - Fork 218
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
refactor: clippy fixes and working doctests #834
Conversation
690c1b4
to
4897fe3
Compare
packages/wm/src/containers/commands/flatten_child_split_containers.rs
Outdated
Show resolved
Hide resolved
This is super nice!! Been meaning to add clippy linting for ages 🙌 Would you happen to know what the recommended command would be to to add linting to CI? |
Not sure how to add it to CI, but it can be manually run via Can be added to the tool chain via on: push
name: Clippy check
# Make sure CI fails on all warnings, including Clippy lints
env:
RUSTFLAGS: "-Dwarnings"
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Clippy
run: cargo clippy --all-targets --all-features
Example taken from here |
Merged 👍 Will look into getting rid of those unused var warnings - would be super nice to enforce these lints for PR's. Ty for the info on adding it to CI! |
🎉 This PR is included in version 3.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Linting
Fixes most lint errors provided by clippy
Unused variables / functions have not been fixed
Clippy detects
needless_return
on bothmain
functions, which I believe is caused by#[tokio::main]
, so these have been supressed.Doctests
The following are no longer run:
wm\src\containers\commands\flatten_child_split_containers.rs:11
:flatten_child_split_containers
has been ignoredwm\src\common\platform\platform.rs:340
:parse_command
has been set tono_run
as it requires files to exist on the test machine.The following have been fixed so that they can be compiled and ran:
wm\src\common\tiling_direction.rs:19
:inverse
wm\src\common\tiling_direction.rs:35
:from_direction
wm\src\common\tiling_direction.rs:54
:from_str
wm\src\common\direction.rs:19
:inverse
wm\src\common\direction.rs:40
:from_str
wm\src\common\length_value.rs:52
:from_str