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),
    stats: Bool,
    warnings_as_errors: Bool,
  )
}

Constructors

pub type SeverityOverride {
  SeverityError
  SeverityWarning
}

Constructors

  • SeverityError
  • SeverityWarning

Values

pub fn default() -> Config
pub fn parse(toml_string: String) -> Result(Config, String)
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.

Search Document