amends "package://github.com/jdx/hk/releases/download/v1.47.0/hk@1.47.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.47.0/hk@1.47.0#/Builtins.pkl"
local linters = new Mapping<String, Step> {
["ansible"] {
check = "ansible-lint --exclude 'playbooks/*.meta.yml' {{files}}"
dir = "ansible"
glob = List("**/*.yml", "**/*.yaml")
}
["clippy"] = Builtins.cargo_clippy
["dprint"] {
fix = "dprint fmt"
stage = "*"
}
["shellcheck"] = Builtins.shellcheck
// shfmt reads .editorconfig for the Google Shell Style Guide settings.
["shfmt"] = Builtins.shfmt
}
hooks {
["pre-commit"] {
fix = true
stash = "git"
steps = linters
}
}