Skip to content

Commit

Permalink
Add types_or option
Browse files Browse the repository at this point in the history
  • Loading branch information
avdv committed May 1, 2021
1 parent 256de58 commit 4feb15a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/pre-commit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ let
'';
default = [ "file" ];
};
types_or =
mkOption {
type = types.listOf types.str;
description =
''
List of file types to run on, where only a single type needs to match.
'';
default = [ ];
};
description =
mkOption {
type = types.str;
Expand Down Expand Up @@ -113,7 +122,7 @@ let
{
raw =
{
inherit (config) name entry language files types pass_filenames;
inherit (config) name entry language files types types_or pass_filenames;
id = name;
exclude = mergeExcludes config.excludes;
};
Expand Down

0 comments on commit 4feb15a

Please sign in to comment.