Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ linters:
- gosimple
- govet
- ineffassign
- interfacer
# - interfacer
# - maligned
- misspell
- nakedret
- scopelint
- exportloopref
- staticcheck
- structcheck
- stylecheck
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ format:
## lint: Run Golang CI Lint.
lint:
@echo Running gocilint...
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.2
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.47.2
@golangci-lint run --out-format=tab --issues-exit-code=0

## test-unit: Run the unit tests.
Expand Down
10 changes: 5 additions & 5 deletions ignite/pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func Key(keyParts ...string) string {

// Clear deletes all namespaces and cached values
func (s Storage) Clear() error {
db, err := openDb(s.storagePath)
db, err := openDB(s.storagePath)
if err != nil {
return err
}
Expand All @@ -67,7 +67,7 @@ func (s Storage) Clear() error {
// Put sets key to value within the namespace
// If the key already exists, it will be overwritten
func (c Cache[T]) Put(key string, value T) error {
db, err := openDb(c.storage.storagePath)
db, err := openDB(c.storage.storagePath)
if err != nil {
return err
}
Expand All @@ -92,7 +92,7 @@ func (c Cache[T]) Put(key string, value T) error {
// Get fetches the value of key within the namespace.
// If no value exists, it will return found == false
func (c Cache[T]) Get(key string) (val T, err error) {
db, err := openDb(c.storage.storagePath)
db, err := openDB(c.storage.storagePath)
if err != nil {
return
}
Expand Down Expand Up @@ -128,7 +128,7 @@ func (c Cache[T]) Get(key string) (val T, err error) {

// Delete removes a value for key within the namespace
func (c Cache[T]) Delete(key string) error {
db, err := openDb(c.storage.storagePath)
db, err := openDB(c.storage.storagePath)
if err != nil {
return err
}
Expand All @@ -144,6 +144,6 @@ func (c Cache[T]) Delete(key string) error {
})
}

func openDb(path string) (*bolt.DB, error) {
func openDB(path string) (*bolt.DB, error) {
return bolt.Open(path, 0640, &bolt.Options{Timeout: 1 * time.Minute})
}
2 changes: 1 addition & 1 deletion ignite/pkg/cliui/cliui.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (s Session) printLoop() {

case events.StatusNeutral:
resume := s.PauseSpinner()
fmt.Fprintf(s.out, event.Text())
fmt.Fprint(s.out, event.Text())
resume()
}

Expand Down
5 changes: 5 additions & 0 deletions ignite/pkg/cosmosanalysis/app/testdata/app_minimal.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package foo

import (
sdk "github.com/cosmos/cosmos-sdk/types"
abci "github.com/tendermint/tendermint/abci/types"
)

type Foo struct {
FooKeeper foo.keeper
}
Expand Down
5 changes: 5 additions & 0 deletions ignite/pkg/cosmosanalysis/app/testdata/two_app.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package foo

import (
sdk "github.com/cosmos/cosmos-sdk/types"
abci "github.com/tendermint/tendermint/abci/types"
)

type Foo struct {
FooKeeper foo.keeper
}
Expand Down
3 changes: 2 additions & 1 deletion ignite/pkg/cosmosgen/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import (
"path/filepath"
"strings"

"github.com/pkg/errors"

"github.com/ignite/cli/ignite/pkg/cache"
"github.com/ignite/cli/ignite/pkg/cmdrunner"
"github.com/ignite/cli/ignite/pkg/cmdrunner/step"
"github.com/ignite/cli/ignite/pkg/cosmosanalysis/module"
"github.com/ignite/cli/ignite/pkg/gomodule"
"github.com/ignite/cli/ignite/pkg/xfilepath"
"github.com/pkg/errors"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion ignite/pkg/xurl/xurl.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func parseURL(s string) (*url.URL, error) {

func addressPort(s string) (string, bool) {
// Check that the value doesn't contain a URI path
if strings.Index(s, "/") != -1 {
if strings.Contains(s, "/") {
return "", false
}

Expand Down