style(config): apply formatting to config files (#238)

This commit is contained in:
Orhun Parmaksız 2023-06-11 22:26:45 +02:00 committed by GitHub
parent 4cc7380a88
commit 231aae2920
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 74 additions and 67 deletions

View file

@ -1,3 +1,5 @@
# configuration for https://github.com/commitizen/cz-cli
[tool.commitizen]
name = "cz_customize"
tag_format = "$version"
@ -7,7 +9,6 @@ update_changelog_on_bump = true
major_version_zero = true
use_shortcuts = true
[tool.commitizen.customize]
message_template = """{{change_type}}({{scope}}): {{subject}}
@ -32,7 +33,7 @@ type = "list"
name = "change_type"
choices = [
{ value = "build", name = "build: Changes that affect the build system or external dependencies (example scopes: pip, docker, npm)", key = "b" },
{ value = "chore", name = "chore: A modification that generally does not fall into any other category", key = "c"},
{ value = "chore", name = "chore: A modification that generally does not fall into any other category", key = "c" },
{ value = "ci", name = "ci: Changes to our CI configuration files and scripts (example scopes: GitLabCI)", key = "i" },
{ value = "docs", name = "docs: Documentation only changes", key = "d" },
{ value = "feat", name = "feat: A new feature.", key = "f" },
@ -41,7 +42,7 @@ choices = [
{ value = "refactor", name = "refactor: A code change that neither fixes a bug nor adds a feature", key = "r" },
{ value = "revert", name = "revert: Revert previous commits", key = "v" },
{ value = "style", name = "style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)", key = "s" },
{ value = "test", name = "test: Adding missing or correcting existing tests", key = "t" }
{ value = "test", name = "test: Adding missing or correcting existing tests", key = "t" },
]
message = "Select the type of change you are committing"
@ -75,4 +76,3 @@ default = false
type = "input"
name = "footer"
message = "Footer. Information about Breaking Changes and reference issues that this commit closes: (press [enter] to skip)"

View file

@ -1,3 +1,5 @@
# configuration for https://github.com/DavidAnson/markdownlint
no-inline-html:
allowed_elements:
- img

View file

@ -1,10 +1,17 @@
# configuration for https://github.com/sagiegurari/cargo-make
[config]
skip_core_tasks = true
[tasks.ci]
run_task = [
{ name = "ci-unix", condition = { platforms = ["linux", "mac"] } },
{ name = "ci-windows", condition = { platforms = ["windows"] } },
{ name = "ci-unix", condition = { platforms = [
"linux",
"mac",
] } },
{ name = "ci-windows", condition = { platforms = [
"windows",
] } },
]
[tasks.ci-unix]
@ -38,12 +45,7 @@ dependencies = [
[tasks.fmt]
command = "cargo"
args = [
"fmt",
"--all",
"--",
"--check",
]
args = ["fmt", "--all", "--", "--check"]
[tasks.check-crossterm]
env = { TUI_FEATURES = "serde,crossterm" }
@ -144,29 +146,17 @@ args = [
[tasks.test-doc]
command = "cargo"
args = [
"test",
"--doc",
]
args = ["test", "--doc"]
[tasks.run-example]
private = true
condition = { env_set = ["TUI_EXAMPLE_NAME"] }
command = "cargo"
args = [
"run",
"--release",
"--example",
"${TUI_EXAMPLE_NAME}"
]
args = ["run", "--release", "--example", "${TUI_EXAMPLE_NAME}"]
[tasks.build-examples]
command = "cargo"
args = [
"build",
"--examples",
"--release"
]
args = ["build", "--examples", "--release"]
[tasks.run-examples]
dependencies = ["build-examples"]

View file

@ -1,5 +1,4 @@
# configuration file for git-cliff
# see https://github.com/orhun/git-cliff#configuration-file
# configuration for https://github.com/orhun/git-cliff
[changelog]
# changelog header
@ -47,29 +46,29 @@ filter_unconventional = true
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/tui-rs-revival/ratatui/issues/${2}))"},
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/tui-rs-revival/ratatui/issues/${2}))" },
{ pattern = '(better safe shared layout cache)', replace = "perf(layout): ${1}" },
{ pattern = '(Clarify README.md)', replace = "docs(readme): ${1}" },
{ pattern = '(Update README.md)', replace = "docs(readme): ${1}" },
{ pattern = '(fix typos|Fix typos)', replace = "fix: ${1}" }
{ pattern = '(fix typos|Fix typos)', replace = "fix: ${1}" },
]
# regex for parsing and grouping commits
commit_parsers = [
{ message = "^feat", group = "<!-- 00 -->Features"},
{ message = "^[fF]ix", group = "<!-- 01 -->Bug Fixes"},
{ message = "^refactor", group = "<!-- 02 -->Refactor"},
{ message = "^doc", group = "<!-- 03 -->Documentation"},
{ message = "^perf", group = "<!-- 04 -->Performance"},
{ message = "^style", group = "<!-- 05 -->Styling"},
{ message = "^test", group = "<!-- 06 -->Testing"},
{ message = "^chore\\(release\\): prepare for", skip = true},
{ message = "^chore\\(pr\\)", skip = true},
{ message = "^chore\\(pull\\)", skip = true},
{ message = "^chore", group = "<!-- 07 -->Miscellaneous Tasks"},
{ body = ".*security", group = "<!-- 08 -->Security"},
{ message = "^build", group = "<!-- 09 -->Build"},
{ message = "^ci", group = "<!-- 10 -->Continuous Integration"},
{ message = "^revert", group = "<!-- 11 -->Reverted Commits"},
{ message = "^feat", group = "<!-- 00 -->Features" },
{ message = "^[fF]ix", group = "<!-- 01 -->Bug Fixes" },
{ message = "^refactor", group = "<!-- 02 -->Refactor" },
{ message = "^doc", group = "<!-- 03 -->Documentation" },
{ message = "^perf", group = "<!-- 04 -->Performance" },
{ message = "^style", group = "<!-- 05 -->Styling" },
{ message = "^test", group = "<!-- 06 -->Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore", group = "<!-- 07 -->Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 08 -->Security" },
{ message = "^build", group = "<!-- 09 -->Build" },
{ message = "^ci", group = "<!-- 10 -->Continuous Integration" },
{ message = "^revert", group = "<!-- 11 -->Reverted Commits" },
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false

View file

@ -1,7 +1,7 @@
# configuration for https://github.com/crate-ci/committed
# https://www.conventionalcommits.org
style="conventional"
style = "conventional"
# disallow merge commits
merge_commit = false
# subject is not required to be capitalized
@ -15,4 +15,16 @@ line_length = 0
# disable subject length
subject_length = 0
# default allowed_types [ "chore", "docs", "feat", "fix", "perf", "refactor", "style", "test" ]
allowed_types = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test" ]
allowed_types = [
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
]

View file

@ -1,2 +1,4 @@
# configuration for https://rust-lang.github.io/rustfmt/
wrap_comments = true
comment_width = 100

View file

@ -1,2 +1,4 @@
# configuration for https://github.com/crate-ci/typos
[default.extend-words]
ratatui = "ratatui"