Skip to content

Quickstart

Create a starter rules file, then run a scan:

reglint init
reglint analyze --config reglint-rules.yaml

A rule is a message, a regex, and a severity:

rules:
  - message: "Avoid hardcoded token: $1"
    regex: "token\\s*[:=]\\s*([A-Za-z0-9_-]+)"
    severity: "error"
    paths:
      - "src/**"

Findings print per file with line:column positions, and a summary line closes the run:

src/client.go
- ERROR 42:12 Avoid hardcoded token: sk_live_example
  src/client.go:42

Summary: files=31 skipped=0 matches=1 durationMs=18

The exit code is 2 when a finding meets the --fail-on threshold — see Exit Codes. Use reglint --help or reglint analyze --help for the full command reference, or browse the CLI Reference.

Next steps: