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

Clippy fixes #10113

Closed
wants to merge 2 commits into from
Closed

Clippy fixes #10113

wants to merge 2 commits into from

Conversation

catenacyber
Copy link
Contributor

Link to redmine ticket:
None

Describe changes:

  • rust: fix clippy warnings for assertions_on_constants

@jasonish why do I get these and CI is not red ?
Because I am using a newer clippy ?

I also have others like zero_prefixed_literal

Which will be optimized away by the compiler
using panic! instead with a string message
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 43 lines in your changes are missing coverage. Please review.

Comparison is base (5cc872f) 82.19% compared to head (22f8b39) 82.11%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10113      +/-   ##
==========================================
- Coverage   82.19%   82.11%   -0.09%     
==========================================
  Files         975      974       -1     
  Lines      271940   271869      -71     
==========================================
- Hits       223523   223242     -281     
- Misses      48417    48627     +210     
Flag Coverage Δ
fuzzcorpus 62.70% <ø> (-0.23%) ⬇️
suricata-verify 61.41% <ø> (-0.02%) ⬇️
unittests 62.83% <76.11%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@jasonish
Copy link
Member

jasonish commented Jan 4, 2024

@jasonish why do I get these and CI is not red ?

I don't think CI does --all-targets, maybe it should, once we're all-targets clean that is.

@catenacyber
Copy link
Contributor Author

I do cargo clippy --fix --allow-dirty
I do not do --all-targets
🤔

@jasonish
Copy link
Member

jasonish commented Jan 4, 2024

I do cargo clippy --fix --allow-dirty I do not do --all-targets 🤔

ci also does --all-features

@catenacyber
Copy link
Contributor Author

Still get it with cargo clippy --all-features --fix --allow-dirty

@catenacyber
Copy link
Contributor Author

cargo clippy --version
clippy 0.1.75 (49691b1f 2023-10-16)

@jasonish
Copy link
Member

jasonish commented Jan 4, 2024

I think those lints are reported in CI, they just don't make edits so we don't fail out on them. Is that the difference?

@catenacyber
Copy link
Contributor Author

So clippy does not return 0 (maybe because we have 2 crates (derive and suricata) in our worskspace ? )

see rust-lang/rust-clippy#1209

@jasonish
Copy link
Member

jasonish commented Jan 4, 2024

Still probably good to make it clean for when running cargo clippy --fix.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 17340

@catenacyber catenacyber mentioned this pull request Jan 5, 2024
@catenacyber
Copy link
Contributor Author

Continued in #10124

@catenacyber catenacyber closed this Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants