You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the last two toolchain updates, I had to contend with new Clippy warnings. Rather than clean up all existing code, I wound up suppressing some. It would be great to get these turned back on, either at the workspace level, or in individual crates (as an incremental step).
The warnings that are currently globally suppressed, but probably should not be, are:
clippy::missing_safety_doc -- our intention is to have safety docs on every unsafe operation and every unsafe block, to simplify auditing. We don't currently.
clippy::too_many_arguments -- if individual functions really believe they need that many arguments, they can suppress the warning on just the function.
clippy::identity_op -- may indicate a logic error, easy to suppress locally if it does not.
clippy::manual_inspect -- inspect became stable on more APIs a while back and should generally be preferred to map if you're just looking at the data passing by -- it makes it harder to accidentally alter it, and should be easier for the compiler to simplify.
clippy::single_match -- in almost every case if let is preferable, and this can be suppressed in the very rare cases where a match is right (example: generated code)
And just to get out of the habit of suppressing Clippy warnings, we will eventually also want to deal with these, but they're more work since they require rewrapping/flowing comments -- and Clippy and (neo)vim disagree on how to flow Markdown, so you have to do it manually.
clippy::too_long_first_doc_paragraph -- possibly my least favorite Clippy lint, this has developed opinions about how long the initial sentence in your docs can be
clippy::doc_lazy_continuation -- this is slightly more important, it catches improperly constructed bulleted list in doc comments.
The text was updated successfully, but these errors were encountered:
During the last two toolchain updates, I had to contend with new Clippy warnings. Rather than clean up all existing code, I wound up suppressing some. It would be great to get these turned back on, either at the workspace level, or in individual crates (as an incremental step).
The warnings that are currently globally suppressed, but probably should not be, are:
clippy::missing_safety_doc
-- our intention is to have safety docs on every unsafe operation and every unsafe block, to simplify auditing. We don't currently.clippy::wildcard_imports
-- see Removing wildcard imports kind of stalled out. #1894 for specific tracking on thisclippy::too_many_arguments
-- if individual functions really believe they need that many arguments, they can suppress the warning on just the function.clippy::identity_op
-- may indicate a logic error, easy to suppress locally if it does not.clippy::manual_inspect
--inspect
became stable on more APIs a while back and should generally be preferred tomap
if you're just looking at the data passing by -- it makes it harder to accidentally alter it, and should be easier for the compiler to simplify.clippy::single_match
-- in almost every caseif let
is preferable, and this can be suppressed in the very rare cases where amatch
is right (example: generated code)And just to get out of the habit of suppressing Clippy warnings, we will eventually also want to deal with these, but they're more work since they require rewrapping/flowing comments -- and Clippy and (neo)vim disagree on how to flow Markdown, so you have to do it manually.
clippy::too_long_first_doc_paragraph
-- possibly my least favorite Clippy lint, this has developed opinions about how long the initial sentence in your docs can beclippy::doc_lazy_continuation
-- this is slightly more important, it catches improperly constructed bulleted list in doc comments.The text was updated successfully, but these errors were encountered: