refactor(global-cli): drop redundant clippy allow attributes#2235
Open
shulaoda wants to merge 1 commit into
Open
refactor(global-cli): drop redundant clippy allow attributes#2235shulaoda wants to merge 1 commit into
shulaoda wants to merge 1 commit into
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
crates/vite_global_cli/src/shim/dispatch.rshad six function-level clippy#[allow(...)]attributes (onget_npm_global_prefix,check_npm_global_install_result,dedup_missing_bins,remove_npm_global_uninstall_links,read_npm_package_json,collect_bin_names_from_npm), all suppressingclippy::disallowed_typesand/orclippy::disallowed_macros.But
main.rsalready suppresses those lints for the whole crate:A crate-level inner
#![allow(...)]propagates to all descendant modules (dispatch.rsis one), so the per-fn attributes are dead. They lingered becauseclippy::allow_attributes— the lint that would flag a redundant#[allow]— is itself crate-allowed.