Skip to content

Commit 6f5810b

Browse files
committed
Add nixf-diagnose
1 parent 50b9238 commit 6f5810b

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ use nix
387387
- [deadnix](https://github.com/astro/deadnix)
388388
- [flake-checker](https://github.com/DeterminateSystems/flake-checker)
389389
- [nil](https://github.com/oxalica/nil)
390+
- [nixf-diagnose](https://github.com/inclyc/nixf-diagnose)
390391
- [nixfmt](https://github.com/NixOS/nixfmt/) (supports `nixfmt` >=v1.0)
391392
- [nixfmt-classic](https://github.com/NixOS/nixfmt/tree/v0.6.0)
392393
- [nixfmt-rfc-style](https://github.com/NixOS/nixfmt/)

modules/hooks.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,12 @@ in
972972
imports = [ hookModule ];
973973
};
974974
};
975+
nixf-diagnose = mkOption {
976+
description = "nixf-diagnose hook";
977+
type = types.submodule {
978+
imports = [ hookModule ];
979+
};
980+
};
975981
nixfmt = mkOption {
976982
description = "nixfmt hook";
977983
type = types.submodule {
@@ -3459,6 +3465,14 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourm
34593465
builtins.toString script;
34603466
files = "\\.nix$";
34613467
};
3468+
nixf-diagnose =
3469+
{
3470+
name = "nixf-diagnose";
3471+
description = "wrapper for nixf-tidy.";
3472+
package = tools.nixf-diagnose;
3473+
entry = "${hooks.nixf-diagnose.package}/bin/nixf-diagnose";
3474+
files = "\\.nix$";
3475+
};
34623476
nixfmt =
34633477
{
34643478
name = "nixfmt";

nix/tools.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
, mdsh
5353
, nbstripout
5454
, nil
55+
, nixf-diagnose
5556
, nixfmt
5657
, nixfmt-classic ? placeholder "nixfmt-classic"
5758
, nixfmt-rfc-style ? placeholder "nixfmt-rfc-style"
@@ -159,6 +160,7 @@ in
159160
mdsh
160161
nbstripout
161162
nil
163+
nixf-diagnose
162164
nixpkgs-fmt
163165
opam
164166
opentofu

0 commit comments

Comments
 (0)