Skip to content
Discussion options

You must be logged in to vote

As suggested, I ended up going with:

amends "package://github.com/jdx/hk/releases/download/v1.39.0/hk@1.39.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.39.0/hk@1.39.0#/Builtins.pkl"

local linters = new Mapping<String, Step> {
  // other linters
}

hooks {
  ["pre-commit"] {
    fix = true
    stash = "git"
    steps {
      ["no-commit-to-branch"] = Builtins.no_commit_to_branch
      ...linters
    }
  }
  ["pre-push"] {
    steps = linters
  }
  ["fix"] {
    fix = true
    steps = linters
  }
  ["check"] {
    steps = linters
  }
}

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@gregbrowndev
Comment options

@jdx
Comment options

jdx Mar 25, 2026
Maintainer

@astei
Comment options

@astei
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by gregbrowndev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants