Skip to content

ignore fixup!, amend!, squash! commits #443

@muni-corn

Description

@muni-corn

feature description

forgive me if this can be implemented using the existing rules, but i'm not sure how to ignore fixup! commits (etc) with commitlint-rs.

this is my current configuration:

rules:
  description-empty:
    level: error
  description-format:
    level: error
    format: ^[a-z].*$
  description-max-length:
    level: error
    length: 72
  scope-max-length:
    level: warning
    length: 10
  scope-empty:
    level: warning
  type:
    level: error
    options:
      - build
      - chore
      - ci
      - docs
      - feat
      - fix
      - perf
      - refactor
      - test

if i go to fixup a commit with git commit --fixup ..., commitlint-rs will fail, and i can't commit the fixup.

i've tried adding "fixup!" and "fixup" to the type.options array with no luck. i'd probably have to add "fixup! feat", "fixup! fix", etc.

while i can add --no-verify to bypass this, having commitlint skip these commits would be much more convenient!

expected behavior

commitlint-rs should skip linting fixup!, squash!, and amend! commits entirely. (and have configuration options to enable or disable this behavior.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions