Skip to content

Commit bdf843b

Browse files
committed
hooks: fix hooks
1 parent 80be085 commit bdf843b

File tree

155 files changed

+1205
-467
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+1205
-467
lines changed

modules/hooks.nix

Lines changed: 71 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ in
5757
config.hookModule = {
5858
imports = [ ./hook.nix ];
5959
config._module.args = {
60+
inherit pkgs;
6061
inherit (cfg) default_stages settings tools;
6162
mkCmdArgs = predActionList:
6263
lib.concatStringsSep
@@ -125,11 +126,11 @@ in
125126
check-yaml = mkHook ./hooks/check-yaml.nix "Check syntax of YAML files.";
126127
checkmake = mkHook ./hooks/checkmake.nix "Experimental linter/analyzer for Makefiles";
127128
chktex = mkHook ./hooks/chktex.nix "LaTeX semantic checker";
128-
cljfmt = mkHook ./hooks/cljfmt.nix "A tool for formatting Clojure code.";
129129
circleci = mkHook ./hooks/circleci.nix "Validate CircleCI config files.";
130130
clang-format = mkHook ./hooks/clang-format.nix "Format your code using `clang-format`.";
131131
clang-tidy = mkHook ./hooks/clang-tidy.nix "Static analyzer for C++ code.";
132132
clippy = mkHook ./hooks/clippy.nix "Lint Rust code.";
133+
cljfmt = mkHook ./hooks/cljfmt.nix "A tool for formatting Clojure code.";
133134
cmake-format = mkHook ./hooks/cmake-format.nix "A tool for formatting CMake-files.";
134135
commitizen = mkHook ./hooks/commitizen.nix "Check whether the current commit message follows committing rules.";
135136
conform = mkHook ./hooks/conform.nix "Policy enforcement for commits.";
@@ -140,12 +141,12 @@ in
140141
dart-analyze = mkHook ./hooks/dart-analyze.nix "Dart analyzer";
141142
dart-format = mkHook ./hooks/dart-format.nix "Dart formatter";
142143
deadnix = mkHook ./hooks/deadnix.nix "Scan Nix files for dead code (unused variable bindings).";
144+
denofmt = mkHook ./hooks/denofmt.nix "Auto-format JavaScript, TypeScript, Markdown, and JSON files.";
145+
denolint = mkHook ./hooks/denolint.nix "Lint JavaScript/TypeScript source code.";
143146
detect-aws-credentials = mkHook ./hooks/detect-aws-credentials.nix "Detect AWS credentials from the AWS cli credentials file.";
144147
detect-private-keys = mkHook ./hooks/detect-private-keys.nix "Detect the presence of private keys.";
145148
dhall-format = mkHook ./hooks/dhall-format.nix "Dhall code formatter.";
146149
dialyzer = mkHook ./hooks/dialyzer.nix "Runs a static code analysis using Dialyzer";
147-
denofmt = mkHook ./hooks/denofmt.nix "Auto-format JavaScript, TypeScript, Markdown, and JSON files.";
148-
denolint = mkHook ./hooks/denolint.nix "Lint JavaScript/TypeScript source code.";
149150
dune-fmt = mkHook ./hooks/dune-fmt.nix "Runs dune-build-opam-files to ensure OCaml and Dune are in sync";
150151
dune-opam-sync = mkHook ./hooks/dune-opam-sync.nix "Check that Dune-generated OPAM files are in sync.";
151152
eclint = mkHook ./hooks/eclint.nix "EditorConfig linter written in Go.";
@@ -155,13 +156,13 @@ in
155156
elm-test = mkHook ./hooks/elm-test.nix "Run unit tests and fuzz tests for Elm code.";
156157
end-of-file-fixer = mkHook ./hooks/end-of-file-fixer.nix "Ensures that a file is either empty, or ends with a single newline.";
157158
eslint = mkHook ./hooks/eslint.nix "Find and fix problems in your JavaScript code.";
158-
flake8 = mkHook ./hooks/flake8.nix "Check the style and quality of Python files.";
159159
fix-byte-order-marker = mkHook ./hooks/fix-byte-order-marker.nix "Remove UTF-8 byte order marker.";
160160
fix-encoding-pragma = mkHook ./hooks/fix-encoding-pragma.nix "Adds # -*- coding: utf-8 -*- to the top of Python files.";
161+
flake8 = mkHook ./hooks/flake8.nix "Check the style and quality of Python files.";
161162
flake-checker = mkHook ./hooks/flake-checker.nix "Run health checks on your flake-powered Nix projects.";
162163
flynt = mkHook ./hooks/flynt.nix "CLI tool to convert a python project's %-formatted strings to f-strings.";
163-
fourmolu = mkHook ./hooks/fourmolu.nix "Haskell code prettifier.";
164164
forbid-new-submodules = mkHook ./hooks/forbid-new-submodules.nix "Prevent addition of new Git submodules.";
165+
fourmolu = mkHook ./hooks/fourmolu.nix "Haskell code prettifier.";
165166
fprettify = mkHook ./hooks/fprettify.nix "Auto-formatter for modern Fortran code.";
166167
gitlint = mkHook ./hooks/gitlint.nix "Linting for your git commit messages";
167168
gofmt = mkHook ./hooks/gofmt.nix "A tool that automatically formats Go source code";
@@ -174,38 +175,58 @@ in
174175
headache = mkHook ./hooks/headache.nix "Lightweight tool for managing headers in source code files.";
175176
hlint = mkHook ./hooks/hlint.nix "Haskell linter";
176177
hpack = mkHook ./hooks/hpack.nix "A modern format for Haskell packages";
178+
html-tidy = mkHook ./hooks/html-tidy.nix "HTML linter.";
179+
hunspell = mkHook ./hooks/hunspell.nix "Spell checker and morphological analyzer.";
177180
isort = mkHook ./hooks/isort.nix "A Python utility/library to sort imports.";
181+
juliaformatter = mkHook ./hooks/juliaformatter.nix "Run JuliaFormatter.jl against Julia source files";
178182
lacheck = mkHook ./hooks/lacheck.nix "LaTeX checker";
179183
latexindent = mkHook ./hooks/latexindent.nix "Perl script to add indentation to LaTeX files";
180184
lua-ls = mkHook ./hooks/lua-ls.nix "Lua language server";
181-
lychee = mkHook ./hooks/lychee.nix "Fast, async, stream-based link checker";
182-
markdownlint = mkHook ./hooks/markdownlint.nix "Markdown linter";
183-
mdl = mkHook ./hooks/mdl.nix "Markdown linter";
184-
mkdocs-linkcheck = mkHook ./hooks/mkdocs-linkcheck.nix "MkDocs link checker";
185-
mypy = mkHook ./hooks/mypy.nix "Optional static type checker for Python";
186-
nixfmt = (mkHook ./hooks/nixfmt.nix "Deprecated nixfmt hook. Use nixfmt-classic or nixfmt-rfc-style instead.") // { visible = false; };
187-
nixfmt-classic = mkHook ./hooks/nixfmt-classic.nix "nixfmt (classic)";
188-
nixfmt-rfc-style = mkHook ./hooks/nixfmt-rfc-style.nix "nixfmt (RFC 166 style)";
189-
nixpkgs-fmt = mkHook ./hooks/nixpkgs-fmt.nix "Nix code formatter for nixpkgs.";
190-
no-commit-to-branch = mkHook ./hooks/no-commit-to-branch.nix "Protect specific branches from direct checkins";
185+
luacheck = mkHook ./hooks/luacheck.nix "A tool for linting and static analysis of Lua code.";
186+
lychee = mkHook ./hooks/lychee.nix "A fast, async, stream-based link checker that finds broken hyperlinks and mail addresses inside Markdown, HTML, reStructuredText, or any other text file or website.";
187+
markdownlint = mkHook ./hooks/markdownlint.nix "Style checker and linter for markdown files.";
188+
mdformat = mkHook ./hooks/mdformat.nix "CommonMark compliant Markdown formatter";
189+
mdl = mkHook ./hooks/mdl.nix "A tool to check markdown files and flag style issues.";
190+
mdsh = mkHook ./hooks/mdsh.nix "Markdown shell pre-processor.";
191+
mix-format = mkHook ./hooks/mix-format.nix "Runs the built-in Elixir syntax formatter";
192+
mix-test = mkHook ./hooks/mix-test.nix "Runs the built-in Elixir test framework";
193+
mixed-line-endings = mkHook ./hooks/mixed-line-endings.nix "Resolve mixed line endings.";
194+
mkdocs-linkcheck = mkHook ./hooks/mkdocs-linkcheck.nix "Validate links associated with markdown-based, statically generated websites";
195+
mypy = mkHook ./hooks/mypy.nix "Static type checker for Python";
196+
name-tests-test = mkHook ./hooks/name-tests-test.nix "Verify that Python test files are named correctly.";
197+
nil = mkHook ./hooks/nil.nix "Incremental analysis assistant for writing in Nix.";
198+
nixfmt = (mkHook ./hooks/nixfmt.nix "Deprecated Nix code prettifier. Use nixfmt-classic or nixfmt-rfc-style instead.") // { visible = false; };
199+
nixfmt-classic = mkHook ./hooks/nixfmt-classic.nix "Nix code prettifier (classic)";
200+
nixfmt-rfc-style = mkHook ./hooks/nixfmt-rfc-style.nix "Nix code prettifier (RFC 166 style).";
201+
nixpkgs-fmt = mkHook ./hooks/nixpkgs-fmt.nix "Nix code prettifier.";
202+
no-commit-to-branch = mkHook ./hooks/no-commit-to-branch.nix "Disallow committing to certain branch/branches.";
203+
ocp-indent = mkHook ./hooks/ocp-indent.nix "A tool to indent OCaml code.";
204+
opam-lint = mkHook ./hooks/opam-lint.nix "OCaml package manager configuration checker";
205+
openapi-spec-validator = mkHook ./hooks/openapi-spec-validator.nix "Validate OpenAPI specifications.";
191206
ormolu = mkHook ./hooks/ormolu.nix "Haskell source code formatter";
192-
php-cs-fixer = mkHook ./hooks/php-cs-fixer.nix "PHP coding standards fixer";
193-
phpcbf = mkHook ./hooks/phpcbf.nix "PHP code beautifier and fixer";
194-
phpcs = mkHook ./hooks/phpcs.nix "PHP code sniffer";
195-
phpstan = mkHook ./hooks/phpstan.nix "PHP static analysis tool";
196-
# See all CLI flags for prettier [here](https://prettier.io/docs/en/cli.html).
197-
# See all options for prettier [here](https://prettier.io/docs/en/options.html).
198-
prettier = mkHook ./hooks/prettier.nix "Prettier code formatter";
207+
php-cs-fixer = mkHook ./hooks/php-cs-fixer.nix "Lint PHP files.";
208+
phpcbf = mkHook ./hooks/phpcbf.nix "Lint PHP files.";
209+
phpcs = mkHook ./hooks/phpcs.nix "Lint PHP files.";
210+
phpstan = mkHook ./hooks/phpstan.nix "Static analysis of PHP files.";
211+
poetry-check = mkHook ./hooks/poetry-check.nix "Check the validity of the pyproject.toml file.";
212+
poetry-lock = mkHook ./hooks/poetry-lock.nix "Update the poetry.lock file.";
213+
pre-commit-hook-ensure-sops = mkHook ./hooks/pre-commit-hook-ensure-sops.nix "Ensure that sops files are encrypted.";
214+
prettier = mkHook ./hooks/prettier.nix "Opinionated multi-language code formatter.";
199215
pretty-format-json = mkHook ./hooks/pretty-format-json.nix "Pretty format JSON";
200216
proselint = mkHook ./hooks/proselint.nix "A linter for prose";
201217
psalm = mkHook ./hooks/psalm.nix "PHP static analysis tool";
202-
pylint = mkHook ./hooks/pylint.nix "Python static code analysis tool";
218+
purs-tidy = mkHook ./hooks/purs-tidy.nix "Format purescript files.";
219+
purty = mkHook ./hooks/purty.nix "Format purescript files";
220+
pylint = mkHook ./hooks/pylint.nix "Lint Python files.";
203221
pyright = mkHook ./hooks/pyright.nix "Static type checker for Python";
204-
pyupgrade = mkHook ./hooks/pyupgrade.nix "Upgrade syntax for newer versions of Python";
205-
reuse = mkHook ./hooks/reuse.nix "REUSE is a tool for compliance with the REUSE recommendations";
206-
revive = mkHook ./hooks/revive.nix "Fast, configurable, extensible, flexible, and beautiful linter for Go";
222+
python-debug-statements = mkHook ./hooks/python-debug-statements.nix "Check for debugger imports and py37+ `breakpoint()` calls in python source.";
223+
pyupgrade = mkHook ./hooks/pyupgrade.nix "Upgrade syntax for newer versions of Python.";
224+
reuse = mkHook ./hooks/reuse.nix "reuse is a tool for compliance with the REUSE recommendations.";
225+
revive = mkHook ./hooks/revive.nix "A linter for Go source code.";
207226
ripsecrets = mkHook ./hooks/ripsecrets.nix "Prevent committing secret keys into your source code";
208227
rome = (mkHook ./hooks/rome.nix "Deprecated rome hook. Use biome instead.") // { visible = false; };
228+
ruff = mkHook ./hooks/ruff.nix "An extremely fast Python linter, written in Rust.";
229+
ruff-format = mkHook ./hooks/ruff-format.nix "An extremely fast Python code formatter, written in Rust.";
209230
rustfmt = mkHook ./hooks/rustfmt.nix ''
210231
Rust code formatter
211232
@@ -216,9 +237,23 @@ in
216237
hooks.rustfmt.packageOverrides.rustfmt = pkgs.rustfmt;
217238
```
218239
'';
219-
shfmt = mkHook ./hooks/shfmt.nix "A shell parser, formatter, and interpreter";
220-
sort-file-contents = mkHook ./hooks/sort-file-contents.nix "Sort file contents";
240+
selene = mkHook ./hooks/selene.nix "A blazing-fast modern Lua linter written in Rust.";
241+
shellcheck = mkHook ./hooks/shellcheck.nix "Format shell files.";
242+
shfmt = mkHook ./hooks/shfmt.nix "Format shell files.";
243+
single-quoted-strings = mkHook ./hooks/single-quoted-strings.nix "Replace double quoted strings with single quoted strings.";
244+
sort-file-contents = mkHook ./hooks/sort-file-contents.nix "Sort the lines in specified files (defaults to alphabetical).";
245+
sort-requirements-txt = mkHook ./hooks/sort-requirements-txt.nix "Sort requirements in requirements.txt and constraints.txt files.";
246+
sort-simple-yaml = mkHook ./hooks/sort-simple-yaml.nix "Sort simple YAML files which consist only of top-level keys, preserving comments and blocks.";
247+
staticcheck = mkHook ./hooks/staticcheck.nix "State of the art linter for the Go programming language.";
221248
statix = mkHook ./hooks/statix.nix "Lints and suggestions for the Nix programming language";
249+
stylish-haskell = mkHook ./hooks/stylish-haskell.nix "A simple Haskell code prettifier.";
250+
stylua = mkHook ./hooks/stylua.nix "An opinionated code formatter for Lua.";
251+
tagref = mkHook ./hooks/tagref.nix "Have tagref check all references and tags.";
252+
taplo = mkHook ./hooks/taplo.nix "Format TOML files with taplo fmt";
253+
terraform-format = mkHook ./hooks/terraform-format.nix "Format Terraform (`.tf`) files.";
254+
terraform-validate = mkHook ./hooks/terraform-validate.nix "Validates terraform configuration files (`.tf`).";
255+
tflint = mkHook ./hooks/tflint.nix "A pluggable Terraform linter.";
256+
topiary = mkHook ./hooks/topiary.nix "A universal formatter engine within the Tree-sitter ecosystem, with support for many languages.";
222257
treefmt = mkHook ./hooks/treefmt.nix ''
223258
One CLI to format the code tree
224259
@@ -237,10 +272,15 @@ in
237272
hooks.treefmt.packageOverrides.treefmt = pkgs.treefmt;
238273
```
239274
'';
275+
trim-trailing-whitespace = mkHook ./hooks/trim-trailing-whitespace.nix "Trim trailing whitespace.";
276+
trufflehog = mkHook ./hooks/trufflehog.nix "Secrets scanner.";
240277
typos = mkHook ./hooks/typos.nix "Source code spell checker";
241-
vale = mkHook ./hooks/vale.nix "A command-line tool that brings code-like linting to prose";
242-
yamlfmt = mkHook ./hooks/yamlfmt.nix "YAML formatter";
243-
yamllint = mkHook ./hooks/yamllint.nix "YAML linter";
278+
typstfmt = mkHook ./hooks/typstfmt.nix "Format Typst files.";
279+
typstyle = mkHook ./hooks/typstyle.nix "Beautiful and reliable typst code formatter.";
280+
vale = mkHook ./hooks/vale.nix "A markup-aware linter for prose built with speed and extensibility in mind.";
281+
yamlfmt = mkHook ./hooks/yamlfmt.nix "Formatter for YAML files.";
282+
yamllint = mkHook ./hooks/yamllint.nix "Linter for YAML files.";
283+
zprint = mkHook ./hooks/zprint.nix "Beautifully format Clojure and Clojurescript source code and s-expressions.";
244284
};
245285

246286
config.warnings =

modules/hooks/actionlint.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{ tools, lib, ... }:
1+
{ config, tools, lib, ... }:
22
{
33
config = {
44
name = "actionlint";
55
description = "Static checker for GitHub Actions workflow files";
66
files = "^.github/workflows/";
77
types = [ "yaml" ];
88
package = tools.actionlint;
9-
entry = "${tools.actionlint}/bin/actionlint";
9+
entry = "${config.package}/bin/actionlint";
1010
};
11-
}
11+
}

