Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 38 additions & 1 deletion modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,28 @@ in
};
};
};
rumdl = mkOption {
description = "rumdl hook";
type = types.submodule {
imports = [ hookModule ];
options.settings = {
configuration =
mkOption {
type = types.attrs;
description =
"See https://github.com/rvben/rumdl?tab=readme-ov-file#configuration";
default = { };
example = {
configuration = {
MD013 = {
line-length = 100;
};
};
};
};
};
};
};
rustfmt = mkOption {
description = ''
Additional rustfmt settings
Expand Down Expand Up @@ -2185,7 +2207,7 @@ in

# PLEASE keep this sorted alphabetically.
config.hooks = mapAttrs (_: mapAttrs (_: mkDefault))
rec {
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this PR, but the linter marked it as unused, so I removed it.

actionlint =
{
name = "actionlint";
Expand Down Expand Up @@ -3895,6 +3917,21 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.fourm
entry = "${hooks.ruff.package}/bin/ruff format";
types = [ "python" ];
};
rumdl =
let
cmdArgs =
mkCmdArgs
(with hooks.rumdl.settings; [
[ (configuration != { }) " --config ${toml.generate ".rumdl.toml" configuration}" ]
]);
in
{
name = "rumdl";
description = "Style checker and linter for rumdl files.";
package = tools.rumdl;
entry = "${hooks.rumdl.package}/bin/rumdl check ${cmdArgs}";
files = "\\.md$";
};
rustfmt =
let
mkAdditionalArgs = args: lib.optionalString (args != "") " -- ${args}";
Expand Down
2 changes: 2 additions & 0 deletions nix/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
, ripsecrets ? placeholder "ripsecrets"
, reuse
, ruff ? placeholder "ruff"
, rumdl
, rustfmt
, selene
, shellcheck
Expand Down Expand Up @@ -171,6 +172,7 @@ in
revive
ripsecrets
ruff
rumdl
rustfmt
selene
shellcheck
Expand Down