about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-01-19T18·23+0300
committertazjin <tazjin@tvl.su>2022-01-21T11·49+0000
commit3e9aa7722d87d1e6fee2f88267f10b0c4903ab12 (patch)
treed4aca6a93f3c272387c2a797f975b0adff778feb
parent4e82a9dc866ca5852c90cfc57b926b34e3de0692 (diff)
refactor(depotfmt): Move formatting check into an extra step r/3653
Change-Id: I7e4cf6bb2351bd11a5396f1663c0d4cc97c0d94e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5009
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
-rw-r--r--ops/pipelines/depot.nix9
-rw-r--r--tools/depotfmt.nix6
2 files changed, 6 insertions, 9 deletions
diff --git a/ops/pipelines/depot.nix b/ops/pipelines/depot.nix
index 232d229b90d8..036ddada0ed7 100644
--- a/ops/pipelines/depot.nix
+++ b/ops/pipelines/depot.nix
@@ -11,17 +11,10 @@ let
     label = ":water_buffalo:";
   };
 
-  # Formatting check which validates that all supported auto-formatted
-  # files are formatted correctly. See //tools/depotfmt for details.
-  depotfmtCheck = {
-    command = "${depot.tools.depotfmt.check}";
-    label = ":evergreen_tree: (tools/depotfmt)";
-  };
-
   pipeline = depot.nix.buildkite.mkPipeline {
     headBranch = "refs/heads/canon";
     drvTargets = depot.ci.targets;
-    additionalSteps = [ depotfmtCheck protoCheck ];
+    additionalSteps = [ protoCheck ];
 
     parentTargetMap = if (externalArgs ? parentTargetMap)
       then builtins.fromJSON (builtins.readFile externalArgs.parentTargetMap)
diff --git a/tools/depotfmt.nix b/tools/depotfmt.nix
index 312ef3f8df07..8c8e99c0891e 100644
--- a/tools/depotfmt.nix
+++ b/tools/depotfmt.nix
@@ -35,5 +35,9 @@ let
       --tree-root .
   '';
 in depotfmt.overrideAttrs(_: {
-  passthru.check = check;
+  passthru.meta.ci.extraSteps.check = {
+    label = "depot formatting check";
+    command = check;
+    alwaysRun = true;
+  };
 })