diff options
| author | Franck Cuny <franck@fcuny.net> | 2022-07-26 17:45:49 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2022-08-06 13:01:15 -0700 |
| commit | b42879a95377b4b10f12855d831eb58857b60d2e (patch) | |
| tree | 61676d392a6e536bd0eb44d13a18914c3374badb /ops/ci/fmt.nix | |
| parent | meta(flake): bump dependencies (diff) | |
| download | infra-b42879a95377b4b10f12855d831eb58857b60d2e.tar.gz | |
ref(ci): delete custom scripts for formatting
Since I have configured the pre-commit hooks, I can use them instead of
my custom scripts: less things to maintain and easier to read output.
Change-Id: Ic833ec88ed9fbcbe52b1b1680f978da3a5a08b31
Reviewed-on: https://cl.fcuny.net/c/world/+/681
Tested-by: CI
Reviewed-by: Franck Cuny <franck@fcuny.net>
Diffstat (limited to 'ops/ci/fmt.nix')
| -rw-r--r-- | ops/ci/fmt.nix | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/ops/ci/fmt.nix b/ops/ci/fmt.nix deleted file mode 100644 index a3d697c..0000000 --- a/ops/ci/fmt.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, ... }: -let - config = pkgs.writeText "depot-treefmt-config" '' - [formatter.go] - command = "${pkgs.go}/bin/gofmt" - includes = ["*.go"] - - [formatter.nix] - command = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" - options = [ "--check"] - includes = [ "*.nix" ] - ''; -in -rec { - mkFmtScript = src: - let - script = pkgs.writeScript "format" '' - set -euo pipefail - ROOT=$(${pkgs.git}/bin/git rev-parse --show-toplevel) - ${pkgs.treefmt}/bin/treefmt --clear-cache --fail-on-change --config-file ${config} --tree-root $ROOT - ''; - in - { - type = "app"; - program = "${script}"; - }; -} |
