Skip to content

commit-check: error: unrecognized arguments: .git/COMMIT_EDITMSG #363

@shenxianpeng

Description

@shenxianpeng

I'm not sure if it is just on my side, but I'm getting error:

$ git commit -m 'feat: improve logging messages and add checks for .lycheecache'
...
...
...
check commit message.....................................................Failed
- hook id: check-message
- exit code: 2

  usage: commit-check [-h] [-v] [-c CONFIG] [-m [MESSAGE]] [-b] [-n] [-e] [-d]
                      [--conventional-commits BOOL] [--subject-capitalized BOOL]
                      [--subject-imperative BOOL] [--subject-max-length INT]
                      [--subject-min-length INT] [--allow-commit-types LIST]
                      [--allow-merge-commits BOOL] [--allow-revert-commits BOOL]
                      [--allow-empty-commits BOOL] [--allow-fixup-commits BOOL]
                      [--allow-wip-commits BOOL] [--require-body BOOL]
                      [--require-signed-off-by BOOL] [--ignore-authors LIST]
                      [--conventional-branch BOOL] [--allow-branch-types LIST]
                      [--allow-branch-names LIST]
                      [--require-rebase-target BRANCH]
                      [--branch-ignore-authors LIST]
  commit-check: error: unrecognized arguments: .git/COMMIT_EDITMSG

I have this in .pre-commit-config.yaml:

  - repo: https://github.com/commit-check/commit-check
    rev: v2.4.0
    hooks:
      - id: check-message
        args:
          - --subject-imperative=false
      - id: check-branch
      - id: check-author-name
      - id: check-author-email

Originally posted by @ruzickap in #357 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions