From 0d875194b39c8587e8f18bf4c63d82c88ea68d34 Mon Sep 17 00:00:00 2001 From: dprotaso Date: Sun, 23 Jun 2024 21:22:38 -0400 Subject: [PATCH] add script to format code --- hack/format-code.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 hack/format-code.sh diff --git a/hack/format-code.sh b/hack/format-code.sh new file mode 100755 index 0000000000..b9ccea8fc9 --- /dev/null +++ b/hack/format-code.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Copyright 2024 The Knative Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + + +go run mvdan.cc/gofumpt@latest -l -w . +