Skip to content

Commit

Permalink
statix: fix broken list option --ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Oct 11, 2024
1 parent 4ebefca commit 1fe5afc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3392,9 +3392,15 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
entry =
let
inherit (hooks.statix) package settings;
mkOptionName = k:
if builtins.stringLength k == 1
then "-${k}"
else "--${k}";
options = lib.cli.toGNUCommandLineShell
{
mkList = name: value: [ name ] ++ lib.unique value;
# instead of repeating the option name for each element,
# create a single option with a space-separated list of unique values.
mkList = k: v: [ (mkOptionName k) ] ++ lib.unique v;
}
settings;
in
Expand Down

0 comments on commit 1fe5afc

Please sign in to comment.