From 1ad6a788086cacddc9ce8861b880d17257925b5f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 28 Jun 2022 08:56:33 -0700 Subject: feat(flake): add more pre-commit hooks Add pre-commit hooks for: - trailing white spaces - new lines at the end of files Change-Id: I02b5c125064b1cc43e3dfcd7504f60df50846c36 Reviewed-on: https://cl.fcuny.net/c/world/+/593 Tested-by: CI Reviewed-by: Franck Cuny --- flake.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/flake.nix b/flake.nix index e36b4ed..a77cff1 100644 --- a/flake.nix +++ b/flake.nix @@ -73,6 +73,18 @@ src = ./.; hooks = { + trailing-whitespace = { + enable = true; + entry = "${pkgs.python3Packages.pre-commit-hooks}/bin/trailing-whitespace-fixer"; + types = [ "text" ]; + }; + + end-of-file-fixer = { + enable = true; + entry = "${pkgs.python3Packages.pre-commit-hooks}/bin/end-of-file-fixer"; + types = [ "text" ]; + }; + nixpkgs-fmt = { enable = true; }; -- cgit 1.4.1