all: linter (#532)

* add additional linters

* fixes

* rm action
This commit is contained in:
Federico Kunze Küllmer
2021-09-05 11:03:06 +00:00
committed by GitHub
parent c7554e96aa
commit 26c5eabb18
61 changed files with 150 additions and 194 deletions
-1
View File
@@ -75,7 +75,6 @@ func AddrCmd() *cobra.Command {
$ %s debug addr 0xA588C66983a81e800Db4dF74564F09f91c026351`, version.AppName, version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
addrString := args[0]
cfg := sdk.GetConfig()
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -289,7 +289,7 @@ func RunAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf
return printCreate(cmd, info, showMnemonic, mnemonic, outputFormat)
}
func printCreate(cmd *cobra.Command, info keyring.Info, showMnemonic bool, mnemonic string, outputFormat string) error {
func printCreate(cmd *cobra.Command, info keyring.Info, showMnemonic bool, mnemonic, outputFormat string) error {
switch outputFormat {
case OutputFormatText:
cmd.PrintErrln()
+4 -8
View File
@@ -54,7 +54,7 @@ var (
flagIPAddrs = "ip-addresses"
)
const nodeDirPerm = 0755
const nodeDirPerm = 0o755
// TestnetCmd initializes all files for tendermint testnet and application
func TestnetCmd(
@@ -128,7 +128,6 @@ func InitTestnet(
ipAddresses []string,
numValidators int,
) error {
if chainID == "" {
chainID = fmt.Sprintf("ethermint_%d-1", tmrand.Int63n(9999999999999)+1)
}
@@ -258,7 +257,6 @@ func InitTestnet(
stakingtypes.NewCommissionRates(sdk.OneDec(), sdk.OneDec(), sdk.OneDec()),
sdk.OneInt(),
)
if err != nil {
return err
}
@@ -319,7 +317,6 @@ func initGenFiles(
genFiles []string,
numValidators int,
) error {
appGenState := mbm.DefaultGenesis(clientCtx.Codec)
// set the accounts in the genesis state
@@ -396,7 +393,6 @@ func collectGenFiles(
nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int,
outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator,
) error {
var appState json.RawMessage
genTime := tmtime.Now()
@@ -461,16 +457,16 @@ func calculateIP(ip string, i int) (string, error) {
return ipv4.String(), nil
}
func writeFile(name string, dir string, contents []byte) error {
func writeFile(name, dir string, contents []byte) error {
writePath := filepath.Join(dir)
file := filepath.Join(writePath, name)
err := tmos.EnsureDir(writePath, 0755)
err := tmos.EnsureDir(writePath, 0o755)
if err != nil {
return err
}
err = tmos.WriteFile(file, contents, 0644)
err = tmos.WriteFile(file, contents, 0o644)
if err != nil {
return err
}