Skip to content

vincentjames501/pre-commit-clojure

Repository files navigation

Clojure hooks for pre-commit

Clojure package for pre-commit hooks. Integrates with popular packages such as clj-kondo (static linter), kaocha (unit testing), and zprint (file formatting).

Usage with pre-commit

-   repo: https://github.com/vincentjames501/pre-commit-clojure
    rev: v1.x
    hooks:
    -   id: clj-kondo
    -   id: zprint
    -   it: kaocha
    

Passing arguments to clj-kondo

-   repo: https://github.com/vincentjames501/pre-commit-clojure
    rev: v1.x
    hooks:

    -   id: clj-kondo
        args: ['error']
    -   id: zprint
    -   id: kaocha
        # Must install pre-push: $ pre-commit install --hook-type pre-push
        # https://pre-commit.com/#pre-commit-during-push
        stages: [merge-commit, push, manual]  
        always_run: true