modules/hooks/alejandra.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ in
4949
[ (threads != null) "--threads ${toString threads}" ]
5050
]);
5151
in
52-
"${tools.alejandra}/bin/alejandra ${cmdArgs}";
52+
"${config.package}/bin/alejandra ${cmdArgs}";
5353
files = "\\.nix$";
5454
};
5555
}

modules/hooks/annex.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{ tools, lib, ... }:
1+
{ config, tools, lib, ... }:
22
{
33
config = {
44
name = "annex";
55
description = "Runs the git-annex hook for large file support";
66
package = tools.git-annex;
7-
entry = "${tools.git-annex}/bin/git-annex pre-commit";
7+
entry = "${config.package}/bin/git-annex pre-commit";
88
};
9-
}
9+
}

modules/hooks/ansible-lint.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ in
2929
[ (config.settings.configPath != "") "-c ${config.settings.configPath}" ]
3030
];
3131
in
32-
"${tools.ansible-lint}/bin/ansible-lint ${cmdArgs}";
32+
"${config.package}/bin/ansible-lint ${cmdArgs}";
3333
files = if config.settings.subdir != "" then "${config.settings.subdir}/" else "";
3434
};
3535
}

modules/hooks/autoflake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ in
1010
description = "Path to autoflake binary.";
1111
default = null;
1212
defaultText = lib.literalExpression ''
13-
"''${tools.autoflake}/bin/autoflake"
13+
"''${config.package}/bin/autoflake"
1414
'';
1515
};
1616

