Skip to content

Commit dd4e02c

Browse files
committed
Add nixf-diagnose
1 parent 8e7576e commit dd4e02c

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
visible = false;
@@ -3456,6 +3462,14 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourm
34563462
builtins.toString script;
34573463
files = "\\.nix$";
34583464
};
3465+
nixf-diagnose =
3466+
{
3467+
name = "nixf-diagnose";
3468+
description = "wrapper for nixf-tidy.";
3469+
package = tools.nixf-diagnose;
3470+
entry = "${hooks.nixf-diagnose.package}/bin/nixf-diagnose";
3471+
files = "\\.nix$";
3472+
};
34593473
nixfmt =
34603474
{
34613475
name = "nixfmt";

nix/tools.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
, mdsh
5555
, nbstripout
5656
, nil
57+
, nixf-diagnose
5758
, nixfmt
5859
, nixfmt-classic ? null
5960
, nixfmt-rfc-style ? null
@@ -162,6 +163,7 @@ in
162163
mdsh
163164
nbstripout
164165
nil
166+
nixf-diagnose
165167
nixpkgs-fmt
166168
opentofu
167169
ormolu

0 commit comments

Comments
 (0)