Skip to content

pre-commit hook with CLI parameters #339

@ruzickap

Description

@ruzickap

What's the problem this feature will solve?

I would like to use + configure the commit-check as part of pre-commit hook without using the config file (commit-check.toml).

In pre-commit hooks you can usually specify the CLI arguments like:

repos:
  - repo: https://github.com/commit-check/commit-check
    rev: v2.1.2
    hooks:
      - id: commit-check
        args:
          - --subject-imperative=false

Having commit-check.toml file in every git repository with one parameter seems cumbersome:

[commit]
subject_imperative = true

Thanks for considering it...

Describe the solution you'd like

commit-check should support command line parameters (and environment variables) like:

  • CLI parameters: --subject-imperative=false
  • Env variables: CCHK_SUBJECT_IMPERATIVE=true (or maybe COMMIT_CHECK_SUBJECT_IMPERATIVE=true)

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions