diff --git a/.typos.toml b/.typos.toml index bda9d0f..1add301 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,4 +1,3 @@ [default.extend-words] ue = "ue" dows = "dows" - diff --git a/Cargo.toml b/Cargo.toml index 78e209f..5a68e28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,11 @@ itertools = "0.12.1" log = "0.4.21" platforms = "=3.2.0" regex = "1.10.4" -reqwest = { version = "0.12.4", default-features = false, features = ["gzip", "json", "rustls-tls"] } +reqwest = { version = "0.12.4", default-features = false, features = [ + "gzip", + "json", + "rustls-tls", +] } result = "1.0.0" serde = { version = "1.0.201", features = ["derive"] } strum = { version = "0.26.2", features = ["derive"] } @@ -30,7 +34,14 @@ url = { version = "2.5.0", features = ["serde"] } xz = "0.1.0" # This disables all the features that require C compilation, which greatly # simplifies cross-platform builds. -zip = { version = "1.2.2", default-features = false, features = [ "aes-crypto", "bzip2", "deflate", "deflate64", "lzma", "zstd" ] } +zip = { version = "1.2.2", default-features = false, features = [ + "aes-crypto", + "bzip2", + "deflate", + "deflate64", + "lzma", + "zstd", +] } [workspace.metadata.release] allow-branch = ["master"] diff --git a/Cross.toml b/Cross.toml index 37ec9ab..f457769 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,4 +1,2 @@ [build.env] -passthrough = [ - "GITHUB_TOKEN", -] \ No newline at end of file +passthrough = ["GITHUB_TOKEN"] diff --git a/dev/bin/install-dev-tools.sh b/dev/bin/install-dev-tools.sh index df4fae8..c88b8f8 100755 --- a/dev/bin/install-dev-tools.sh +++ b/dev/bin/install-dev-tools.sh @@ -17,6 +17,7 @@ function install_tools() { run "ubi --project koalaman/shellcheck --in ~/bin" run "ubi --project mvdan/sh --in ~/bin --exe shfmt" run "ubi --project crate-ci/typos --in ~/bin" + run "ubi --project tamasfe/taplo --tag 0.8.1 --in ~/bin" run "npm install prettier@2.7.1" } diff --git a/precious.toml b/precious.toml index 73b997e..9848794 100644 --- a/precious.toml +++ b/precious.toml @@ -1,22 +1,20 @@ -exclude = [ - "target", -] +exclude = ["target"] [commands.rustfmt] -type = "both" +type = "both" include = "**/*.rs" -cmd = [ "rustfmt", "--edition", "2021" ] +cmd = ["rustfmt", "--edition", "2021"] lint_flags = "--check" ok_exit_codes = [0] lint_failure_exit_codes = [1] [commands.clippy] -type = "lint" -include = "**/*.rs" -invoke = "once" -path-args = "none" +type = "lint" +include = "**/*.rs" +invoke = "once" +path-args = "none" working-dir = "root" -cmd = [ "cargo", "clippy", "--locked", "--all-targets", "--all-features", "--", "-D", "clippy::all" ] +cmd = ["cargo", "clippy", "--locked", "--all-targets", "--all-features", "--", "-D", "clippy::all"] ok_exit_codes = 0 lint_failure_exit_codes = 101 expect_stderr = true @@ -24,7 +22,7 @@ expect_stderr = true [commands.omegasort-gitignore] type = "both" include = "**/.gitignore" -cmd = [ "omegasort", "--sort=path" ] +cmd = ["omegasort", "--sort=path"] lint_flags = "--check" tidy_flags = "--in-place" ok_exit_codes = 0 @@ -32,26 +30,33 @@ lint_failure_exit_codes = 1 expect_stderr = true [commands.prettier] -type = "both" -include = [ "**/*.md", "**/*.yml" ] -cmd = [ "./node_modules/.bin/prettier", "--no-config", "--prose-wrap", "always", "--print-width", "100" ] +type = "both" +include = ["**/*.md", "**/*.yml"] +cmd = [ + "./node_modules/.bin/prettier", + "--no-config", + "--prose-wrap", + "always", + "--print-width", + "100", +] lint_flags = "--check" tidy_flags = "--write" ok_exit_codes = 0 lint_failure_exit_codes = 1 -ignore_stderr = [ "Code style issues" ] +ignore_stderr = "Code style issues" [commands.shellcheck] -type = "lint" +type = "lint" include = "**/*.sh" -cmd = "shellcheck" +cmd = "shellcheck" ok_exit_codes = 0 lint_failure_exit_codes = 1 [commands.shfmt] type = "both" include = "**/*.sh" -cmd = [ "shfmt", "--simplify", "--indent", "4" ] +cmd = ["shfmt", "--simplify", "--indent", "4"] lint_flags = "--diff" tidy_flags = "--write" ok_exit_codes = 0 @@ -65,3 +70,12 @@ cmd = "typos" invoke = "once" ok-exit-codes = 0 lint-failure-exit-codes = 2 + +[commands.taplo] +type = "both" +include = "**/*.toml" +cmd = ["taplo", "format", "--option", "indent_string= ", "--option", "column_width=100"] +lint_flags = "--check" +ok_exit_codes = 0 +lint_failure_exit_codes = 1 +ignore_stderr = "INFO taplo.+"