[ovs-dev,0/3] checkpatch: the comment years!
mbox series

Message ID 20180323213142.461-1-aconole@redhat.com
Headers show
Series
  • checkpatch: the comment years!
Related show

Message

Aaron Conole March 23, 2018, 9:31 p.m. UTC
This series tries to get checkpatch a little better at skipping
stylistic things within comments, as well as growing a new feature
to actually spell check words in the comments.

Patch 1 just cleans up the patch line-type state machine a little.

Patch 2 introduces a c/c++ comment detection state machine filter,
and plugs the infix operator whitespace detector to it.  Turns out it's
the best way of detecting infix operators in comments.

I didn't *heavily* stress test this machine, but I did use checkpatch -2000
to get some samples.

Patch 3 introduces an opt-in spell checker.  This can aid in reducing any
mispellings.  I sent something like this before, but it wasn't opt-in
at the time and it was probably a bit harder to understand then.

Aaron Conole (3):
  checkpatch: introduce constants for the parse states
  checkpatch: filter comment contents
  checkpatch: add a comment spell-checker

 utilities/checkpatch.py | 172 +++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 163 insertions(+), 9 deletions(-)

Comments

Aaron Conole March 24, 2018, 4 p.m. UTC | #1
Aaron Conole <aconole@redhat.com> writes:

> This series tries to get checkpatch a little better at skipping
> stylistic things within comments, as well as growing a new feature
> to actually spell check words in the comments.
>
> Patch 1 just cleans up the patch line-type state machine a little.
>
> Patch 2 introduces a c/c++ comment detection state machine filter,
> and plugs the infix operator whitespace detector to it.  Turns out it's
> the best way of detecting infix operators in comments.
>
> I didn't *heavily* stress test this machine, but I did use checkpatch -2000
> to get some samples.
>
> Patch 3 introduces an opt-in spell checker.  This can aid in reducing any
> mispellings.  I sent something like this before, but it wasn't opt-in
> at the time and it was probably a bit harder to understand then.
>
> Aaron Conole (3):
>   checkpatch: introduce constants for the parse states
>   checkpatch: filter comment contents
>   checkpatch: add a comment spell-checker
>
>  utilities/checkpatch.py | 172 +++++++++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 163 insertions(+), 9 deletions(-)

Ugh.  Flake8 was broken on my system.  Don't pull this.  New version
incoming next week.