Skip to content

Commit

Permalink
dev: remove deprecated lib.mdDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Jun 20, 2024
1 parent 8cd35b9 commit 31b8b84
Show file tree
Hide file tree
Showing 4 changed files with 259 additions and 259 deletions.
10 changes: 5 additions & 5 deletions flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ in
options = {
pre-commit = {
check.enable = mkOption {
description = lib.mdDoc ''
description = ''
Whether to add a derivation to the flake `checks`.
It will perform the pre-commit checks in `nix flake check`.
Expand All @@ -33,7 +33,7 @@ in
};
pkgs = mkOption {
type = types.uniq (types.lazyAttrsOf (types.raw or types.unspecified));
description = lib.mdDoc ''
description = ''
Nixpkgs to use in the pre-commit [`settings`](#opt-perSystem.pre-commit.settings).
'';
default = pkgs;
Expand All @@ -45,20 +45,20 @@ in
specialArgs = { inherit (cfg) pkgs; };
};
default = { };
description = lib.mdDoc ''
description = ''
The pre-commit-hooks.nix configuration.
'';
};
installationScript = mkOption {
type = types.str;
description = lib.mdDoc "A bash fragment that sets up [pre-commit](https://pre-commit.com/).";
description = "A bash fragment that sets up [pre-commit](https://pre-commit.com/).";
default = cfg.settings.installationScript;
defaultText = lib.literalMD "bash statements";
readOnly = true;
};
devShell = mkOption {
type = types.package;
description = lib.mdDoc "A development shell with pre-commit installed and setup.";
description = "A development shell with pre-commit installed and setup.";
readOnly = true;
};
};
Expand Down
36 changes: 18 additions & 18 deletions modules/hook.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ in
options = {
enable = mkOption {
type = types.bool;
description = lib.mdDoc "Whether to enable this pre-commit hook.";
description = "Whether to enable this pre-commit hook.";
default = false;
};

raw = mkOption {
type = types.attrsOf types.unspecified;
description = lib.mdDoc
description =
''
Raw fields of a pre-commit hook. This is mostly for internal use but
exposed in case you need to work around something.
Expand All @@ -29,15 +29,15 @@ in
type = types.str;
defaultText = lib.literalMD "internal name, same as `id`";
default = name;
description = lib.mdDoc
description =
''
The name of the hook. Shown during hook execution.
'';
};

description = mkOption {
type = types.str;
description = lib.mdDoc
description =
''
Description of the hook. Used for metadata purposes only.
'';
Expand All @@ -47,7 +47,7 @@ in
package = mkOption {
type = types.nullOr types.package;
default = null;
description = lib.mdDoc
description =
''
An optional package that provides the hook.
'';
Expand All @@ -56,7 +56,7 @@ in
extraPackages = mkOption {
type = types.listOf types.package;
default = [ ];
description = lib.mdDoc
description =
''
Additional packages required to run the hook.
Expand All @@ -67,15 +67,15 @@ in

entry = mkOption {
type = types.str;
description = lib.mdDoc
description =
''
The entry point - the executable to run. {option}`entry` can also contain arguments that will not be overridden, such as `entry = "autopep8 -i";`.
'';
};

language = mkOption {
type = types.str;
description = lib.mdDoc
description =
''
The language of the hook - tells pre-commit how to install the hook.
'';
Expand All @@ -84,7 +84,7 @@ in

files = mkOption {
type = types.str;
description = lib.mdDoc
description =
''
The pattern of files to run on.
'';
Expand All @@ -93,7 +93,7 @@ in

types = mkOption {
type = types.listOf types.str;
description = lib.mdDoc
description =
''
List of file types to run on. See [Filtering files with types](https://pre-commit.com/#filtering-files-with-types).
'';
Expand All @@ -102,7 +102,7 @@ in

types_or = mkOption {
type = types.listOf types.str;
description = lib.mdDoc
description =
''
List of file types to run on, where only a single type needs to match.
'';
Expand All @@ -111,7 +111,7 @@ in

excludes = mkOption {
type = types.listOf types.str;
description = lib.mdDoc
description =
''
Exclude files that were matched by these patterns.
'';
Expand All @@ -120,31 +120,31 @@ in

pass_filenames = mkOption {
type = types.bool;
description = lib.mdDoc ''
description = ''
Whether to pass filenames as arguments to the entry point.
'';
default = true;
};

fail_fast = mkOption {
type = types.bool;
description = lib.mdDoc ''
description = ''
if true pre-commit will stop running hooks if this hook fails.
'';
default = false;
};

require_serial = mkOption {
type = types.bool;
description = lib.mdDoc ''
description = ''
if true this hook will execute using a single process instead of in parallel.
'';
default = false;
};

stages = mkOption {
type = (import ./supported-hooks.nix { inherit lib; }).supportedHooksType;
description = lib.mdDoc ''
description = ''
Confines the hook to run at a particular stage.
'';
default = default_stages;
Expand All @@ -154,15 +154,15 @@ in
verbose = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
description = ''
forces the output of the hook to be printed even when the hook passes.
'';
};

always_run = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
description = ''
if true this hook will run even if there are no matching files.
'';
};
Expand Down
Loading

0 comments on commit 31b8b84

Please sign in to comment.