Skip to content

Commit

Permalink
chore: enforce capitalisation in flags description (maticnetwork#1137)
Browse files Browse the repository at this point in the history
  • Loading branch information
leovct authored Feb 29, 2024
1 parent 90895e8 commit 5b91534
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions bridge/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,13 @@ func GetStartCmd() *cobra.Command {
logger.Error("GetStartCmd | BindPFlag | logLevel", "Error", err)
}

startCmd.Flags().Bool("all", false, "start all bridge services")
startCmd.Flags().Bool("all", false, "Start all bridge services")

if err := viper.BindPFlag("all", startCmd.Flags().Lookup("all")); err != nil {
logger.Error("GetStartCmd | BindPFlag | all", "Error", err)
}

startCmd.Flags().StringSlice("only", []string{}, "comma separated bridge services to start")
startCmd.Flags().StringSlice("only", []string{}, "Comma separated bridge services to start")

if err := viper.BindPFlag("only", startCmd.Flags().Lookup("only")); err != nil {
logger.Error("GetStartCmd | BindPFlag | only", "Error", err)
Expand Down
10 changes: 5 additions & 5 deletions client/tx/query.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//nolint
// nolint
package tx

import (
Expand Down Expand Up @@ -112,7 +112,7 @@ $ gaiacli query txs --tags '<tag1>:<value1>&<tag2>:<value2>' --page 1 --limit 30
logger.Error("QueryTxsByEventsCmd | BindPFlag | client.FlagTrustNode", "Error", err)
}

cmd.Flags().String(flagTags, "", "tag:value list of tags that must match")
cmd.Flags().String(flagTags, "", "Tag:value list of tags that must match")
cmd.Flags().Uint32(flagPage, rest.DefaultPage, "Query a specific page of paginated results")
cmd.Flags().Uint32(flagLimit, rest.DefaultLimit, "Query number of transactions results per page returned")

Expand Down Expand Up @@ -178,7 +178,7 @@ type txsGET struct {
}

// swagger:route GET /txs txs txsGET
//It returns the list of transaction based on page,limit and events specified.
// It returns the list of transaction based on page,limit and events specified.
// QueryTxsRequestHandlerFn implements a REST handler that searches for transactions.
// Genesis transactions are returned if the height parameter is set to zero,
// otherwise the transactions are searched for by events.
Expand Down Expand Up @@ -290,7 +290,7 @@ type txsHashCommitProof struct {
}

// swagger:route GET /txs/{hash}/commit-proof txs txsHashCommitProof
//It returns the commit-proof for the transaction.
// It returns the commit-proof for the transaction.
// QueryCommitTxRequestHandlerFn implements a REST handler that queries vote, sigs and tx bytes committed block.
func QueryCommitTxRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -357,7 +357,7 @@ type txsSideTx struct {
}

// swagger:route GET /txs/{hash}/side-tx txs txsSideTx
//It returns the side-tx bytes
// It returns the side-tx bytes
// QuerySideTxRequestHandlerFn implements a REST handler that queries sigs, side-tx bytes committed block
func QuerySideTxRequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/heimdallcli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ func exportCmd(ctx *server.Context, _ *codec.Codec) *cobra.Command {
return err
},
}
cmd.Flags().String(cli.HomeFlag, helper.DefaultNodeHome, "node's home directory")
cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "client's home directory")
cmd.Flags().String(client.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created")
cmd.Flags().String(cli.HomeFlag, helper.DefaultNodeHome, "Node's home directory")
cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "Client's home directory")
cmd.Flags().String(client.FlagChainID, "", "Genesis file chain-id, if left blank will be randomly created")

return cmd
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/heimdalld/service/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ func initCmd(ctx *server.Context, cdc *codec.Codec) *cobra.Command {
},
}

cmd.Flags().String(cli.HomeFlag, helper.DefaultNodeHome, "node's home directory")
cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "client's home directory")
cmd.Flags().String(client.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created")
cmd.Flags().String(cli.HomeFlag, helper.DefaultNodeHome, "Node's home directory")
cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "Client's home directory")
cmd.Flags().String(client.FlagChainID, "", "Genesis file chain-id, if left blank will be randomly created")
cmd.Flags().Int(stakingcli.FlagValidatorID, 1, "--id=<validator ID here>, if left blank will be assigned 1")
cmd.Flags().Bool(helper.OverwriteGenesisFlag, false, "overwrite the genesis.json file if it exists")
cmd.Flags().Bool(helper.OverwriteGenesisFlag, false, "Overwrite the genesis.json file if it exists")

return cmd
}
6 changes: 3 additions & 3 deletions cmd/heimdalld/service/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ application.
},
}

cmd.Flags().String(cli.HomeFlag, helper.DefaultNodeHome, "node's home directory")
cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "client's home directory")
cmd.Flags().String(client.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created")
cmd.Flags().String(cli.HomeFlag, helper.DefaultNodeHome, "Node's home directory")
cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "Client's home directory")
cmd.Flags().String(client.FlagChainID, "", "Genesis file chain-id, if left blank will be randomly created")
cmd.Flags().Int(stakingcli.FlagValidatorID, 1, "--id=<validator ID here>, if left blank will be assigned 1")

