Skip to content

Commit

Permalink
elm-review: accept params in a file (#3)
Browse files Browse the repository at this point in the history
For easily managing “ignores” per-project.
  • Loading branch information
PedroHLC authored Nov 4, 2023
1 parent fef99b4 commit 0ab35c8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
reviewCmd = mkOption {
type = lib.types.str;
default = with config.languages.elm;
"${binReview} --template ${lib.strings.escapeShellArg reviewTemplate}";
toString (pkgs.writeShellScript "env-elm-review" ''
exec ${binReview} \
--template ${lib.strings.escapeShellArg reviewTemplate} \
$(cat "''${DEVENV_ROOT:-.}/.elm-review" || true);
'');
};
};
};
Expand All @@ -61,7 +65,7 @@
};
elm-review = {
enable = true;
entry = mkForce "${reviewCmd}";
entry = mkForce reviewCmd;
files = mkForce files;
};
nixpkgs-fmt = {
Expand Down

0 comments on commit 0ab35c8

Please sign in to comment.