Skip to content

Commit

Permalink
pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
bristermitten committed Aug 17, 2023
1 parent 18c8e6c commit 2442a93
Show file tree
Hide file tree
Showing 2 changed files with 139 additions and 2 deletions.
127 changes: 126 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
flake-root.url = "github:srid/flake-root";
mission-control.url = "github:Platonic-Systems/mission-control";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";

h2jvm.url = "github:ElaraLang/h2jvm";
# h2jvm.flake = fa
Expand All @@ -17,7 +18,7 @@

};

outputs = inputs@{ self, nixpkgs, ... }:
outputs = inputs@{ self, pre-commit-hooks, nixpkgs, ... }:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {

systems = import inputs.systems;
Expand Down Expand Up @@ -119,6 +120,17 @@
};
};

checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
settings = {
treefmt.package = config.treefmt.build.wrapper;
};
hooks = {
treefmt.enable = true;
};
};
};


treefmt.config = {
Expand Down

0 comments on commit 2442a93

Please sign in to comment.