Configuration Reference

Place a commitloom.yaml file in the root of your repository to customize Commitloom's behavior for that repo. The file is optional — Commitloom works without it using sensible defaults.

Minimal example

version: 1

review:
  severity_threshold: warning

Full schema

version: 1                    # required, always 1

review:
  severity_threshold: warning  # minimum severity to post: suggestion | warning | error
  max_comments_per_pr: 12      # cap on inline comments per PR (default: 12)
  summary: true                # generate PR description summary (default: true)
  drafts: false                # review draft PRs (default: false)
  re_review_on_push: true      # re-run on force push (default: true)

rules:
  - id: string               # unique rule identifier
    pattern: string          # regex pattern to match in diff lines
    language: string         # optional: go | typescript | python | rust | java | any
    severity: suggestion | warning | error
    message: string          # message to post as comment when pattern matches

ignore:
  paths:
    - "**/*_test.go"         # glob patterns for files to skip
    - "vendor/**"
    - "*.generated.ts"

  rules:
    - rule-id-to-disable     # disable a built-in rule by its ID

severity_threshold

Controls the minimum severity level for a comment to be posted on the PR. Comments below this threshold are still detected but not surfaced inline.

ValueWhat gets posted
suggestionAll findings, including style suggestions
warningWarnings and errors only (default)
errorErrors only — high signal, low noise

Custom rules

Use the rules array to define patterns your team cares about. The pattern field is a Go-flavored regular expression matched against each added line in the diff.

Example: Flag raw SQL string formatting.

rules:
  - id: no-raw-sql-fmt
    pattern: "db\.Exec\(fmt\.Sprintf"
    severity: error
    message: "Use parameterized queries instead of fmt.Sprintf in SQL calls"

ignore.paths

A list of glob patterns. Files matching any pattern are excluded from review entirely. Common patterns:

ignore:
  paths:
    - "**/*_test.go"    # test files
    - "vendor/**"       # vendored dependencies
    - "*.pb.go"         # generated protobuf files
    - "migrations/**"   # database migration files

Schema validation

Commitloom validates your commitloom.yaml on each PR and posts a comment if the schema is invalid, rather than failing silently. You can also validate locally:

$ npx commitloom-cli validate
commitloom.yaml: OK