Skip to content
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

FIx Cargo Clippy Warnings #430

Open
xieyuschen opened this issue Oct 3, 2024 · 3 comments
Open

FIx Cargo Clippy Warnings #430

xieyuschen opened this issue Oct 3, 2024 · 3 comments

Comments

@xieyuschen
Copy link
Contributor

xieyuschen commented Oct 3, 2024

Currently, cargo clippy under the root returns many warnings about the project, I propose we can follow the suggestions from rust clippy and resolve them.

Many comments violate the first doc comment paragraph is too long rules because they don't have a short and brief introduction as the first doc comment.

I plan to fix them gradually, on the way of learning and understanding more about iceoryx2 codebase. Moreover, I will try to put the doc fixing in separated PRs for better reviewing(it may take efforts for reviewing because of the in-accurate statements).

@xieyuschen xieyuschen changed the title FIx Cargo Clippy Complains FIx Cargo Clippy Warnings Oct 3, 2024
xieyuschen added a commit to xieyuschen/iceoryx2 that referenced this issue Oct 3, 2024
…ryx2

* the change is done by running 'cargo clippy --fix --lib -p iceoryx2'
@elfenpiff
Copy link
Contributor

@xieyuschen Thanks for opening the issue. Could you share the cargo clippy command you used to receive those warnings? I am asking since when I run cargo clippy from main I got no warnings at all.

@xieyuschen
Copy link
Contributor Author

xieyuschen commented Oct 3, 2024

@xieyuschen Thanks for opening the issue. Could you share the cargo clippy command you used to receive those warnings? I am asking since when I run cargo clippy from main I got no warnings at all.

@elfenpiff only put a part of the output of cargo clippy.

➜  iceoryx2 git:(main) cargo --version       
cargo 1.83.0-nightly (80d82ca22 2024-09-27)
➜  iceoryx2 git:(main) cargo clippy --version
clippy 0.1.83 (06bb8364 2024-10-01)
➜  iceoryx2 git:(main) git rev-parse HEAD
6d25b61fd679e94044f6142e8af5b2106bf8facf

➜  iceoryx2 git:(main) cargo clippy
warning: first doc comment paragraph is too long
   --> iceoryx2-pal/concurrency-sync/src/iox_atomic.rs:134:1
    |
134 | / /// iceoryx2 implementation of an atomic that has an internal [`RwLockWriterPreference`].
135 | | /// It enables atomic operations on platforms that do not support them with the restriction that
136 | | /// those operations are no longer lock-free.
    | |_
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
    = note: `#[warn(clippy::too_long_first_doc_paragraph)]` on by default
help: add an empty line
...

xieyuschen added a commit to xieyuschen/iceoryx2 that referenced this issue Oct 3, 2024
…ryx2

* the change is done by running 'cargo clippy --fix --lib -p iceoryx2'
@elfenpiff
Copy link
Contributor

@xieyuschen Thanks, you reminded me that I need to call rustup update again ;)

xieyuschen added a commit to xieyuschen/iceoryx2 that referenced this issue Oct 3, 2024
…ryx2

* the change is done by running 'cargo clippy --fix --lib -p iceoryx2'
elBoberido added a commit that referenced this issue Oct 3, 2024
[#430] Fix clippy single match warning in package iceoryx2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants