Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Doc for CLI usage #29

Closed
Closed
Labels
documentationImprovements or additions to documentation good first issueGood for newcomers
@aj3sh

Description

Currently, there is no documentation regarding the CLI. Let's add it to the README.md.

Here are some details for the CLI. Let's use them and write standard documentation after the For github-actions section of How to use.

$ commitlint --help
usage: commitlint [-h] [-V] [--file FILE] [--hash HASH] [--from-hash FROM_HASH] [--to-hash TO_HASH] [--skip-detail] [commit_message]
Check if a commit message follows the conventional commit format.
positional arguments:
 commit_message The commit message to be checked.
optional arguments:
 -h, --help show this help message and exit
 -V, --version show program's version number and exit
 --file FILE Path to a file containing the commit message.
 --hash HASH Commit hash
 --from-hash FROM_HASH
 From commit hash
 --to-hash TO_HASH To commit hash
 --skip-detail Skip the detailed error message check

Example usage:

Check commit message directly:

$ commitlint "chore: my commit message"

Check commit message from file:

$ commitlint --file /foo/bar/commit-message.txt

Check commit message of a hash:

$ commitlint --hash 9a8c08173

Check commit message of a hash range:

$ commitlint --from-hash 00bf73fef7 --to-hash d6301f1eb0

Check commit message skipping the detail check:

$ commitlint --skip-detail "chore: my commit message"
# or
$ commitlint --skip-detail --hash 9a8c08173

Display help

$ commitlint --help
# or
$ commitlint -h

Displaying version

$ commitlint --version
# or
$ commitlint -V

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation good first issueGood for newcomers

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /