clippy: Allow too_many_arguments for all functions (#31962)

This is the start of preventing this in the future.

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
komuhangi 2024-04-01 17:53:33 +03:00 committed by GitHub
parent 8c1a72f130
commit 0da2508e4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 51 additions and 0 deletions

View file

@ -40,6 +40,7 @@ pub struct AudioParam {
}
impl AudioParam {
#[allow(clippy::too_many_arguments)]
pub fn new_inherited(
context: &BaseAudioContext,
node: NodeId,
@ -64,6 +65,7 @@ impl AudioParam {
}
#[allow(crown::unrooted_must_root)]
#[allow(clippy::too_many_arguments)]
pub fn new(
window: &Window,
context: &BaseAudioContext,

View file

@ -229,6 +229,7 @@ pub fn create_callback_interface_object(
}
/// Create the interface prototype object of a non-callback interface.
#[allow(clippy::too_many_arguments)]
pub fn create_interface_prototype_object(
cx: SafeJSContext,
global: HandleObject,
@ -273,6 +274,7 @@ pub fn create_interface_prototype_object(
}
/// Create and define the interface object of a non-callback interface.
#[allow(clippy::too_many_arguments)]
pub fn create_noncallback_interface_object(
cx: SafeJSContext,
global: HandleObject,
@ -353,6 +355,7 @@ pub fn create_named_constructors(
}
/// Create a new object with a unique type.
#[allow(clippy::too_many_arguments)]
pub fn create_object(
cx: SafeJSContext,
global: HandleObject,

View file

@ -35,6 +35,7 @@ impl NamespaceObjectClass {
}
/// Create a new namespace object.
#[allow(clippy::too_many_arguments)]
pub fn create_namespace_object(
cx: JSContext,
global: HandleObject,

View file

@ -56,6 +56,7 @@ impl ProgressEvent {
)
}
#[allow(clippy::too_many_arguments)]
fn new_with_proto(
global: &GlobalScope,
proto: Option<HandleObject>,

View file

@ -219,6 +219,7 @@ impl WorkerEventLoopMethods for ServiceWorkerGlobalScope {
}
impl ServiceWorkerGlobalScope {
#[allow(clippy::too_many_arguments)]
fn new_inherited(
init: WorkerGlobalScopeInit,
worker_url: ServoUrl,
@ -253,6 +254,7 @@ impl ServiceWorkerGlobalScope {
}
#[allow(unsafe_code)]
#[allow(clippy::too_many_arguments)]
pub fn new(
init: WorkerGlobalScopeInit,
worker_url: ServoUrl,
@ -285,6 +287,7 @@ impl ServiceWorkerGlobalScope {
#[allow(unsafe_code)]
// https://w3c.github.io/ServiceWorker/#run-service-worker-algorithm
#[allow(clippy::too_many_arguments)]
pub fn run_serviceworker_scope(
scope_things: ScopeThings,
own_sender: Sender<ServiceWorkerScriptMsg>,

View file

@ -64,6 +64,7 @@ impl StorageEvent {
)
}
#[allow(clippy::too_many_arguments)]
pub fn new(
global: &Window,
type_: Atom,
@ -89,6 +90,7 @@ impl StorageEvent {
)
}
#[allow(clippy::too_many_arguments)]
fn new_with_proto(
global: &Window,
proto: Option<HandleObject>,

View file

@ -30,6 +30,7 @@ pub struct TextMetrics {
#[allow(non_snake_case)]
impl TextMetrics {
#[allow(clippy::too_many_arguments)]
fn new_inherited(
width: f64,
actualBoundingBoxLeft: f64,
@ -61,6 +62,7 @@ impl TextMetrics {
}
}
#[allow(clippy::too_many_arguments)]
pub fn new(
global: &GlobalScope,
width: f64,

View file

@ -25,6 +25,7 @@ pub struct Touch {
}
impl Touch {
#[allow(clippy::too_many_arguments)]
fn new_inherited(
identifier: i32,
target: &EventTarget,
@ -48,6 +49,7 @@ impl Touch {
}
}
#[allow(clippy::too_many_arguments)]
pub fn new(
window: &Window,
identifier: i32,

View file

@ -63,6 +63,7 @@ impl TouchEvent {
)
}
#[allow(clippy::too_many_arguments)]
pub fn new(
window: &Window,
type_: DOMString,

View file

@ -456,6 +456,7 @@ impl WebGL2RenderingContext {
}
#[allow(unsafe_code)]
#[allow(clippy::too_many_arguments)]
fn read_pixels_into(
&self,
x: i32,
@ -848,6 +849,7 @@ impl WebGL2RenderingContext {
.send_command(WebGLCommand::VertexAttribU(index, x, y, z, w));
}
#[allow(clippy::too_many_arguments)]
fn tex_storage(
&self,
dimensions: u8,

View file

@ -255,6 +255,7 @@ pub struct TexImage2DValidator<'a> {
impl<'a> TexImage2DValidator<'a> {
// TODO: Move data validation logic here.
#[allow(clippy::too_many_arguments)]
pub fn new(
context: &'a WebGLRenderingContext,
target: u32,
@ -386,6 +387,7 @@ pub struct CommonCompressedTexImage2DValidator<'a> {
}
impl<'a> CommonCompressedTexImage2DValidator<'a> {
#[allow(clippy::too_many_arguments)]
pub fn new(
context: &'a WebGLRenderingContext,
target: u32,
@ -509,6 +511,7 @@ pub struct CompressedTexImage2DValidator<'a> {
}
impl<'a> CompressedTexImage2DValidator<'a> {
#[allow(clippy::too_many_arguments)]
pub fn new(
context: &'a WebGLRenderingContext,
target: u32,
@ -585,6 +588,7 @@ pub struct CompressedTexSubImage2DValidator<'a> {
}
impl<'a> CompressedTexSubImage2DValidator<'a> {
#[allow(clippy::too_many_arguments)]
pub fn new(
context: &'a WebGLRenderingContext,
target: u32,
@ -697,6 +701,7 @@ pub struct TexStorageValidatorResult {
}
impl<'a> TexStorageValidator<'a> {
#[allow(clippy::too_many_arguments)]
pub fn new(
context: &'a WebGLRenderingContext,
dimensions: u8,

View file

@ -747,6 +747,7 @@ impl WebGLRenderingContext {
}
}
#[allow(clippy::too_many_arguments)]
pub fn tex_image_2d(
&self,
texture: &WebGLTexture,
@ -834,6 +835,7 @@ impl WebGLRenderingContext {
}
}
#[allow(clippy::too_many_arguments)]
fn tex_sub_image_2d(
&self,
texture: DomRoot<WebGLTexture>,
@ -1575,6 +1577,7 @@ impl WebGLRenderingContext {
constants::COLOR_ATTACHMENT0 <= attachment && attachment <= last_slot
}
#[allow(clippy::too_many_arguments)]
pub fn compressed_tex_image_2d(
&self,
target: u32,
@ -1642,6 +1645,7 @@ impl WebGLRenderingContext {
}
}
#[allow(clippy::too_many_arguments)]
pub fn compressed_tex_sub_image_2d(
&self,
target: u32,

View file

@ -152,6 +152,7 @@ impl WebGLTexture {
Ok(())
}
#[allow(clippy::too_many_arguments)]
pub fn initialize(
&self,
target: TexImageTarget,

View file

@ -44,6 +44,7 @@ impl WheelEvent {
reflect_dom_object_with_proto(Box::new(WheelEvent::new_inherited()), window, proto)
}
#[allow(clippy::too_many_arguments)]
pub fn new(
window: &Window,
type_: DOMString,
@ -62,6 +63,7 @@ impl WheelEvent {
)
}
#[allow(clippy::too_many_arguments)]
fn new_with_proto(
window: &Window,
proto: Option<HandleObject>,

View file

@ -129,6 +129,7 @@ pub struct WorkerGlobalScope {
}
impl WorkerGlobalScope {
#[allow(clippy::too_many_arguments)]
pub fn new_inherited(
init: WorkerGlobalScopeInit,
worker_name: DOMString,

View file

@ -301,6 +301,7 @@ impl WorkletThreadPool {
/// If all of the threads load successfully, the promise is resolved.
/// If any of the threads fails to load, the promise is rejected.
/// <https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script>
#[allow(clippy::too_many_arguments)]
fn fetch_and_invoke_a_worklet_script(
&self,
pipeline_id: PipelineId,
@ -625,6 +626,7 @@ impl WorkletThread {
/// Fetch and invoke a worklet script.
/// <https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script>
#[allow(clippy::too_many_arguments)]
fn fetch_and_invoke_a_worklet_script(
&self,
global_scope: &WorkletGlobalScope,

View file

@ -28,6 +28,7 @@ pub struct XMLDocument {
}
impl XMLDocument {
#[allow(clippy::too_many_arguments)]
fn new_inherited(
window: &Window,
has_browsing_context: HasBrowsingContext,
@ -59,6 +60,7 @@ impl XMLDocument {
}
}
#[allow(clippy::too_many_arguments)]
pub fn new(
window: &Window,
has_browsing_context: HasBrowsingContext,

View file

@ -61,6 +61,7 @@ impl XRInputSourcesChangeEvent {
}
#[allow(unsafe_code)]
#[allow(clippy::too_many_arguments)]
fn new_with_proto(
global: &GlobalScope,
proto: Option<HandleObject>,