modules/hooks/bats.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
{ tools, lib, ... }:
1+
{ tools, lib, config, ... }:
22
{
33
config = {
44
name = "bats";
55
description = "Run bash unit tests";
66
types = [ "shell" ];
77
types_or = [ "bats" "bash" ];
88
package = tools.bats;
9-
entry = "${tools.bats}/bin/bats -p";
9+
entry = "${config.package}/bin/bats -p";
1010
};
11-
}
11+
}

modules/hooks/beautysh.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{ tools, lib, ... }:
1+
{ tools, lib, config, ... }:
22
{
33
config = {
44
name = "beautysh";
55
description = "Format shell files";
66
types = [ "shell" ];
77
package = tools.beautysh;
8-
entry = "${tools.beautysh}/bin/beautysh";
8+
entry = "${config.package}/bin/beautysh";
99
};
10-
}
10+
}

modules/hooks/biome.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ in
1414
'';
1515
default = null;
1616
defaultText = lib.literalExpression ''
17-
"''${tools.biome}/bin/biome"
17+
"''${config.package}/bin/biome"
1818
'';
1919
example = lib.literalExpression ''
2020
"./node_modules/.bin/biome"

modules/hooks/black.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ in
1616
name = "black";
1717
description = "The uncompromising Python code formatter";
1818
package = tools.black;
19-
entry = "${tools.black}/bin/black ${config.settings.flags}";
19+
entry = "${config.package}/bin/black ${config.settings.flags}";
2020
types = [ "file" "python" ];
2121
};
2222
}

