Re: [PATCH 10/15] scalar: implement the `run` command
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Sep 3, 2021, 15:50 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2109031747290.55@tvgsbejvaqbjf.bet>
- In-Reply-To
- <877dg2xbjp.fsf@evledraar.gmail.com>
Hi Ævar,
On Tue, 31 Aug 2021, Ævar Arnfjörð Bjarmason wrote:
Show 5 quoted lines
> On Mon, Aug 30 2021, Derrick Stolee via GitGitGadget wrote:
>
> > + const char *usagestr[] = { NULL, NULL };
>
> Missing usage strings?This command will show a generated usage, i.e. a non-static string. It therefore cannot be specified here already. See the `strbuf_*()` calls populating `buf` and the `usagestr[0] = buf.buf;` assignment.
> > + if (argc == 0) > > Style nit (per style guide): s/argc == 0/!argc/g.
It is true that we often do this, but in this instance it would be misleading: `argc` is a counter, not a Boolean.
> > + if (!strcmp("all", argv[0]))
> > + i = -1;
>
> Style nit (per style guide): missing braces here.The style guide specifically allows my preference to leave single-line blocks without curlies.
Ciao, Johannes