Commit graph

6 commits

Author SHA1 Message Date
Vincent Ambo
3e9aa7722d refactor(depotfmt): Move formatting check into an extra step
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>
2022-01-21 11:49:03 +00:00
Vincent Ambo
7ecb2a1144 refactor(tools/depotfmt): Move depotfmt check into a real build step
Produces more useful output and also makes for a good target for the
upcoming extraSteps logic.

Change-Id: Ifd389d433d9e27f97940a48999f4fba35646e37a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4727
Tested-by: BuildkiteCI
Autosubmit: tazjin <mail@tazj.in>
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-12-28 15:37:10 +00:00
Vincent Ambo
8a5ccd7089 fix(depotfmt): handle multiple terraform files
`terraform fmt` can only handle a single path, but treefmt expects
formatters to be able to handle multiple paths at once.

this wraps it in a small shell script that calls `terraform fmt` with
at most one path at a time.

Change-Id: I2b9c1b89b5a276f3d4915b95608ce36b2509e334
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4639
Tested-by: BuildkiteCI
Autosubmit: tazjin <mail@tazj.in>
Reviewed-by: grfn <grfn@gws.fyi>
2021-12-26 16:45:59 +00:00
Vincent Ambo
4c23a9c1d4 feat(depotfmt): run formatting checks in CI
Right now this only includes Go, but more is to come.

Change-Id: Idd8fc27c0eb25e82688ef8337ba20810d834f4b6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4504
Reviewed-by: zseri <zseri.devel@ytrizja.de>
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
Autosubmit: tazjin <mail@tazj.in>
2021-12-24 19:26:00 +00:00
Vincent Ambo
9c61d64a11 feat(depotfmt): add terraform formatting to depotfmt
Change-Id: I235e7fcbd49f11e71127ce31da9c11da4d220ff6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4584
Autosubmit: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-12-24 19:25:48 +00:00
Vincent Ambo
d018484376 feat(tools/depotfmt): add a treefmt wrapper with depot configuration
Right now the only included formatter is gofmt, but we will extend
this over time.

The version of treefmt is bumped to 0.3.0 (which supports custom
config files) until this lands in nixpkgs.

Change-Id: I1e1aafd05ec7427c616f90c90490c528ecb2615c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4399
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-12-18 20:26:26 +00:00