chore(pre-commit): add deadnix
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
nydragon 2025-04-04 22:44:29 +02:00
parent 1d9dd09138
commit c8ac1786bd
No known key found for this signature in database
2 changed files with 12 additions and 5 deletions

View file

@ -11,12 +11,11 @@ repos:
- repo: local - repo: local
hooks: hooks:
- id: nixpkgs-fmt - id: nix-fmt
name: Check nix formatting name: Check nix formatting
entry: nix fmt entry: nix fmt
language: system language: system
files: .*\.nix$ files: .*\.nix$
args: [-c]
stages: [pre-commit] stages: [pre-commit]
- id: prettier - id: prettier
@ -24,7 +23,7 @@ repos:
entry: prettier entry: prettier
language: system language: system
files: .*\.(css|scss|js|ts|yaml)$ files: .*\.(css|scss|js|ts|yaml)$
args: [-c] args: [--write]
stages: [pre-commit] stages: [pre-commit]
- id: typos - id: typos
@ -34,3 +33,11 @@ repos:
files: .* files: .*
exclude: .*\.(png|jpg|jpeg|age) exclude: .*\.(png|jpg|jpeg|age)
stages: [pre-commit] stages: [pre-commit]
- id: deadnix
name: Check for dead nix code
entry: deadnix
language: system
files: .+\.nix$
args: ["-e", "-l"]
stages: [pre-commit]

View file

@ -72,9 +72,9 @@
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
pre-commit pre-commit
nixfmt-rfc-style
nodePackages.prettier nodePackages.prettier
typos typos
deadnix
inputs'.agenix.packages.default inputs'.agenix.packages.default
]; ];
shellHook = '' shellHook = ''