argument parsing refactoring round3

Tomi Ollila tomi.ollila at iki.fi
Sat Apr 25 12:56:07 PDT 2015


On Sat, Apr 11 2015, David Bremner <david at tethera.net> wrote:

> David Bremner <david at tethera.net> writes:
>
>> guyzmo <guyzmo+notmuch at m0g.net> writes:
>>
>>> I was wondering whether you had considered actually using `docopt` to
>>> generate the CLI parser from the output.
>
>> As it stands, I'm not particularly annoyed with the notmuch argument
>> parsing code, so I mainly see negative issues about your proposal.
>
> On the other hand, I do find the config handling code annoying, so if
> people have some ideas about that, I am interested to hear them.  There
> is now almost 1000 lines of C in notmuch-config.c, and despite some
> efforts to streamline things, there is a lot of copying and pasting
> every time someone wants to add a configuration option.

I reviewed the changes -- last ones 'cursory' as I think those don't 
break any "real" functionality -- and if help works bad then one can
always resort to testing and reading code >;)...

...but I did not test -- automated tests (to ensure it doesn't break
anything be handy... more complete would limit anyone's interest to
implement alternate option handling (even further).

As much I also liked "better" option handling code new code (vast of that)
would also require significant reviewing effort which no-one will like
to do >;/

With that said, +1 from me to the config handling changes. 
(or should I give it some hand-testing (how?)

Tomi

>
> d


More information about the notmuch mailing list