Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 22 fields pub root: PathBuf, pub definitions: Vec<String>, pub features: Vec<String>, pub feature_pattern_origin: String, pub config_warnings: Vec<String>, pub config_source: String, pub exclude: Vec<String>, pub exclude_defaults: bool, pub include_hidden: bool, pub reporters: Vec<ReporterKind>, pub output: PathBuf, pub threshold: f64, pub require_features: bool, pub require_definitions: bool, pub fail_on_incomplete: bool, pub registrations: Vec<String>, pub parameter_types: BTreeMap<String, String>, pub max_candidate_comparisons: usize, pub max_structural_class_comparisons: usize, pub no_metrics: bool, pub rules: BTreeMap<Rule, Severity>, pub suppressions: Vec<SuppressionConfig>, /* private fields */
}
Expand description

Fully resolved and validated analyzer configuration.

Fields§

§root: PathBuf

Canonical repository root being analyzed.

§definitions: Vec<String>

Globs selecting definition sources, or an empty list for automatic discovery.

§features: Vec<String>

Globs selecting classic Gherkin or Gherkin Markdown feature files.

§feature_pattern_origin: String

Human-readable origin of the effective feature globs.

§config_warnings: Vec<String>

Non-fatal diagnostics produced while inspecting framework configuration.

§config_source: String

Standalone or package configuration source selected below CLI overrides.

§exclude: Vec<String>

Globs excluded from discovery.

§exclude_defaults: bool

Whether built-in generated-directory exclusions are active.

§include_hidden: bool

Whether discovery descends into dot-directories.

§reporters: Vec<ReporterKind>

Report formats emitted by the analyzer.

§output: PathBuf

Directory for file-based reports.

§threshold: f64

Maximum percentage of definitions allowed in active duplication errors.

§require_features: bool

Whether finding no feature files is an operational failure.

§require_definitions: bool

Whether extracting no step definitions is an operational failure.

§fail_on_incomplete: bool

Whether an incomplete corpus or truncated analysis is an operational failure.

§registrations: Vec<String>

Additional local function names that register step definitions.

§parameter_types: BTreeMap<String, String>

Project-defined Cucumber Expression parameter types and their regular expressions.

§max_candidate_comparisons: usize

Maximum unique definition pairs retained for analysis.

§max_structural_class_comparisons: usize

Maximum structural candidate proposals considered from one handler class.

§no_metrics: bool

Whether machine reports omit runtime measurements for reproducibility.

§rules: BTreeMap<Rule, Severity>

Effective severity for each analysis rule.

§suppressions: Vec<SuppressionConfig>

Explicit, reason-bearing finding suppressions.

Implementations§

Source§

impl Config

Source

pub fn load(root: &Path, overrides: ConfigOverrides) -> Result<Self>

Loads framework, package, and standalone configuration beneath root, then applies overrides in precedence order.

Source

pub fn severity(&self, rule: Rule) -> Severity

Returns the configured severity for rule, defaulting to Severity::Off.

Source

pub fn output_path(&self, filename: &str) -> PathBuf

Resolves a report filename against the configured output directory.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for Config

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.