pub struct ConfigGateDefaults {
pub max_cyclomatic_per_function: Option<u32>,
pub max_nesting_depth: Option<u32>,
pub max_lines_per_function: Option<u32>,
pub max_lines_per_file: Option<u32>,
pub max_code_lines_per_file: Option<u32>,
pub max_parameters_per_function: Option<u32>,
pub min_coverage_percent: Option<f64>,
pub max_duplicate_lines: Option<u32>,
pub max_clippy_warnings: Option<u32>,
pub max_line_length: Option<usize>,
}Expand description
Absolute thresholds based on industry standards (SonarQube, ESLint, DeepSource). When present, these override the ratchet model for the specified metrics.
Fields§
§max_cyclomatic_per_function: Option<u32>Maximum cyclomatic complexity per function (SonarQube default: 15, DeepSource: 10).
max_nesting_depth: Option<u32>Maximum nesting depth per function (ESLint default: 4, Detekt/ReSharper: 5).
max_lines_per_function: Option<u32>Maximum lines per function (SonarQube default: 80, ESLint: 50, Detekt: 60).
max_lines_per_file: Option<u32>Maximum lines per file (SonarQube default: 1000).
max_code_lines_per_file: Option<u32>Maximum code lines per file (non-comment, non-blank).
max_parameters_per_function: Option<u32>Maximum parameters per function (SonarQube default: 7, Detekt: 6, ESLint: 3).
min_coverage_percent: Option<f64>Minimum line coverage percent (SonarQube default: 80.0).
max_duplicate_lines: Option<u32>Maximum duplicate lines (SonarQube default: 3% of new code).
max_clippy_warnings: Option<u32>Maximum clippy warnings.
max_line_length: Option<usize>Maximum line length in characters (ESLint default: 80, rustfmt default: 120).
Trait Implementations§
Source§impl Clone for ConfigGateDefaults
impl Clone for ConfigGateDefaults
Source§fn clone(&self) -> ConfigGateDefaults
fn clone(&self) -> ConfigGateDefaults
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConfigGateDefaults
impl Debug for ConfigGateDefaults
Source§impl<'de> Deserialize<'de> for ConfigGateDefaults
impl<'de> Deserialize<'de> for ConfigGateDefaults
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ConfigGateDefaults
impl PartialEq for ConfigGateDefaults
Source§fn eq(&self, other: &ConfigGateDefaults) -> bool
fn eq(&self, other: &ConfigGateDefaults) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ConfigGateDefaults
impl Serialize for ConfigGateDefaults
impl StructuralPartialEq for ConfigGateDefaults
Auto Trait Implementations§
impl Freeze for ConfigGateDefaults
impl RefUnwindSafe for ConfigGateDefaults
impl Send for ConfigGateDefaults
impl Sync for ConfigGateDefaults
impl Unpin for ConfigGateDefaults
impl UnsafeUnpin for ConfigGateDefaults
impl UnwindSafe for ConfigGateDefaults
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more