diff --git a/Cargo.toml b/Cargo.toml index d42b434794d94..7ad633d820d61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,8 +69,11 @@ too_many_lines = "allow" must_use_candidate = "allow" # Too annoying, we import by name anyway. wildcard_imports = "allow" -# used_underscore_binding= "allow" doc_markdown = "allow" +similar_names = "allow" +fn_params_excessive_bools = "allow" +complexity = { level = "warn", priority = -1 } +too_many_arguments = "allow" # nursery nursery = { level = "warn", priority = -1 } # `const` functions do not make sense for our project because this is not a `const` library. diff --git a/apps/oxlint/src/command/lint.rs b/apps/oxlint/src/command/lint.rs index 48bf4dae26a7c..7600192e490af 100644 --- a/apps/oxlint/src/command/lint.rs +++ b/apps/oxlint/src/command/lint.rs @@ -443,7 +443,6 @@ mod lint_options { } #[test] - #[expect(clippy::similar_names)] fn multiple_paths() { let temp_dir = tempfile::tempdir().expect("Could not create a temp dir"); let file_foo = temp_dir.path().join("foo.js"); diff --git a/crates/oxc_ast/src/ast_builder_impl.rs b/crates/oxc_ast/src/ast_builder_impl.rs index d8d388e62dab1..089b77b6204e8 100644 --- a/crates/oxc_ast/src/ast_builder_impl.rs +++ b/crates/oxc_ast/src/ast_builder_impl.rs @@ -287,7 +287,6 @@ impl<'a> AstBuilder<'a> { } /// Build a [`Function`] with `scope_id`. - #[expect(clippy::too_many_arguments)] #[inline] pub fn alloc_function_with_scope_id( self, diff --git a/crates/oxc_ast/src/generated/ast_builder.rs b/crates/oxc_ast/src/generated/ast_builder.rs index 424ec97ce2e43..28ea9b8da273a 100644 --- a/crates/oxc_ast/src/generated/ast_builder.rs +++ b/crates/oxc_ast/src/generated/ast_builder.rs @@ -3,11 +3,7 @@ //! AST node factories -#![expect( - clippy::default_trait_access, - clippy::too_many_arguments, - clippy::fn_params_excessive_bools -)] +#![expect(clippy::default_trait_access)] use std::cell::Cell; diff --git a/crates/oxc_ecmascript/src/constant_evaluation/mod.rs b/crates/oxc_ecmascript/src/constant_evaluation/mod.rs index f4e199accc060..86f745efa6821 100644 --- a/crates/oxc_ecmascript/src/constant_evaluation/mod.rs +++ b/crates/oxc_ecmascript/src/constant_evaluation/mod.rs @@ -499,7 +499,6 @@ impl<'a> ConstantEvaluation<'a> for ComputedMemberExpression<'a> { } } -#[expect(clippy::similar_names)] fn is_less_than<'a>( ctx: &impl ConstantEvaluationCtx<'a>, x: &Expression<'a>, diff --git a/crates/oxc_linter/src/module_graph_visitor.rs b/crates/oxc_linter/src/module_graph_visitor.rs index dc72760961df9..fa2381014a5a1 100644 --- a/crates/oxc_linter/src/module_graph_visitor.rs +++ b/crates/oxc_linter/src/module_graph_visitor.rs @@ -142,7 +142,6 @@ struct ModuleGraphVisitor { } impl ModuleGraphVisitor { - #[expect(clippy::too_many_arguments)] fn filter_fold_while< T, Filter: Fn(ModulePair, &ModuleRecord) -> bool, @@ -172,7 +171,6 @@ impl ModuleGraphVisitor { .into_inner() } - #[expect(clippy::too_many_arguments)] fn filter_fold_recursive< T, Filter: Fn(ModulePair, &ModuleRecord) -> bool, diff --git a/crates/oxc_linter/src/utils/express.rs b/crates/oxc_linter/src/utils/express.rs index 602d6aa1594c1..0261098cb4771 100644 --- a/crates/oxc_linter/src/utils/express.rs +++ b/crates/oxc_linter/src/utils/express.rs @@ -46,7 +46,6 @@ pub fn as_endpoint_registration<'a, 'n>( /// /// This will yield a lot of false positives if not called on the results of /// [`as_endpoint_registration`]. -#[expect(clippy::similar_names)] pub fn is_endpoint_handler(maybe_handler: &Expression<'_>) -> bool { let params = match maybe_handler { Expression::FunctionExpression(f) => &f.params, diff --git a/crates/oxc_parser/src/js/class.rs b/crates/oxc_parser/src/js/class.rs index 9262fff6e0992..c61c580eb0bf8 100644 --- a/crates/oxc_parser/src/js/class.rs +++ b/crates/oxc_parser/src/js/class.rs @@ -384,7 +384,6 @@ impl<'a> ParserImpl<'a> { } } - #[expect(clippy::too_many_arguments, clippy::fn_params_excessive_bools)] fn parse_class_method_definition( &mut self, span: Span, @@ -449,7 +448,6 @@ impl<'a> ParserImpl<'a> { } /// `FieldDefinition`[?Yield, ?Await] ; - #[expect(clippy::too_many_arguments, clippy::fn_params_excessive_bools)] fn parse_class_property_definition( &mut self, span: Span, @@ -501,7 +499,6 @@ impl<'a> ParserImpl<'a> { } /// - #[expect(clippy::too_many_arguments, clippy::fn_params_excessive_bools)] fn parse_class_accessor_property( &mut self, span: Span, diff --git a/crates/oxc_span/src/source_type/mod.rs b/crates/oxc_span/src/source_type/mod.rs index ce9f4aee83618..75fd6a234da0a 100644 --- a/crates/oxc_span/src/source_type/mod.rs +++ b/crates/oxc_span/src/source_type/mod.rs @@ -545,7 +545,6 @@ mod tests { } #[test] - #[expect(clippy::similar_names)] fn test_d_ts_from_path() { let dts = SourceType::from_path("foo.d.ts").unwrap(); let dmts = SourceType::from_path("foo.d.mts").unwrap(); diff --git a/crates/oxc_transformer/src/common/duplicate.rs b/crates/oxc_transformer/src/common/duplicate.rs index b0451a546c0fc..a7b66247ac23f 100644 --- a/crates/oxc_transformer/src/common/duplicate.rs +++ b/crates/oxc_transformer/src/common/duplicate.rs @@ -54,7 +54,6 @@ impl<'a> TransformCtx<'a> { /// /// Returns 3 `Expression`s. The first may be an `AssignmentExpression`, /// and must be inserted into output first. - #[expect(clippy::similar_names)] pub(crate) fn duplicate_expression_twice( &self, expr: Expression<'a>, diff --git a/crates/oxc_transformer/src/es2022/class_properties/private_field.rs b/crates/oxc_transformer/src/es2022/class_properties/private_field.rs index 70bff29a4bc9e..be66badb5f5e6 100644 --- a/crates/oxc_transformer/src/es2022/class_properties/private_field.rs +++ b/crates/oxc_transformer/src/es2022/class_properties/private_field.rs @@ -2133,7 +2133,6 @@ impl<'a> ClassProperties<'a, '_> { /// * Setter: `_prop.call(_assertClassBrand(Class, object), value)` /// * Prop: `_privateFieldSet(_prop, object, value)` /// * Prop binding is `None`: `_writeOnlyError("#method")` - #[expect(clippy::too_many_arguments)] fn create_private_setter( &self, private_name: &str, diff --git a/tasks/ast_tools/src/derives/get_span.rs b/tasks/ast_tools/src/derives/get_span.rs index 097e749b31b40..b25ea6941ff7f 100644 --- a/tasks/ast_tools/src/derives/get_span.rs +++ b/tasks/ast_tools/src/derives/get_span.rs @@ -120,7 +120,6 @@ impl Derive for DeriveGetSpanMut { } /// Generate `GetSpan` / `GetSpanMut` trait implementation for a type. -#[expect(clippy::too_many_arguments)] fn derive_type( type_def: StructOrEnum, trait_ident: &Ident, @@ -149,7 +148,6 @@ fn derive_type( } /// Generate `GetSpan` / `GetSpanMut` trait implementation for a struct. -#[expect(clippy::too_many_arguments)] fn derive_struct( struct_def: &StructDef, trait_ident: &Ident, diff --git a/tasks/ast_tools/src/generators/ast_builder.rs b/tasks/ast_tools/src/generators/ast_builder.rs index 67c4e8932f177..ee83e331a2ad9 100644 --- a/tasks/ast_tools/src/generators/ast_builder.rs +++ b/tasks/ast_tools/src/generators/ast_builder.rs @@ -69,11 +69,7 @@ impl Generator for AstBuilderGenerator { //! AST node factories //!@@line_break - #![expect( - clippy::default_trait_access, - clippy::too_many_arguments, - clippy::fn_params_excessive_bools, - )] + #![expect(clippy::default_trait_access)] ///@@line_break use std::cell::Cell; @@ -192,7 +188,6 @@ fn generate_builder_methods_for_struct(struct_def: &StructDef, schema: &Schema) /// Build a pair of builder methods for a struct. /// /// This is a separate function as may need to be called twice, with and without semantic ID fields. -#[expect(clippy::too_many_arguments)] fn generate_builder_methods_for_struct_impl( struct_def: &StructDef, params: &[Param], @@ -485,7 +480,6 @@ fn generate_builder_method_for_enum_variant( output2 } -#[expect(clippy::too_many_arguments, clippy::similar_names)] fn generate_builder_method_for_enum_variant_impl( enum_def: &EnumDef, struct_def: &StructDef, diff --git a/tasks/ast_tools/src/schema/defs/enum.rs b/tasks/ast_tools/src/schema/defs/enum.rs index b7f51673243d4..c64293e9fffbc 100644 --- a/tasks/ast_tools/src/schema/defs/enum.rs +++ b/tasks/ast_tools/src/schema/defs/enum.rs @@ -49,7 +49,6 @@ pub struct EnumDef { impl EnumDef { /// Create new [`EnumDef`]. - #[expect(clippy::too_many_arguments)] pub fn new( id: TypeId, name: String, diff --git a/tasks/ast_tools/src/schema/defs/struct.rs b/tasks/ast_tools/src/schema/defs/struct.rs index 7025179895bce..5f3d5a8f0491b 100644 --- a/tasks/ast_tools/src/schema/defs/struct.rs +++ b/tasks/ast_tools/src/schema/defs/struct.rs @@ -45,7 +45,6 @@ pub struct StructDef { impl StructDef { /// Create new [`StructDef`]. - #[expect(clippy::too_many_arguments)] pub fn new( id: TypeId, name: String,