Skip to content

Commit

Permalink
chore: check fmt pipeline (#147)
Browse files Browse the repository at this point in the history
* check fmt pipeline

* fix
  • Loading branch information
shrimalmadhur authored Jun 27, 2024
1 parent 1353f7d commit f57d0da
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/check-fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check make fmt
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
2 changes: 1 addition & 1 deletion pkg/operator/keys/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func GetOperatorIdFromBLSPubKey(pubKey string) (string, error) {
// ```
//
// This code just parser this string:
// E([498211989701534593628498974128726712526336918939770789545660245177948853517,19434346619705907282579203143605058653932187676054178921788041096426532277474])
// E([498211989701534593628498974128726712526336918939770789545660245177948853517,19434346619705907282579203143605058653932187676054178921788041096426532277474])

if pubKey == "O" {
return "", fmt.Errorf("pubKey is Infinity")
Expand Down
5 changes: 4 additions & 1 deletion pkg/operator/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ func RegisterCmd(p utils.Prompter) *cli.Command {
return nil
}

fmt.Printf("%s Operator is registered successfully to EigenLayer. There is a 30 minute delay between registration and operator details being shown in our webapp.\n", utils.EmojiCheckMark)
fmt.Printf(
"%s Operator is registered successfully to EigenLayer. There is a 30 minute delay between registration and operator details being shown in our webapp.\n",
utils.EmojiCheckMark,
)
return nil
},
}
Expand Down
5 changes: 4 additions & 1 deletion pkg/operator/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ func UpdateCmd(p utils.Prompter) *cli.Command {
)
printRegistrationInfo("", common.HexToAddress(operatorCfg.Operator.Address), &operatorCfg.ChainId)

fmt.Printf("%s Operator updated successfully. There is a 30 minute delay between update and operator details being shown in our webapp.\n", utils.EmojiCheckMark)
fmt.Printf(
"%s Operator updated successfully. There is a 30 minute delay between update and operator details being shown in our webapp.\n",
utils.EmojiCheckMark,
)
return nil
},
}
Expand Down

0 comments on commit f57d0da

Please sign in to comment.