pub struct FlagsConfig {
pub sdk_patterns: Vec<SdkPattern>,
pub env_prefixes: Vec<String>,
pub config_object_heuristics: bool,
}Expand description
Feature flag detection configuration.
Controls which patterns fallow uses to detect feature flags in source code.
Configured via the flags section in .fallowrc.json or fallow.toml.
§Examples
{
"flags": {
"sdkPatterns": [
{ "function": "useFlag", "nameArg": 0, "provider": "LaunchDarkly" }
],
"envPrefixes": ["FEATURE_", "NEXT_PUBLIC_ENABLE_"],
"configObjectHeuristics": false
}
}Fields§
§sdk_patterns: Vec<SdkPattern>Additional SDK call patterns to detect as feature flags. These are merged with the built-in patterns (LaunchDarkly, Statsig, Unleash, GrowthBook).
env_prefixes: Vec<String>Environment variable prefixes that indicate feature flags.
Merged with built-in prefixes. Only process.env.* accesses matching
these prefixes are reported as feature flags.
config_object_heuristics: boolEnable config object heuristic detection. When true, property accesses on objects whose name contains “feature”, “flag”, or “toggle” are reported as low-confidence feature flags. Default: false (opt-in due to higher false positive rate).
Trait Implementations§
Source§impl Clone for FlagsConfig
impl Clone for FlagsConfig
Source§fn clone(&self) -> FlagsConfig
fn clone(&self) -> FlagsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FlagsConfig
impl Debug for FlagsConfig
Source§impl Default for FlagsConfig
impl Default for FlagsConfig
Source§fn default() -> FlagsConfig
fn default() -> FlagsConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FlagsConfig
impl<'de> Deserialize<'de> for FlagsConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for FlagsConfig
impl JsonSchema for FlagsConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for FlagsConfig
impl RefUnwindSafe for FlagsConfig
impl Send for FlagsConfig
impl Sync for FlagsConfig
impl Unpin for FlagsConfig
impl UnsafeUnpin for FlagsConfig
impl UnwindSafe for FlagsConfig
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
Mutably borrows from an owned value. Read more