task "script" "go_fmt" { inline = [ "go fmt ${join(" ", toset([for s in vcs.staged_files : "code.icb4dc0.de/buildr/api/${dirname(s)}" if ext(s) == ".go"]))}" ] continue_on_error = true } task "script" "buf_generate" { inline = [ "buf generate", "echo -e \"//go:build !wasi\\n\\n$(cat generated/rpc/v1/executor_grpc.pb.go)\" > generated/rpc/v1/executor_grpc.pb.go" ] out_dir = repo.root input_mapping = { "rpc" = "rpc", "buf.yaml" = "buf.yaml" "buf.gen.yaml" = "buf.gen.yaml" "buf.work.yaml" = "buf.work.yaml" } container { image = "docker.io/bufbuild/buf" } } task "script" "golangci_lint" { inline = [ "golangci-lint run -v" ] container { image = "golangci/golangci-lint" } depends_on = [ tasks.go_fmt.id, ] input_mapping = { "${repo.root}" = "." } }