modules/hooks/cabal-fmt.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{ tools, lib, ... }:
1+
{ tools, lib, config, ... }:
22
{
33
config = {
44
name = "cabal-fmt";
55
description = "Format Cabal files";
66
package = tools.cabal-fmt;
7-
entry = "${tools.cabal-fmt}/bin/cabal-fmt --inplace";
7+
entry = "${config.package}/bin/cabal-fmt --inplace";
88
files = "\\.cabal$";
99
};
10-
}
10+
}

modules/hooks/cabal-gild.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
let
99
script = pkgs.writeShellScript "precommit-cabal-gild" ''
1010
for file in "$@"; do
11-
${tools.cabal-gild}/bin/cabal-gild --io="$file"
11+
${config.package}/bin/cabal-gild --io="$file"
1212
done
1313
'';
1414
in
1515
builtins.toString script;
1616
files = "\\.cabal$";
1717
};
18-
}
18+
}

modules/hooks/cabal2nix.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ in
1616
name = "cabal2nix";
1717
description = "Run `cabal2nix` on all `*.cabal` files to generate corresponding `.nix` files";
1818
package = tools.cabal2nix-dir;
19-
entry = "${tools.cabal2nix-dir}/bin/cabal2nix-dir --outputFileName=${config.settings.outputFilename}";
19+
entry = "${config.package}/bin/cabal2nix-dir --outputFileName=${config.settings.outputFilename}";
2020
files = "\\.cabal$";
2121
after = [ "hpack" ];
2222
};

