Skip to content

Commit

Permalink
Merge pull request #456 from danjujan/master
Browse files Browse the repository at this point in the history
feat: add reuse
sandydoo authored Jun 19, 2024
2 parents ed4ce20 + 7b66b09 commit 97c0dc8
Showing 2 changed files with 25 additions and 0 deletions.
23 changes: 23 additions & 0 deletions modules/hooks.nix
Original file line number Diff line number Diff line change
@@ -1294,6 +1294,20 @@ in
};
};
};
reuse = mkOption {
description = lib.mdDoc "reuse hook";
type = types.submodule {
imports = [ hookModule ];
options.settings = {
flags = mkOption {
type = types.str;
description = lib.mdDoc "Flags passed to reuse. For available options run 'reuse lint --help'";
default = "";
example = "--json";
};
};
};
};
revive = mkOption {
description = lib.mdDoc "revive hook";
type = types.submodule {
@@ -3088,6 +3102,15 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
entry = migrateBinPathToPackage hooks.pyupgrade "/bin/pyupgrade";
types = [ "python" ];
};
reuse =
{
name = "reuse";
description = "reuse is a tool for compliance with the REUSE recommendations.";
package = tools.reuse;
entry = "${hooks.reuse.package}/bin/reuse lint ${hooks.reuse.settings.flags}";
types = [ "file" ];
pass_filenames = false;
};
revive =
{
name = "revive";
2 changes: 2 additions & 0 deletions nix/tools.nix
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@
, pyright ? nodePackages.pyright
, php82Packages
, ripsecrets ? null
, reuse
, ruff ? null
, rustfmt
, shellcheck
@@ -133,6 +134,7 @@ in
pre-commit-hook-ensure-sops
poetry
pyright
reuse
revive
ripsecrets
ruff

0 comments on commit 97c0dc8

Please sign in to comment.