Skip to content

Commit 6ebeece

Browse files
authored
Merge pull request #435 from loicreynier/feat-flake-checker
Add Flake Checker
2 parents 524539c + f0dcdc1 commit 6ebeece

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ use nix
143143

144144
- [alejandra](https://github.com/kamadorueda/alejandra)
145145
- [deadnix](https://github.com/astro/deadnix)
146+
- [flake-checker](https://github.com/DeterminateSystems/flake-checker)
146147
- [nil](https://github.com/oxalica/nil)
147148
- [nixfmt](https://github.com/serokell/nixfmt/)
148149
- [nixpkgs-fmt](https://github.com/nix-community/nixpkgs-fmt)

modules/hooks.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,6 +2239,14 @@ in
22392239
"${binPath} --format ${hooks.flake8.settings.format} ${extendIgnoreStr}";
22402240
types = [ "python" ];
22412241
};
2242+
flake-checker = {
2243+
name = "flake-checker";
2244+
description = "Run health checks on your flake-powered Nix projects.";
2245+
package = tools.flake-checker;
2246+
entry = "${hooks.flake-checker.package}/bin/flake-checker -f";
2247+
files = "(^flake\\.nix$|^flake\\.lock$)";
2248+
pass_filenames = false;
2249+
};
22422250
flynt =
22432251
{
22442252
name = "flynt";

nix/tools.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
, editorconfig-checker
2727
, elixir
2828
, elmPackages
29+
, flake-checker ? null
2930
, fprettify
3031
, git-annex
3132
, gptcommit ? null
@@ -108,6 +109,7 @@ in
108109
eclint
109110
editorconfig-checker
110111
elixir
112+
flake-checker
111113
fprettify
112114
go
113115
go-tools

0 commit comments

Comments
 (0)