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] [tool.commitizen]
name = "cz_customize" name = "cz_customize"
tag_format = "$version" tag_format = "$version"
@ -7,7 +9,6 @@ update_changelog_on_bump = true
major_version_zero = true major_version_zero = true
use_shortcuts = true use_shortcuts = true
[tool.commitizen.customize] [tool.commitizen.customize]
message_template = """{{change_type}}({{scope}}): {{subject}} message_template = """{{change_type}}({{scope}}): {{subject}}
@ -32,7 +33,7 @@ type = "list"
name = "change_type" name = "change_type"
choices = [ choices = [
{ value = "build", name = "build: Changes that affect the build system or external dependencies (example scopes: pip, docker, npm)", key = "b" }, { 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 = "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 = "docs", name = "docs: Documentation only changes", key = "d" },
{ value = "feat", name = "feat: A new feature.", key = "f" }, { 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 = "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 = "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 = "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" message = "Select the type of change you are committing"
@ -75,4 +76,3 @@ default = false
type = "input" type = "input"
name = "footer" name = "footer"
message = "Footer. Information about Breaking Changes and reference issues that this commit closes: (press [enter] to skip)" 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: no-inline-html:
allowed_elements: allowed_elements:
- img - img

View file

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

View file

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

View file

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

View file

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