Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion apps/oxlint/src/command/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_ast/src/ast_builder_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T1, T2, T3, T4, T5>(
self,
Expand Down
6 changes: 1 addition & 5 deletions crates/oxc_ast/src/generated/ast_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion crates/oxc_ecmascript/src/constant_evaluation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
2 changes: 0 additions & 2 deletions crates/oxc_linter/src/module_graph_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ struct ModuleGraphVisitor {
}

impl ModuleGraphVisitor {
#[expect(clippy::too_many_arguments)]
fn filter_fold_while<
T,
Filter: Fn(ModulePair, &ModuleRecord) -> bool,
Expand Down Expand Up @@ -172,7 +171,6 @@ impl ModuleGraphVisitor {
.into_inner()
}

#[expect(clippy::too_many_arguments)]
fn filter_fold_recursive<
T,
Filter: Fn(ModulePair, &ModuleRecord) -> bool,
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_linter/src/utils/express.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions crates/oxc_parser/src/js/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -501,7 +499,6 @@ impl<'a> ParserImpl<'a> {
}

/// <https://github.com/tc39/proposal-decorators>
#[expect(clippy::too_many_arguments, clippy::fn_params_excessive_bools)]
fn parse_class_accessor_property(
&mut self,
span: Span,
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_span/src/source_type/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion crates/oxc_transformer/src/common/duplicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions tasks/ast_tools/src/derives/get_span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 1 addition & 7 deletions tasks/ast_tools/src/generators/ast_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion tasks/ast_tools/src/schema/defs/enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ pub struct EnumDef {

impl EnumDef {
/// Create new [`EnumDef`].
#[expect(clippy::too_many_arguments)]
pub fn new(
id: TypeId,
name: String,
Expand Down
1 change: 0 additions & 1 deletion tasks/ast_tools/src/schema/defs/struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ pub struct StructDef {

impl StructDef {
/// Create new [`StructDef`].
#[expect(clippy::too_many_arguments)]
pub fn new(
id: TypeId,
name: String,
Expand Down
Loading