From 02be053267e589a42c990a93eae8666c47a75f09 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 8 Nov 2024 13:27:53 +0100 Subject: [PATCH 1/2] chore: `make lint-fix` --- ignite/cmd/bubblemodel/testnet_multi_node.go | 2 +- ignite/cmd/testnet_multi_node.go | 3 ++- ignite/pkg/chaincmd/in-place-testnet.go | 12 ++++++------ ignite/pkg/chaincmd/runner/chain.go | 2 +- ignite/pkg/markdownviewer/markdownviewer.go | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ignite/cmd/bubblemodel/testnet_multi_node.go b/ignite/cmd/bubblemodel/testnet_multi_node.go index 0ae5eb14c4..5bda226aac 100644 --- a/ignite/cmd/bubblemodel/testnet_multi_node.go +++ b/ignite/cmd/bubblemodel/testnet_multi_node.go @@ -236,7 +236,7 @@ func (m MultiNode) View() string { grayStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("8")) // gray purpleStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("5")) // purple statusBarStyle := lipgloss.NewStyle().Background(lipgloss.Color("0")) // Status bar style - blueStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("45")).Background(lipgloss.Color("0")) //blue + blueStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("45")).Background(lipgloss.Color("0")) // blue statusBar := blueStyle.Render("Press q to quit | Press 1-4 to ") + statusBarStyle.Render(runningStyle.Render("start")) + blueStyle.Render("/") + statusBarStyle.Render(stoppedStyle.Render("stop")) + blueStyle.Render(" corresponding node") output := statusBar + "\n\n" diff --git a/ignite/cmd/testnet_multi_node.go b/ignite/cmd/testnet_multi_node.go index 0a3db23689..7049005b0b 100644 --- a/ignite/cmd/testnet_multi_node.go +++ b/ignite/cmd/testnet_multi_node.go @@ -6,9 +6,10 @@ import ( "time" tea "github.com/charmbracelet/bubbletea" - sdk "github.com/cosmos/cosmos-sdk/types" "github.com/spf13/cobra" + sdk "github.com/cosmos/cosmos-sdk/types" + cmdmodel "github.com/ignite/cli/v29/ignite/cmd/bubblemodel" igcfg "github.com/ignite/cli/v29/ignite/config" v1 "github.com/ignite/cli/v29/ignite/config/chain/v1" diff --git a/ignite/pkg/chaincmd/in-place-testnet.go b/ignite/pkg/chaincmd/in-place-testnet.go index 10313c11fe..6dc3f58cfc 100644 --- a/ignite/pkg/chaincmd/in-place-testnet.go +++ b/ignite/pkg/chaincmd/in-place-testnet.go @@ -46,11 +46,11 @@ func (c ChainCmd) TestnetInPlaceCommand(newChainID, newOperatorAddress string, o return c.daemonCommand(command) } -// Options for testnet multi node +// Options for testnet multi node. type MultiNodeOption func([]string) []string // MultiNodeWithChainID returns a MultiNodeOption that appends the chainID option -// to the provided slice of strings +// to the provided slice of strings. func MultiNodeWithChainID(chainID string) MultiNodeOption { return func(s []string) []string { if len(chainID) > 0 { @@ -61,7 +61,7 @@ func MultiNodeWithChainID(chainID string) MultiNodeOption { } // MultiNodeWithDirOutput returns a MultiNodeOption that appends the output directory option -// to the provided slice of strings +// to the provided slice of strings. func MultiNodeWithDirOutput(dirOutput string) MultiNodeOption { return func(s []string) []string { if len(dirOutput) > 0 { @@ -72,7 +72,7 @@ func MultiNodeWithDirOutput(dirOutput string) MultiNodeOption { } // MultiNodeWithNumValidator returns a MultiNodeOption that appends the number of validators option -// to the provided slice of strings +// to the provided slice of strings. func MultiNodeWithNumValidator(numVal string) MultiNodeOption { return func(s []string) []string { if len(numVal) > 0 { @@ -83,7 +83,7 @@ func MultiNodeWithNumValidator(numVal string) MultiNodeOption { } // MultiNodeWithValidatorsStakeAmount returns a MultiNodeOption that appends the stake amounts option -// to the provided slice of strings +// to the provided slice of strings. func MultiNodeWithValidatorsStakeAmount(satkeAmounts string) MultiNodeOption { return func(s []string) []string { if len(satkeAmounts) > 0 { @@ -94,7 +94,7 @@ func MultiNodeWithValidatorsStakeAmount(satkeAmounts string) MultiNodeOption { } // MultiNodeDirPrefix returns a MultiNodeOption that appends the node directory prefix option -// to the provided slice of strings +// to the provided slice of strings. func MultiNodeDirPrefix(nodeDirPrefix string) MultiNodeOption { return func(s []string) []string { if len(nodeDirPrefix) > 0 { diff --git a/ignite/pkg/chaincmd/runner/chain.go b/ignite/pkg/chaincmd/runner/chain.go index 4130d01312..6d08564ec3 100644 --- a/ignite/pkg/chaincmd/runner/chain.go +++ b/ignite/pkg/chaincmd/runner/chain.go @@ -57,7 +57,7 @@ func (r Runner) InPlace(ctx context.Context, newChainID, newOperatorAddress stri ) } -// Initialize config directories & files for a multi-validator testnet locally +// Initialize config directories & files for a multi-validator testnet locally. func (r Runner) MultiNode(ctx context.Context, options ...chaincmd.MultiNodeOption) error { runOptions := runOptions{ stdout: os.Stdout, diff --git a/ignite/pkg/markdownviewer/markdownviewer.go b/ignite/pkg/markdownviewer/markdownviewer.go index d393ce36f0..73e191d002 100644 --- a/ignite/pkg/markdownviewer/markdownviewer.go +++ b/ignite/pkg/markdownviewer/markdownviewer.go @@ -31,7 +31,7 @@ func config(path string) (ui.Config, error) { if err != nil { return ui.Config{}, err } - //nolint: gosec + width = uint(w) if width > 120 { width = 120 From cfc0b5a66c64ddfe044c0672d43f38668e4b452b Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 8 Nov 2024 13:54:11 +0100 Subject: [PATCH 2/2] updates --- ignite/pkg/markdownviewer/markdownviewer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ignite/pkg/markdownviewer/markdownviewer.go b/ignite/pkg/markdownviewer/markdownviewer.go index 73e191d002..d621c502a5 100644 --- a/ignite/pkg/markdownviewer/markdownviewer.go +++ b/ignite/pkg/markdownviewer/markdownviewer.go @@ -31,7 +31,7 @@ func config(path string) (ui.Config, error) { if err != nil { return ui.Config{}, err } - + width = uint(w) if width > 120 { width = 120