return cmd
Expand Down
8 changes: 4 additions & 4 deletions cmd/heimdalld/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ which accepts a path for the resulting pprof file.
}

// bridge flags = start flags (all, only) + root bridge cmd flags
cmd.Flags().Bool("all", false, "start all bridge services")
cmd.Flags().StringSlice("only", []string{}, "comma separated bridge services to start")
cmd.Flags().Bool("all", false, "Start all bridge services")
cmd.Flags().StringSlice("only", []string{}, "Comma separated bridge services to start")
bridgeCmd.DecorateWithBridgeRootFlags(cmd, viper.GetViper(), logger, "main")

// rest server flags
Expand All @@ -328,9 +328,9 @@ which accepts a path for the resulting pprof file.
cmd.Flags().Uint64(FlagHaltHeight, 0, "Height at which to gracefully halt the chain and shutdown the node")
cmd.Flags().Uint64(FlagHaltTime, 0, "Minimum block time (in Unix seconds) at which to gracefully halt the chain and shutdown the node")
cmd.Flags().String(flagCPUProfile, "", "Enable CPU profiling and write to the provided file")
cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "client's home directory")
cmd.Flags().String(helper.FlagClientHome, helper.DefaultCLIHome, "Client's home directory")

cmd.Flags().Bool(FlagOpenTracing, false, "start open tracing")
cmd.Flags().Bool(FlagOpenTracing, false, "Start open tracing")
cmd.Flags().String(FlagOpenCollectorEndpoint, helper.DefaultOpenCollectorEndpoint, "Default OpenTelemetry Collector Endpoint")

// add support for all Tendermint-specific command line options
Expand Down
4 changes: 2 additions & 2 deletions cmd/heimdalld/service/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ testnet --v 4 --n 8 --output-dir ./output --starting-ip-address 192.168.10.2
cmd.Flags().String(flagNodeHostPrefix, "node",
"Hostname prefix (node results in persistent peers list ID0@node0:26656, ID1@node1:26656, ...)")

cmd.Flags().String(client.FlagChainID, "", "genesis file chain-id, if left blank will be randomly created")
cmd.Flags().Bool("signer-dump", true, "dumps all signer information in a json file")
cmd.Flags().String(client.FlagChainID, "", "Genesis file chain-id, if left blank will be randomly created")
cmd.Flags().Bool("signer-dump", true, "Dumps all signer information in a json file")

return cmd
}
8 changes: 4 additions & 4 deletions gov/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ $ %s query gov proposals --status (DepositPeriod|VotingPeriod|Passed|Rejected)
},
}

cmd.Flags().String(flagNumLimit, "", "(optional) limit to latest [number] proposals. Defaults to all proposals")
cmd.Flags().Uint64(flagDepositor, 0, "(optional) filter by proposals deposited on by depositor's validator id")
cmd.Flags().Uint64(flagVoter, 0, "(optional) filter by proposals voted on by voter's validator id")
cmd.Flags().String(flagStatus, "", "(optional) filter proposals by proposal status, status: deposit_period/voting_period/passed/rejected")
cmd.Flags().String(flagNumLimit, "", "(optional) Mimit to latest [number] proposals. Defaults to all proposals")
cmd.Flags().Uint64(flagDepositor, 0, "(optional) Filter by proposals deposited on by depositor's validator id")
cmd.Flags().Uint64(flagVoter, 0, "(optional) Filter by proposals voted on by voter's validator id")
cmd.Flags().String(flagStatus, "", "(optional) Filter proposals by proposal status, status: deposit_period/voting_period/passed/rejected")

return cmd
}
Expand Down
10 changes: 5 additions & 5 deletions gov/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ $ %s tx gov submit-proposal --title="Test Proposal" --description="My awesome pr
},
}

cmd.Flags().String(FlagTitle, "", "title of proposal")
cmd.Flags().String(FlagDescription, "", "description of proposal")
cmd.Flags().String(flagProposalType, "", "proposalType of proposal, types: text/parameter_change/software_upgrade")
cmd.Flags().String(FlagDeposit, "", "deposit of proposal")
cmd.Flags().String(FlagProposal, "", "proposal file path (if this path is given, other proposal flags are ignored)")
cmd.Flags().String(FlagTitle, "", "Title of proposal")
cmd.Flags().String(FlagDescription, "", "Description of proposal")
cmd.Flags().String(flagProposalType, "", "Type of proposal, types: text/parameter_change/software_upgrade")
cmd.Flags().String(FlagDeposit, "", "Deposit of proposal")
cmd.Flags().String(FlagProposal, "", "Proposal file path (if this path is given, other proposal flags are ignored)")
cmd.Flags().Int(FlagValidatorID, 0, "--validator-id=<validator ID here>")
if err := cmd.MarkFlagRequired(FlagValidatorID); err != nil {
logger.Error("GetCmdSubmitProposal | MarkFlagRequired | FlagValidatorID", "Error", err)
Expand Down

0 comments on commit 5b91534

Please sign in to comment.