Skip to content

Commit

Permalink
feat(cli): modify config short flag to -c (#383)
Browse files Browse the repository at this point in the history
Signed-off-by: KeisukeYamashita <[email protected]>
  • Loading branch information
KeisukeYamashita authored Nov 5, 2024
1 parent 5b557a1 commit 246a1d3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["cli"]
resolver = "2"

[workspace.package]
version = "0.1.12"
version = "0.2.0"
authors = ["KeisukeYamashita <[email protected]>"]
license = "MIT OR Apache-2.0"
documentation = "https://keisukeyamashita.github.io/commitlint-rs"
Expand All @@ -12,4 +12,4 @@ categories = ["command-line-utilities"]
readme = "README.md"
repository = "https://github.com/KeisukeYamashita/commitlint-rs"
exclude = ["/web"]
edition = "2021"
edition = "2021"
2 changes: 1 addition & 1 deletion cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::rule::Rules;
const DEFAULT_CONFIG_ROOT: &str = ".";

/// Default commitlintrc configuration files
/// If the user didn't specify a configuration file with -g or --config argument,
/// If the user didn't specify a configuration file with -c or --config argument,
/// we will try to find one of these files in the current directory.
const DEFAULT_CONFIG_FILE: [&str; 4] = [
".commitlintrc",
Expand Down
6 changes: 3 additions & 3 deletions web/src/content/docs/config/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ Note that it is searched in the order written above and the first one found is l

### Using the flag

Configuration file can be specified by using the `--config` flag or the short `-g` flag.
Configuration file can be specified by using the `--config` flag or the short `-c` flag.

```console
# Using --config flag
$ commitlint --config path/to/.commitlintrc.yml

# Using -g flag
$ commitlint -g path/to/.commitlintrc.yml
# Using -c flag
$ commitlint -c path/to/.commitlintrc.yml
```

If you specify a file and the file is not found, Commitlint will throw an error.
Expand Down

0 comments on commit 246a1d3

Please sign in to comment.