Decrease too-many-arguments-threshold and type-complexity-threshold.

This commit is contained in:
Avi Weinstock 2021-12-07 18:33:46 -05:00 committed by Marcel Märtens
parent 5f8957d8ef
commit f3f08936d8
10 changed files with 14 additions and 2 deletions

View File

@ -10,7 +10,7 @@
# `too_many_arguments` often flags `new` methods on structs that legitimately
# ought to have many parameters
too-many-arguments-threshold = 4294967295
too-many-arguments-threshold = 15
# `many_single_char_names` often triggers for geometry or physics code with an
# associated diagram, where the short names are points in the diagram.
@ -19,4 +19,4 @@ single-char-binding-names-threshold = 4294967295
# `type_complexity` often triggers for the RHS of an associated type: it's
# telling you that a type is complicated enough to need a name, at the point
# where you're giving it a name.
type-complexity-threshold = 4294967295
type-complexity-threshold = 750

View File

@ -1764,6 +1764,7 @@ fn voxel_collider_bounding_sphere(
}
/// Returns whether interesction between entities occured
#[allow(clippy::too_many_arguments)]
fn resolve_e2e_collision(
// utility variables for our entity
collision_registered: &mut bool,

View File

@ -25,6 +25,7 @@ use vek::*;
pub struct Sys;
impl<'a> System<'a> for Sys {
#[allow(clippy::type_complexity)]
type SystemData = (
Entities<'a>,
Read<'a, Tick>,

View File

@ -26,6 +26,7 @@ pub type TerrainPersistenceData<'a> = Option<Write<'a, TerrainPersistence>>;
pub type TerrainPersistenceData<'a> = ();
impl Sys {
#[allow(clippy::too_many_arguments)]
fn handle_client_in_game_msg(
server_emitter: &mut common::event::Emitter<'_, ServerEvent>,
entity: specs::Entity,
@ -303,6 +304,7 @@ impl Sys {
#[derive(Default)]
pub struct Sys;
impl<'a> System<'a> for Sys {
#[allow(clippy::type_complexity)]
type SystemData = (
Entities<'a>,
Read<'a, EventBus<ServerEvent>>,

View File

@ -106,6 +106,7 @@ impl LazyTerrainMessage {
#[derive(Default)]
pub struct Sys;
impl<'a> System<'a> for Sys {
#[allow(clippy::type_complexity)]
type SystemData = (
Read<'a, EventBus<ServerEvent>>,
Read<'a, Tick>,

View File

@ -91,6 +91,7 @@ pub struct InventoryScroller<'a> {
}
impl<'a> InventoryScroller<'a> {
#[allow(clippy::too_many_arguments)]
pub fn new(
client: &'a Client,
imgs: &'a Imgs,
@ -582,6 +583,7 @@ pub struct Bag<'a> {
}
impl<'a> Bag<'a> {
#[allow(clippy::too_many_arguments)]
pub fn new(
client: &'a Client,
global_state: &'a GlobalState,

View File

@ -267,6 +267,7 @@ pub struct Skillbar<'a> {
}
impl<'a> Skillbar<'a> {
#[allow(clippy::too_many_arguments)]
pub fn new(
client: &'a Client,
global_state: &'a GlobalState,

View File

@ -224,6 +224,7 @@ fn calc_light<V: RectRasterableVol<Vox = Block> + ReadVol + Debug>(
}
}
#[allow(clippy::type_complexity)]
pub fn generate_mesh<'a, V: RectRasterableVol<Vox = Block> + ReadVol + Debug + 'static>(
vol: &'a VolGrid2d<V>,
(range, max_texture_size, _boi): (Aabb<i32>, Vec2<u16>, &'a BlocksOfInterest),

View File

@ -81,6 +81,7 @@ pub struct Shadow {
impl Globals {
/// Create global consts from the provided parameters.
#[allow(clippy::too_many_arguments)]
pub fn new(
view_mat: Mat4<f32>,
proj_mat: Mat4<f32>,

View File

@ -697,6 +697,7 @@ impl m32 {
/// Prediction in Geomorphology, Geophysical Monograph 135.
/// Copyright 2003 by the American Geophysical Union
/// 10.1029/135GM09
#[allow(clippy::too_many_arguments)]
fn erode(
// Underlying map dimensions.
map_size_lg: MapSizeLg,
@ -2530,6 +2531,7 @@ pub fn get_multi_rec<F: fmt::Debug + Float + Sync + Into<Compute>>(
}
/// Perform erosion n times.
#[allow(clippy::too_many_arguments)]
pub fn do_erosion(
map_size_lg: MapSizeLg,
_max_uplift: f32,