Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Oct 6, 2023
1 parent be5deaf commit b322103
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 209 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/md-link-checker-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"pattern": "^https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax"
},
{
"pattern": "^https://docs.starport.network"
"pattern": "^https://docs.ignite.com/"
},
{
"pattern": "^http://localhost"
Expand Down
2 changes: 1 addition & 1 deletion .gitpod/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ignite chain serve

## Install Ignite CLI locally

```
```sh
curl https://get.ignite.com/cli | bash
```

Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

- [#3476](https://github.com/ignite/cli/pull/3476) Use `buf.build` binary to code generate from proto files
- [#3614](https://github.com/ignite/cli/pull/3614) feat: use DefaultBaseappOptions for app.New method
- [#3536](https://github.com/ignite/cli/pull/3536) Change app.go to v2 and add AppWiring feature
- [#3553](https://github.com/ignite/cli/pull/3553) Change app.go to v2 and add AppWiring feature

### Changes

Expand Down
2 changes: 1 addition & 1 deletion ignite/cmd/account_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ func accountCreateHandler(cmd *cobra.Command, args []string) error {
return fmt.Errorf("unable to create account: %w", err)
}

fmt.Printf("Account %q created, keep your mnemonic in a secret place:\n\n%s\n", name, mnemonic)
cmd.Printf("Account %q created, keep your mnemonic in a secret place:\n\n%s\n", name, mnemonic)
return nil
}
4 changes: 1 addition & 3 deletions ignite/cmd/account_delete.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package ignitecmd

import (
"fmt"

"github.com/spf13/cobra"

"github.com/ignite/cli/ignite/pkg/cosmosaccount"
Expand Down Expand Up @@ -34,6 +32,6 @@ func accountDeleteHandler(cmd *cobra.Command, args []string) error {
return err
}

fmt.Printf("Account %s deleted.\n", name)
cmd.Printf("Account %s deleted.\n", name)
return nil
}
2 changes: 1 addition & 1 deletion ignite/cmd/account_export.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ func accountExportHandler(cmd *cobra.Command, args []string) error {
return err
}

fmt.Printf("Account %q exported to file: %s\n", name, path)
cmd.Printf("Account %q exported to file: %s\n", name, path)
return nil
}
3 changes: 1 addition & 2 deletions ignite/cmd/account_import.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package ignitecmd

import (
"errors"
"fmt"
"os"

"github.com/cosmos/go-bip39"
Expand Down Expand Up @@ -71,6 +70,6 @@ func accountImportHandler(cmd *cobra.Command, args []string) error {
return err
}

fmt.Printf("Account %q imported.\n", name)
cmd.Printf("Account %q imported.\n", name)
return nil
}
8 changes: 4 additions & 4 deletions ignite/cmd/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook plugin.Hook)
if err != nil {
err := p.Interface.ExecuteHookCleanUp(newExecutedHook(hook, cmd, args))
if err != nil {
fmt.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err)
cmd.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err)
}
}
return err
Expand All @@ -229,7 +229,7 @@ func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook plugin.Hook)
defer func() {
err := p.Interface.ExecuteHookCleanUp(execHook)
if err != nil {
fmt.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err)
cmd.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err)
}
}()

Expand Down Expand Up @@ -388,7 +388,7 @@ func NewPluginUpdate() *cobra.Command {
if err != nil {
return err
}
fmt.Printf("All plugins updated.\n")
cmd.Println("All plugins updated.")
return nil
}
// find the plugin to update
Expand All @@ -398,7 +398,7 @@ func NewPluginUpdate() *cobra.Command {
if err != nil {
return err
}
fmt.Printf("Plugin %q updated.\n", p.Path)
cmd.Printf("Plugin %q updated.\n", p.Path)
return nil
}
}
Expand Down
4 changes: 1 addition & 3 deletions ignite/cmd/version.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package ignitecmd

import (
"fmt"

"github.com/spf13/cobra"

"github.com/ignite/cli/ignite/version"
Expand All @@ -14,7 +12,7 @@ func NewVersion() *cobra.Command {
Use: "version",
Short: "Print the current build information",
Run: func(cmd *cobra.Command, _ []string) {
fmt.Println(version.Long(cmd.Context()))
cmd.Println(version.Long(cmd.Context()))
},
}
return c
Expand Down
2 changes: 1 addition & 1 deletion ignite/internal/tools/gen-cli-docs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func generateCmd(cmd *cobra.Command, w io.Writer) error {
}

// here we change sub titles to bold styling. Otherwise, these titles will get
// printed in the right menu of docs.starport.network which is unpleasant because
// printed in the right menu of docs.ignite.com which is unpleasant because
// we only want to see a list of all available commands without the extra noise.
sc := bufio.NewScanner(b)
for sc.Scan() {
Expand Down
2 changes: 1 addition & 1 deletion ignite/pkg/cosmosfaucet/openapi/openapi.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ definitions:


externalDocs:
description: "Find out more about Starport"
description: "Find out more about Ignite CLI"
url: "https://github.com/ignite/cli/tree/develop/docs"
63 changes: 0 additions & 63 deletions ignite/pkg/gacli/gacli.go

This file was deleted.

30 changes: 0 additions & 30 deletions ignite/pkg/iowait/iowait.go

This file was deleted.

34 changes: 0 additions & 34 deletions ignite/pkg/jsondoc/jsondoc.go

This file was deleted.

26 changes: 0 additions & 26 deletions ignite/pkg/looseerrgroup/looseerrgroup.go

This file was deleted.

10 changes: 0 additions & 10 deletions ignite/pkg/tendermintlogger/logger.go

This file was deleted.

5 changes: 0 additions & 5 deletions ignite/pkg/tendermintlogger/logger_test.go

This file was deleted.

14 changes: 2 additions & 12 deletions ignite/pkg/xstrings/xstrings.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"strings"
"unicode"

"golang.org/x/exp/slices" // TODO: replace with slices.Contains when it will be available in stdlib (1.21)
"golang.org/x/text/cases"
"golang.org/x/text/language"
)
Expand All @@ -19,25 +20,14 @@ func AllOrSomeFilter(list, filterList []string) []string {
var elems []string

for _, elem := range list {
if !SliceContains(filterList, elem) {
if !slices.Contains(filterList, elem) {
elems = append(elems, elem)
}
}

return elems
}

// SliceContains returns with true if s is a member of ss.
func SliceContains(ss []string, s string) bool {
for _, e := range ss {
if e == s {
return true
}
}

return false
}

// List returns a slice of strings captured after the value returned by do which is
// called n times.
func List(n int, do func(i int) string) []string {
Expand Down
6 changes: 3 additions & 3 deletions integration/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Starport Integration Tests
# Ignite CLI Integration Tests

The Starport integration tests build a new application and run all Starport commands to check the Starport code integrity. The runners and helper methods are located in this current folder. The test commands are split into folders, for better concurrency, each folder is a parallel job into the CI workflow. To create a new one, we only need to create a new folder. This will be automatically detected and added into the PR CI checks, or we can only create new tests into an existing folder or file.
The Ignite CLI integration tests build a new application and run all Ignite CLI commands to check the Ignite CLI code integrity. The runners and helper methods are located in this current folder. The test commands are split into folders, for better concurrency, each folder is a parallel job into the CI workflow. To create a new one, we only need to create a new folder. This will be automatically detected and added into the PR CI checks, or we can only create new tests into an existing folder or file.

Running synchronously all integration tests can be very slow. The command below can run everything:

Expand All @@ -25,7 +25,7 @@ var (
)
```

- Now, you can use the env to run the starport commands and check the success status:
- Now, you can use the env to run the ignite commands and check the success status:

```go
env.Must(env.Exec("create a list with bool",
Expand Down
10 changes: 5 additions & 5 deletions scripts/data/gen-protoc/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ gh_protoc_release_url="https://api.github.com/repos/protocolbuffers/protobuf/rel
setdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)" # this line powered by stackoverflow

# Check dir else create save dir
if [[ $(basename ${setdir}) = "scripts" ]] ; then
if [[ $(basename $(dirname "${setdir}")) = "starport" ]] ; then
[[ -d $(dirname "${setdir}/pkg/protoc/data") ]] || mkdir -p "$(dirname "${setdir}")/starport/pkg/protoc/data"
if [[ $(basename "${setdir}") = "scripts" ]] ; then
if [[ $(basename "$(dirname "${setdir}")") = "cli" ]] ; then
[[ -d $(dirname "${setdir}/pkg/protoc/data") ]] || mkdir -p "$(dirname "${setdir}")/ignite/pkg/protoc/data"
else
echo "Attention: you are running the script out of the startport project please run it this script in: https://github.com/tendermint/starport"
echo "Attention: you are running the script out of the ignite cli project please run it this script in: https://github.com/ignite/cli"
exit 1
fi
else
echo "$setdir"
echo "Attention: you are running the script out of the startport project please run it this script in: https://github.com/tendermint/starport"
echo "Attention: you are running the script out of the ignite cli project please run it this script in: https://github.com/ignite/cli"
exit 1
fi

Expand Down
Loading

0 comments on commit b322103

Please sign in to comment.