-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
lint: fix lints of new Rust version #6102
Conversation
Heres the action's log about failure, but it doesn't happen on my Debian testing.
It only happend on freebsd target I think. |
clippy::suspicious_open_options
|
could you please fix the windows clippy warnings too as you are working on it ? |
I'll fix it later |
Here's a lots of denied warnings about
and the longest is
There are two solutions
|
GNU testsuite comparison:
|
I think add So I'll add |
Use `std::path::MAIN_SEPARATOR_STR` instead of `std::path::MAIN_SEPARATOR`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Can be merged in my opinion, but I do have a few questions.
@@ -1,2 +1,2 @@ | |||
msrv = "1.70.0" | |||
cognitive-complexity-threshold = 10 | |||
cognitive-complexity-threshold = 24 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait this was super low all this time??? No wonder it was so annoying. Let's just remove this line; the default value is 25 according to the documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sylvestre I see that you introduced the lower value. I think 10 is a bit too low, but I'm happy to compromise on something inbetween as well. I think the problem with 10 is that it's a good hint that a function is too complex, but too restrictive to enforce.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, it was to identify too long/complex functions. I am happy where we are now with 25
thanks
Fix new lints of clippy.