glinter

Types

pub type RunResult {
  RunResult(output: String, exit_code: Int)
}

Constructors

  • RunResult(output: String, exit_code: Int)

Values

pub fn main() -> Nil
pub fn run(extra_rules extra_rules: List(rule.Rule)) -> Nil

Run glinter with extra rules from external packages. Use this from a review.gleam file to add project-specific rules:

import glinter
import my_project/rules

pub fn main() {
  glinter.run(extra_rules: [
    rules.no_raw_sql(),
    rules.require_org_id(),
  ])
}

Extra rules are configured the same way as built-in rules (on/off/severity in gleam.toml, file-level ignores).

pub fn run_with_args(
  args args: List(String),
  extra_rules extra_rules: List(rule.Rule),
) -> RunResult

Run glinter for a set of CLI arguments, returning output and exit code without printing or halting.

Search Document