glinter/config
Types
pub type Config {
Config(
rules: dict.Dict(String, option.Option(SeverityOverride)),
ignore: dict.Dict(String, List(String)),
include: List(String),
exclude: List(String),
scan_paths: List(String),
stats: Bool,
warnings_as_errors: Bool,
)
}
Constructors
-
Config( rules: dict.Dict(String, option.Option(SeverityOverride)), ignore: dict.Dict(String, List(String)), include: List(String), exclude: List(String), scan_paths: List(String), stats: Bool, warnings_as_errors: Bool, )
pub type SeverityOverride {
SeverityError
SeverityWarning
}
Constructors
-
SeverityError -
SeverityWarning
Values
pub fn resolve_severity(
cfg: Config,
rule_name: String,
default: fn() -> Result(rule.Severity, Nil),
) -> Result(rule.Severity, Nil)
Resolve the effective severity for a rule from config.
default is called when the rule is not present in config at all.
Returns Error(Nil) when the rule is explicitly turned off.