|
57 | 57 | config.hookModule = {
|
58 | 58 | imports = [ ./hook.nix ];
|
59 | 59 | config._module.args = {
|
| 60 | + inherit pkgs; |
60 | 61 | inherit (cfg) default_stages settings tools;
|
61 | 62 | mkCmdArgs = predActionList:
|
62 | 63 | lib.concatStringsSep
|
|
125 | 126 | check-yaml = mkHook ./hooks/check-yaml.nix "Check syntax of YAML files.";
|
126 | 127 | checkmake = mkHook ./hooks/checkmake.nix "Experimental linter/analyzer for Makefiles";
|
127 | 128 | chktex = mkHook ./hooks/chktex.nix "LaTeX semantic checker";
|
128 |
| - cljfmt = mkHook ./hooks/cljfmt.nix "A tool for formatting Clojure code."; |
129 | 129 | circleci = mkHook ./hooks/circleci.nix "Validate CircleCI config files.";
|
130 | 130 | clang-format = mkHook ./hooks/clang-format.nix "Format your code using `clang-format`.";
|
131 | 131 | clang-tidy = mkHook ./hooks/clang-tidy.nix "Static analyzer for C++ code.";
|
132 | 132 | clippy = mkHook ./hooks/clippy.nix "Lint Rust code.";
|
| 133 | + cljfmt = mkHook ./hooks/cljfmt.nix "A tool for formatting Clojure code."; |
133 | 134 | cmake-format = mkHook ./hooks/cmake-format.nix "A tool for formatting CMake-files.";
|
134 | 135 | commitizen = mkHook ./hooks/commitizen.nix "Check whether the current commit message follows committing rules.";
|
135 | 136 | conform = mkHook ./hooks/conform.nix "Policy enforcement for commits.";
|
|
140 | 141 | dart-analyze = mkHook ./hooks/dart-analyze.nix "Dart analyzer";
|
141 | 142 | dart-format = mkHook ./hooks/dart-format.nix "Dart formatter";
|
142 | 143 | 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."; |
143 | 146 | detect-aws-credentials = mkHook ./hooks/detect-aws-credentials.nix "Detect AWS credentials from the AWS cli credentials file.";
|
144 | 147 | detect-private-keys = mkHook ./hooks/detect-private-keys.nix "Detect the presence of private keys.";
|
145 | 148 | dhall-format = mkHook ./hooks/dhall-format.nix "Dhall code formatter.";
|
146 | 149 | 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."; |
149 | 150 | dune-fmt = mkHook ./hooks/dune-fmt.nix "Runs dune-build-opam-files to ensure OCaml and Dune are in sync";
|
150 | 151 | dune-opam-sync = mkHook ./hooks/dune-opam-sync.nix "Check that Dune-generated OPAM files are in sync.";
|
151 | 152 | eclint = mkHook ./hooks/eclint.nix "EditorConfig linter written in Go.";
|
|
155 | 156 | elm-test = mkHook ./hooks/elm-test.nix "Run unit tests and fuzz tests for Elm code.";
|
156 | 157 | end-of-file-fixer = mkHook ./hooks/end-of-file-fixer.nix "Ensures that a file is either empty, or ends with a single newline.";
|
157 | 158 | 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."; |
159 | 159 | fix-byte-order-marker = mkHook ./hooks/fix-byte-order-marker.nix "Remove UTF-8 byte order marker.";
|
160 | 160 | 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."; |
161 | 162 | flake-checker = mkHook ./hooks/flake-checker.nix "Run health checks on your flake-powered Nix projects.";
|
162 | 163 | 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."; |
164 | 164 | forbid-new-submodules = mkHook ./hooks/forbid-new-submodules.nix "Prevent addition of new Git submodules.";
|
| 165 | + fourmolu = mkHook ./hooks/fourmolu.nix "Haskell code prettifier."; |
165 | 166 | fprettify = mkHook ./hooks/fprettify.nix "Auto-formatter for modern Fortran code.";
|
166 | 167 | gitlint = mkHook ./hooks/gitlint.nix "Linting for your git commit messages";
|
167 | 168 | gofmt = mkHook ./hooks/gofmt.nix "A tool that automatically formats Go source code";
|
|
174 | 175 | headache = mkHook ./hooks/headache.nix "Lightweight tool for managing headers in source code files.";
|
175 | 176 | hlint = mkHook ./hooks/hlint.nix "Haskell linter";
|
176 | 177 | 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."; |
177 | 180 | 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"; |
178 | 182 | lacheck = mkHook ./hooks/lacheck.nix "LaTeX checker";
|
179 | 183 | latexindent = mkHook ./hooks/latexindent.nix "Perl script to add indentation to LaTeX files";
|
180 | 184 | 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."; |
191 | 206 | 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."; |
199 | 215 | pretty-format-json = mkHook ./hooks/pretty-format-json.nix "Pretty format JSON";
|
200 | 216 | proselint = mkHook ./hooks/proselint.nix "A linter for prose";
|
201 | 217 | 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."; |
203 | 221 | 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."; |
207 | 226 | ripsecrets = mkHook ./hooks/ripsecrets.nix "Prevent committing secret keys into your source code";
|
208 | 227 | 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."; |
209 | 230 | rustfmt = mkHook ./hooks/rustfmt.nix ''
|
210 | 231 | Rust code formatter
|
211 | 232 |
|
|
216 | 237 | hooks.rustfmt.packageOverrides.rustfmt = pkgs.rustfmt;
|
217 | 238 | ```
|
218 | 239 | '';
|
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."; |
221 | 248 | 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."; |
222 | 257 | treefmt = mkHook ./hooks/treefmt.nix ''
|
223 | 258 | One CLI to format the code tree
|
224 | 259 |
|
|
237 | 272 | hooks.treefmt.packageOverrides.treefmt = pkgs.treefmt;
|
238 | 273 | ```
|
239 | 274 | '';
|
| 275 | + trim-trailing-whitespace = mkHook ./hooks/trim-trailing-whitespace.nix "Trim trailing whitespace."; |
| 276 | + trufflehog = mkHook ./hooks/trufflehog.nix "Secrets scanner."; |
240 | 277 | 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."; |
244 | 284 | };
|
245 | 285 |
|
246 | 286 | config.warnings =
|
|
0 commit comments