From ad94ba3da9d05d4ef10c81c7743222a1c78aa881 Mon Sep 17 00:00:00 2001 From: Samuel Laferriere Date: Wed, 19 Jun 2024 13:55:45 -0700 Subject: [PATCH 1/3] add workflow to enforce make fmt to be run --- .github/workflows/check-fmt.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/check-fmt.yml diff --git a/.github/workflows/check-fmt.yml b/.github/workflows/check-fmt.yml new file mode 100644 index 00000000..0042dff2 --- /dev/null +++ b/.github/workflows/check-fmt.yml @@ -0,0 +1,33 @@ +name: check that make fmt was run +on: + push: + branches: + - master + pull_request: + +permissions: + contents: read + +jobs: + check-make-fmt: + name: check make fmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: install go1.21 + uses: actions/setup-go@v5 + with: + go-version: "1.21" + + - name: Run make fmt + run: make fmt + + - name: Check if make fmt generated changes that should be committed + run: | + if [ -n "$(git status --porcelain)" ]; then + echo "Error: make fmt generated changes that should be committed. Please run 'make fmt' and commit the changes." + git diff + git status + exit 1 + fi From 61056f33e5e5a13a8e59548a8f939cb93e5bedd2 Mon Sep 17 00:00:00 2001 From: Samuel Laferriere Date: Wed, 19 Jun 2024 13:56:00 -0700 Subject: [PATCH 2/3] update lint workflow to use same version actions as other workflows --- .github/workflows/golangci-lint.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 15ad759d..fbfc0efb 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -11,12 +11,15 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + + - name: install go 1.21 + uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: "1.21" + - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: version: latest - args: --timeout 3m \ No newline at end of file + args: --timeout 3m From e71246b3d23a5ccbaa2df9fca389a684cbf44404 Mon Sep 17 00:00:00 2001 From: Samuel Laferriere Date: Tue, 25 Jun 2024 22:09:16 -0700 Subject: [PATCH 3/3] make fmt --- chainio/clients/avsregistry/writer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chainio/clients/avsregistry/writer.go b/chainio/clients/avsregistry/writer.go index 703adeca..3155af96 100644 --- a/chainio/clients/avsregistry/writer.go +++ b/chainio/clients/avsregistry/writer.go @@ -37,7 +37,7 @@ type AvsRegistryWriter interface { // - operatorToAvsRegistrationSigExpiry is the expiry time of the signature // // Deprecated: use RegisterOperator instead. - // We will only keep high-level functionality such as RegisterOperator, and low level functionality + // We will only keep high-level functionality such as RegisterOperator, and low level functionality // such as this function should eventually all be done with bindings directly instead. RegisterOperatorInQuorumWithAVSRegistryCoordinator( ctx context.Context,