[U-Boot] [PATCH] patman: Allow use outside of u-boot tree
Vadim Bendebury
vbendeb at chromium.org
Thu Jan 10 00:40:14 CET 2013
On Wed, Jan 9, 2013 at 2:57 PM, Doug Anderson <dianders at chromium.org> wrote:
> Vadim,
>
> On Wed, Jan 9, 2013 at 2:07 PM, Vadim Bendebury <vbendeb at chromium.org> wrote:
>>>> +parser.add_option('--no-check', action='store_true', dest='no_check',
>>>> + default=False,
>>>> + help="Don't check for patch compliance")
>>>
>>> IMHO It would be slightly better to use action='store_false',
>>> dest='check', and default=True (just to avoid so many
>>> double-negatives).
>>
>> I don't quite agree with this part - I think it's perfectly reasonable
>> to use 'no-check' to suppress the check, just as well as to use
>> 'no-tags' to suppress interpreting tags.
>>
>> `--no' communicates that by default the respective feature is enabled,
>> and to disable it one needs to add a command line option with no
>> parameter.
>
> Sorry--should have been more explicit. Was still expecting the option
> to be --no-check. Just asking for a change to the way it's stored.
> Like this in the python dev guide:
>
> parser.add_option("--clobber", action="store_true", dest="clobber")
> parser.add_option("--no-clobber", action="store_false", dest="clobber")
>
> In your case, I don't think you need to add the "check" option too,
> but just store to the "check" option:
>
> parser.add_option('--no-check', action='store_false', dest='check',
> default=True,
> help="Don't check for patch compliance")
ah, a good idea, changed. Also, modified the code in checkpatch.py not
to throw an exception, but to print an error message and return a
nonzero status.
More information about the U-Boot
mailing list