Skip to content

Commit

Permalink
Refine cargo-make tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jul 15, 2023
1 parent b5934c7 commit 3b10d02
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ dprint check
shfmt --diff ./**/*.bash
shellcheck ./**/*.bash
nixpkgs-fmt ./**/*.nix
# https://github.com/crate-ci/typos/issues/779
typos . .github
gitleaks detect
35 changes: 13 additions & 22 deletions Makefile.toml
Original file line number Diff line number Diff line change
@@ -1,56 +1,54 @@
[config]
skip_core_tasks = true

[tasks.default]
alias = "help"

[tasks.help]
script = [
'makers --list-all-steps',
]

[tasks.setup]
category = "Tools"
description = "Install and configure dependencies (WIP)"
script = [
"git config --local core.hooksPath .githooks",
]

[tasks.update]
category = "Tools"
script = [
"dprint config update --yes",
]

[tasks.format-check]
category = "Tools"
description = "Run formatters without changes"
script = [
"dprint check",
]

[tasks.format-apply]
category = "Tools"
description = "Run formatters with changes"
script = [
"dprint fmt",
]

[tasks.fmt]
alias = "format-apply"

[tasks.typos-check]
category = "Tools"
description = "Run formatters without changes"
script = [
"typos",
]

[tasks.prevent-secret]
category = "Tools"
script = [
"gitleaks detect",
]

[tasks.check]
category = "Tools"
description = 'Parallel runner for all tests and linters'
run_task = { name = ["typos-check", "format-check", "prevent-secret"] }

[tasks.versions]
category = "Tools"
description = 'Print dependency versions'
[tasks.deps]
script = [
"makers --version",
"nix --version",
"dprint --version",
"shellcheck --version",
"shfmt --version",
Expand All @@ -60,10 +58,3 @@ script = [
"fd --version",
"typos --version",
]

[tasks.help]
category = "Tools"
description = 'Might help you - (This one)'
script = [
'makers --list-category-steps Tools',
]

0 comments on commit 3b10d02

Please sign in to comment.