modules/hooks/cargo-check.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ tools, lib, settings, ... }:
1+
{ tools, lib, settings, config, ... }:
22
let
33
inherit (settings.rust) cargoManifestPath;
44
cargoManifestPathArg =
@@ -11,7 +11,7 @@ in
1111
name = "cargo-check";
1212
description = "Check the cargo package for errors";
1313
package = tools.cargo;
14-
entry = "${tools.cargo}/bin/cargo check ${cargoManifestPathArg}";
14+
entry = "${config.package}/bin/cargo check ${cargoManifestPathArg}";
1515
files = "\\.rs$";
1616
pass_filenames = false;
1717
};
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{ tools, lib, ... }:
1+
{ tools, lib, config, ... }:
22
{
33
config = {
44
name = "check-added-large-files";
55
description = "Prevent very large files to be committed (e.g. binaries).";
66
package = tools.pre-commit-hooks;
7-
entry = "${tools.pre-commit-hooks}/bin/check-added-large-files";
7+
entry = "${config.package}/bin/check-added-large-files";
88
stages = [ "pre-commit" "pre-push" "manual" ];
99
};
10-
}
10+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
{ tools, lib, ... }:
1+
{ tools, lib, config, ... }:
22
{
33
config = {
44
name = "check-builtin-literals";
55
description = "Require literal syntax when initializing empty or zero builtin types in Python.";
66
package = tools.pre-commit-hooks;
7-
entry = "${tools.pre-commit-hooks}/bin/check-builtin-literals";
7+
entry = "${config.package}/bin/check-builtin-literals";
88
types = [ "python" ];
99
};
10-
}
10+
}

0 commit comments

Comments
 (0)