mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:55:08 +00:00
Use #[expect(lint)]
over #[allow(lint)]
where possible (#17822)
This commit is contained in:
parent
8535af8516
commit
fa628018b2
148 changed files with 221 additions and 268 deletions
|
@ -98,7 +98,7 @@ pub struct FixerResult<'a> {
|
|||
}
|
||||
|
||||
/// Generate [`Message`]s from the source code contents at the given `Path`.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[expect(clippy::too_many_arguments)]
|
||||
pub fn check_path(
|
||||
path: &Path,
|
||||
package: Option<PackageRoot<'_>>,
|
||||
|
@ -538,7 +538,6 @@ fn diagnostics_to_messages(
|
|||
|
||||
/// Generate `Diagnostic`s from source code content, iteratively fixing
|
||||
/// until stable.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn lint_fix<'a>(
|
||||
path: &Path,
|
||||
package: Option<PackageRoot<'_>>,
|
||||
|
@ -672,7 +671,7 @@ fn collect_rule_codes(rules: impl IntoIterator<Item = Rule>) -> String {
|
|||
.join(", ")
|
||||
}
|
||||
|
||||
#[allow(clippy::print_stderr)]
|
||||
#[expect(clippy::print_stderr)]
|
||||
fn report_failed_to_converge_error(path: &Path, transformed: &str, messages: &[Message]) {
|
||||
let codes = collect_rule_codes(messages.iter().filter_map(Message::rule));
|
||||
if cfg!(debug_assertions) {
|
||||
|
@ -705,7 +704,7 @@ This indicates a bug in Ruff. If you could open an issue at:
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::print_stderr)]
|
||||
#[expect(clippy::print_stderr)]
|
||||
fn report_fix_syntax_error(
|
||||
path: &Path,
|
||||
transformed: &str,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue