Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting for Tutorial #134

Merged
merged 2 commits into from Aug 23, 2019
Merged

Linting for Tutorial #134

merged 2 commits into from Aug 23, 2019

Conversation

tac0turtle
Copy link
Member

@tac0turtle tac0turtle commented Aug 21, 2019

quick linting

@tac0turtle tac0turtle merged commit 415ea4f into master Aug 23, 2019
@tac0turtle tac0turtle deleted the marko/linting-cleanup branch August 23, 2019 10:34
@kaniel
Copy link

kaniel commented Sep 3, 2019

hi, buddy
I can't Compile 0.36.0 and 0.37.0,but your sdk-application-tutorial use cosmos-sdk 0.36.0, so I can't use it,
could u can give me a version code of cosmos sdk 0.35.0 with sdk-application-tutorial?
please. thanks

@tac0turtle
Copy link
Member Author

can you please show me the error you are getting? not sure why its not compiling, I can compile and others can as well.

@kaniel
Copy link

kaniel commented Sep 4, 2019

OS: macOS mojave 10.14.3
cosmos sdk version:0.36.0 git branch -->release/v0.36.0
localhost:cosmos-sdk skill$ make tools install
make: Nothing to be done for tools'. make: *** No rule to make target install'. Stop.
localhost:cosmos-sdk skill$ make install
make: *** No rule to make target `install'. Stop.
localhost:cosmos-sdk skill$ make
/Users/skill/workspace/workgo/bin/golangci-lint run
server/start.go:103:2: unreachable code (govet)
return nil
^
x/simulation/event_stats.go:41:17: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
fmt.Fprintf(w, string(obj))
^
x/staking/keeper/querier.go:63:6: SA6005: should use strings.EqualFold(a, b) instead of strings.ToLower(a) == strings.ToLower(b) (staticcheck)
if strings.ToLower(val.GetStatus().String()) == strings.ToLower(params.Status) {
^
WARN [runner/nolint] Found unknown linters in //nolint directives: accepting nolint, deadcode unused, gosec error is arising in testing files, unparam deadcode unused, unused deadcode
make: *** [lint] Error 1

@tac0turtle
Copy link
Member Author

ah cosmos-sdk 0.36 does not hold make install anymore. the sdk has no reason to be installed. If you wan tto install gaia, then you have to go the gaia repo. if you want to build the tutorial then you make install when you are in the root here.

@kaniel
Copy link

kaniel commented Sep 5, 2019

gaia has installed,cosmos-sdk 0.36 does not make,so it lead to tutorial more errors。I tried make tutorial as root.
localhost:sdk-application-tutorial skill$ sudo make
golangci-lint run
WARN [runner/megacheck] Can't run megacheck because of compilation errors in packages [_/Users/skill/workspace/workgo/src/github.com/cosmos/sdk-application-tutorial _/Users/skill/workspace/workgo/src/github.com/cosmos/sdk-application-tutorial/x/nameservice _/Users/skill/workspace/workgo/src/github.com/cosmos/sdk-application-tutorial/x/nameservice/client/cli _/Users/skill/workspace/workgo/src/github.com/cosmos/sdk-application-tutorial/x/nameservice/client/rest _/Users/skill/workspace/workgo/src/github.com/cosmos/sdk-application-tutorial/x/nameservice/types]: app.go:7: could not import github.com/tendermint/tendermint/abci/types (invalid package name: "") and 58 more errors: run golangci-lint run --no-config --disable-all -E typecheck to see all errors
app.go:7:7: could not import github.com/tendermint/tendermint/abci/types (invalid package name: "") (typecheck)
abci "github.com/tendermint/tendermint/abci/types"
^
app.go:8:6: could not import github.com/tendermint/tendermint/libs/common (invalid package name: "") (typecheck)
cmn "github.com/tendermint/tendermint/libs/common"
^
app.go:9:6: could not import github.com/tendermint/tendermint/libs/db (invalid package name: "") (typecheck)
dbm "github.com/tendermint/tendermint/libs/db"
^
cmd/nscli/main.go:7:2: could not import github.com/cosmos/cosmos-sdk/client (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/client"
^
cmd/nscli/main.go:8:2: could not import github.com/cosmos/cosmos-sdk/client/keys (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/client/keys"
^
cmd/nscli/main.go:9:2: could not import github.com/cosmos/cosmos-sdk/client/lcd (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/client/lcd"
^
cmd/nsd/main.go:7:2: could not import github.com/cosmos/cosmos-sdk/server (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/server"
^
cmd/nsd/main.go:8:2: could not import github.com/cosmos/cosmos-sdk/x/genaccounts (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/x/genaccounts"
^
cmd/nsd/main.go:9:13: could not import github.com/cosmos/cosmos-sdk/x/genaccounts/client/cli (invalid package name: "") (typecheck)
genaccscli "github.com/cosmos/cosmos-sdk/x/genaccounts/client/cli"
^
x/nameservice/alias.go:4:2: could not import github.com/cosmos/sdk-application-tutorial/x/nameservice/types (invalid package name: "") (typecheck)
"github.com/cosmos/sdk-application-tutorial/x/nameservice/types"
^
x/nameservice/genesis.go:6:6: could not import github.com/cosmos/cosmos-sdk/types (invalid package name: "") (typecheck)
sdk "github.com/cosmos/cosmos-sdk/types"
^
x/nameservice/genesis.go:7:7: could not import github.com/tendermint/tendermint/abci/types (invalid package name: "") (typecheck)
abci "github.com/tendermint/tendermint/abci/types"
^
x/nameservice/keeper.go:4:2: could not import github.com/cosmos/cosmos-sdk/codec (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/codec"
^
x/nameservice/keeper.go:5:2: could not import github.com/cosmos/cosmos-sdk/x/bank (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/x/bank"
^
x/nameservice/module.go:6:2: could not import github.com/gorilla/mux (invalid package name: "") (typecheck)
"github.com/gorilla/mux"
^
x/nameservice/module.go:7:2: could not import github.com/spf13/cobra (invalid package name: "") (typecheck)
"github.com/spf13/cobra"
^
x/nameservice/module.go:10:2: could not import github.com/cosmos/cosmos-sdk/types/module (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/types/module"
^
x/nameservice/handler.go:4:2: "fmt" imported but not used (typecheck)
"fmt"
^
x/nameservice/client/cli/query.go:6:2: could not import github.com/cosmos/cosmos-sdk/client (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/client"
^
x/nameservice/client/cli/query.go:7:2: could not import github.com/cosmos/cosmos-sdk/client/context (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/client/context"
^
x/nameservice/client/cli/query.go:8:2: could not import github.com/cosmos/cosmos-sdk/codec (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/codec"
^
x/nameservice/client/cli/tx.go:9:6: could not import github.com/cosmos/cosmos-sdk/types (invalid package name: "") (typecheck)
sdk "github.com/cosmos/cosmos-sdk/types"
^
x/nameservice/client/cli/tx.go:10:2: could not import github.com/cosmos/cosmos-sdk/x/auth (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/x/auth"
^
x/nameservice/client/cli/tx.go:11:2: could not import github.com/cosmos/cosmos-sdk/x/auth/client/utils (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/x/auth/client/utils"
^
x/nameservice/client/rest/rest.go:7:2: could not import github.com/cosmos/cosmos-sdk/client/context (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/client/context"
^
x/nameservice/client/rest/rest.go:8:2: could not import github.com/cosmos/sdk-application-tutorial/x/nameservice/types (invalid package name: "") (typecheck)
"github.com/cosmos/sdk-application-tutorial/x/nameservice/types"
^
x/nameservice/client/rest/rest.go:10:6: could not import github.com/cosmos/cosmos-sdk/types (invalid package name: "") (typecheck)
sdk "github.com/cosmos/cosmos-sdk/types"
^
x/nameservice/types/codec.go:4:2: could not import github.com/cosmos/cosmos-sdk/codec (invalid package name: "") (typecheck)
"github.com/cosmos/cosmos-sdk/codec"
^
make: *** [lint] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants