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, .fallowrc.jsonc, fallow.toml, 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
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 FlagsConfig
impl Debug for FlagsConfig
Source§impl Default for FlagsConfig
impl Default for FlagsConfig
Source§fn default() -> FlagsConfig
fn default() -> FlagsConfig
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>,
Source§impl JsonSchema for FlagsConfig
impl JsonSchema for FlagsConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more