[ovs-dev] [RFC] checkpatch.py: look for misspellings in commit messages
Aaron Conole
aconole at redhat.com
Thu Mar 23 14:38:35 UTC 2017
Joe Stringer <joe at ovn.org> writes:
> On 16 March 2017 at 15:27, Aaron Conole <aconole at redhat.com> wrote:
>> Teach checkpatch to find misspellings based on the enchant framework.
>> When a potential error is found, print some additional suggestions for
>> fixups.
>>
>> Some additional keywords are kept in an extras list and added to the
>> dictionary specific to the Open vSwitch project.
>>
>> Signed-off-by: Aaron Conole <aconole at redhat.com>
>> Cc: Russell Bryant <rbryant at redhat.com>
>> Cc: Joe Stringer <joe at ovn.org>
>> Cc: Eric Garver <e at erig.me>
>> ---
>> NOTE: This is RFC for a few reasons. I'm not sure the use - and there
>> is probably some cleanup that needs to happen around tags, etc.
>> Additionally, I hope to get some feedback on a good enough set of extra
>> keywords.
>
> Overall I'm a bit ambivalent about it. Not sure how important it really is.
>
>> utilities/checkpatch.py | 42 +++
>> 1 file changed, 42 insertions(+)
>>
>> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
>> index 26eb5c3..4e0d319 100755
>> --- a/utilities/checkpatch.py
>> +++ b/utilities/checkpatch.py
>> @@ -24,6 +24,23 @@ __warnings = 0
>> print_file_name = None
>> checking_file = False
>>
>> +spell_check_patch = True
>> +spell_check_dict = None
>> +
>> +try:
>> + import enchant
>> +
>> + extra_keywords = ['ovs', 'vswitch', 'vswitchd', 'ovs-vswitchd', 'netdev',
>> + 'selinux', 'ovs-ctl', 'dpctl', 'ofctl', 'openvswitch',
>> + 'dpdk', 'hugepage', 'hugepages']
>
> I can think of a few extra words - OpenFlow, revalidator, xlate,
> mf_field, mf_fields, geneve, TLV, tun_metadata...
>
> Makes me a bit concerned that there are just way too many jargon words
> that this checker may complain about.
>
> We could try to cover a reasonable set, and then rather than printing
> a warning, print it as an info comment to just request the submitter
> to validate they haven't misspelled anything.
I think I'll sideline it.. It seemed like something useful when I was
going over a different patch, but given your concerns about too much
jargon (with which I tend agree) then let's drop it. I'd much rather
have the tool not grow annoying hairs.
More information about the dev
mailing list