Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

cleos set contract -h spelling errors #8129

Closed
lfeagan opened this issue Oct 24, 2019 · 5 comments
Closed

cleos set contract -h spelling errors #8129

lfeagan opened this issue Oct 24, 2019 · 5 comments

Comments

@lfeagan
Copy link

lfeagan commented Oct 24, 2019

Two main issues:

  1. Flag options such as -c/--clear has incorrect spelling of "Rmove" rather than "Remove"
  2. Inconsistent capitalization of first letter of sentences, about 1/2 each way.

`$ cleos set contract -h
Create or update the contract on an account
Usage: cleos set contract [OPTIONS] account [contract-dir] [wasm-file] [abi-file]

Positionals:
account TEXT The account to publish a contract for (required)
contract-dir TEXT The path containing the .wasm and .abi
wasm-file TEXT The file containing the contract WASM relative to contract-dir
abi-file TEXT The ABI for the contract relative to contract-dir

Options:
-h,--help Print this help message and exit
-a,--abi TEXT The ABI for the contract relative to contract-dir
-c,--clear Rmove contract on an account
--suppress-duplicate-check Don't check for duplicate
-x,--expiration set the time in seconds before a transaction expires, defaults to 30s
-f,--force-unique force the transaction to be unique. this will consume extra bandwidth and remove any protections against accidently issuing the same transaction multiple times
-s,--skip-sign Specify if unlocked wallet keys should be used to sign transaction
-j,--json print result as json
-d,--dont-broadcast don't broadcast transaction to the network (just print to stdout)
--return-packed used in conjunction with --dont-broadcast to get the packed transaction
-r,--ref-block TEXT set the reference block num or block id used for TAPOS (Transaction as Proof-of-Stake)
-p,--permission TEXT ... An account and permission level to authorize, as in 'account@permission' (defaults to 'account@active')
--max-cpu-usage-ms UINT set an upper limit on the milliseconds of cpu usage budget, for the execution of the transaction (defaults to 0 which means no limit)
--max-net-usage UINT set an upper limit on the net usage budget, in bytes, for the transaction (defaults to 0 which means no limit)
--delay-sec UINT set the delay_sec seconds, defaults to 0s`

@lfeagan
Copy link
Author

lfeagan commented Oct 24, 2019

I did some analysis of cleos/main.cpp and found that 78 message begin with an upper-case character and 354 begin with lower-case.

grep localized main.cpp | awk -F 'localized' '{print $2 FS "."}' | cut -c3 | awk 'BEGIN{ FPAT="[a-zA-Z]"; l=u=0 } { for (i=1; i<=NF; i++) ($i~/[a-z]/)? l++ : u++; printf "upper: %d, lower: %d\n", l, u }'

Although I believe these should all be upper-case, the preponderance are lower-case.

@heifner
Copy link
Contributor

heifner commented Oct 25, 2019

If you want to submit a PR, I think lowercase for all would be best.

@kryton
Copy link
Contributor

kryton commented Oct 25, 2019

I created a PR for point 1 (#8130 )
I wasn't sure 'all' of the localizations should just be switched case. so left that part alone.

@lfeagan
Copy link
Author

lfeagan commented Oct 25, 2019

I create a PR for all of this after talking with Jonathan and digging a bit further, it turns out that the majority of flag descriptions are in fact in upper-case. As such, it makes the most sense to fix it by upper-casing the 30 or so descriptions that were not.

heifner added a commit that referenced this issue Oct 28, 2019
#8129 - Fix spelling error in cleos/main.cpp
@heifner
Copy link
Contributor

heifner commented Oct 28, 2019

Fixed by #8130 & #8131

@heifner heifner closed this as completed Oct 28, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants