glinter/rule

Types

pub type LintResult {
  LintResult(
    rule: String,
    severity: Severity,
    file: String,
    location: glance.Span,
    message: String,
  )
}

Constructors

  • LintResult(
      rule: String,
      severity: Severity,
      file: String,
      location: glance.Span,
      message: String,
    )

Pre-computed data from a single AST traversal. Rules receive this instead of walking the AST themselves.

pub type ModuleData {
  ModuleData(
    module: glance.Module,
    expressions: List(glance.Expression),
    statements: List(glance.Statement),
  )
}

Constructors

pub type Rule {
  Rule(
    name: String,
    default_severity: Severity,
    check: fn(ModuleData, String) -> List(LintResult),
  )
}

Constructors

pub type Severity {
  Error
  Warning
}

Constructors

  • Error
  • Warning
Search Document