Revert "Merge pull request 'add pre-commit-check' (#1369) from fricklerhandwerk/clan-core:add-pre-commit into main"

This reverts commit 4c4afe8028, reversing
changes made to 2785f59960.
This commit is contained in:
Qubasa
2024-05-22 14:31:53 +02:00
parent 4c4afe8028
commit dcf98a93ee
3 changed files with 2 additions and 27 deletions

View File

@@ -1,4 +1,3 @@
{ inputs, ... }:
{
perSystem =
{
@@ -9,7 +8,6 @@
}:
let
writers = pkgs.callPackage ./pkgs/builders/script-writers.nix { };
inherit (pkgs.callPackage inputs.git-hooks { }) lib;
ansiEscapes = {
reset = ''\033[0m'';
@@ -22,11 +20,6 @@
select-shell = writers.writePython3Bin "select-shell" {
flakeIgnore = [ "E501" ];
} ./pkgs/scripts/select-shell.py;
# run treefmt before each commit
install-pre-commit-hook =
with lib.git-hooks;
pre-commit (wrap.abort-on-change config.treefmt.build.wrapper);
in
{
devShells.default = pkgs.mkShell {
@@ -41,7 +34,8 @@
config.treefmt.build.wrapper
];
shellHook = ''
${install-pre-commit-hook}
# no longer used
rm -f "$(git rev-parse --show-toplevel)/.git/hooks/pre-commit"
echo -e "${ansiEscapes.green}switch to another dev-shell using: select-shell${ansiEscapes.reset}"
'';