Skip to content

refactor(global-cli): drop redundant clippy allow attributes#2235

Open
shulaoda wants to merge 1 commit into
mainfrom
07-24-refactor_global-cli_drop_redundant_clippy_allow_attributes
Open

refactor(global-cli): drop redundant clippy allow attributes#2235
shulaoda wants to merge 1 commit into
mainfrom
07-24-refactor_global-cli_drop_redundant_clippy_allow_attributes

Conversation

@shulaoda

Copy link
Copy Markdown
Member

Problem

crates/vite_global_cli/src/shim/dispatch.rs had six function-level clippy #[allow(...)] attributes (on get_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 suppressing clippy::disallowed_types and/or clippy::disallowed_macros.

But main.rs already suppresses those lints for the whole crate:

#![allow(
    clippy::allow_attributes,
    clippy::disallowed_macros,
    clippy::disallowed_methods,
    clippy::disallowed_types,
    clippy::print_stderr,
    clippy::print_stdout
)]

A crate-level inner #![allow(...)] propagates to all descendant modules (dispatch.rs is one), so the per-fn attributes are dead. They lingered because clippy::allow_attributes — the lint that would flag a redundant #[allow] — is itself crate-allowed.

@netlify

netlify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 279c8b7
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a638a92cf1229000866bcee

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

Successfully merging this pull request may close these issues.

1 participant