linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dwaipayan Ray <dwaipayanray1@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC v3 2/3] docs: add documentation for checkpatch
Date: Wed, 17 Feb 2021 21:16:08 +0530	[thread overview]
Message-ID: <CABJPP5A+g1_jCLPPgSc4wu8O7birW4yBE_9+HJusLFHOsS3Eug@mail.gmail.com> (raw)
In-Reply-To: <4d6856b33cc870ac655d801d066f04af6ebadcd7.camel@perches.com>

On Wed, Feb 17, 2021 at 4:07 PM Joe Perches <joe@perches.com> wrote:
>
> On Tue, 2021-02-16 at 19:48 +0530, Dwaipayan Ray wrote:
> > On Sun, Feb 14, 2021 at 10:27 PM Joe Perches <joe@perches.com> wrote:
> > > On Sat, 2021-02-13 at 18:45 +0530, Dwaipayan Ray wrote:
> > > > Add documentation for kernel script checkpatch.pl.
> > > > This documentation is also parsed by checkpatch to
> > > > enable a verbose mode.
> > > >
> > > > The message types in checkpatch are documented with rst
> > > > field lists. A total of 33 checkpatch type descriptions
> > > > are added.
> > >
> > > Alphabetic ordering isn't that great for these entries.
> > > Please group them by use:
> > >
> > > whitespace/code layout style:
> > > SPACING, TRAILING_WHITESPACE, LINE_SPACING
> []
> > Could I get some comment on this grouping for types:
> >
> > Allocation Style: ALLOC_ARRAY_ARGS, ALLOC_SIZEOF_STRUCT, ALLOC_WITH_MULTIPLY
> >
> > API Usage: ARCH_DEFINES, ARCH_INCLUDE_LINUX, ARRAY_SIZE, AVOID_BUG,
> >                     AVOID_EXTERNS, AVOID_L_PREFIX, BIT_MACRO, CONSIDER_KSTRTO
> >
> > Comment Style: BLOCK_COMMENT_STYLE, C99_COMMENTS
> >
> > Commit Message: BAD_SIGN_OFF, BAD_STABLE_ADDRESS_STYLE, COMMIT_COMMENT_SYMBOL,
> >                               COMMIT_MESSAGE, MISSING_SIGN_OFF,
> > NO_AUTHOR_SIGN_OFF
> >
> > Comparison Style: ASSIGN_IN_IF, BOOL_COMPARISON, COMPARISON_TO_NULL,
> >                                CONSTANT_COMPARISON
> >
> > Spacing & Brackets: ASSIGNMENT_CONTINUATIONS, BRACES, BRACKET_SPACE,
> >                                   CODE_INDENT, CONCATENATED_STRING,
> > LINE_SPACING,
> >                                   TRAILING_WHITESPACE
> >
> > Others: CAMELCASE, CONFIG_DESCRIPTION
> >
> > This is what I have done till now. Any suggestions would be nice and if it looks
> > okay I would like to send the v4 in.
>
> Looks OK.
>
> Please make sure you at least include SPACING in the spacing & brackets
> descriptions.
>
> It also seems like ref links to Documentation/process/coding-style.rst
> <section> (3.1 in the SPACING case) should be used more frequently.
>
> It'd be 'nice' to somehow use sortable tables with some grouping
> attribute for these groups, but I have no idea if that's feasible with
> .rst restrutured text files.
>

I too didn't find anything like that. Seems like static tables are the most
that's feasible with sphynx. But here it might not look well.

> Perhaps simplify the checkpatch code a bit for the --terse and --verbose
> output.
>
> Maybe something like:
> ---
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 869d80397f9f..07566cb3b3f8 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
>
> @@ -292,15 +292,16 @@ GetOptions(
>
>  help(0) if ($help);
>
> +die "$P: --git cannot be used with --file or --fix\n" if ($git && ($file || $fix));
> +die "$P: --verbose canot be used with --terse\n" if ($verbose && $terse);
> +
>  list_types(0) if ($list_types);
>

Sure will do this. Sending you the updated patch in a while.

Thanks!
--Dwaipayan

  reply	other threads:[~2021-02-17 15:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13 13:15 [PATCH RFC v3 0/3] checkpatch: add verbose mode Dwaipayan Ray
2021-02-13 13:15 ` [PATCH RFC v3 1/3] " Dwaipayan Ray
2021-02-13 13:15 ` [PATCH RFC v3 2/3] docs: add documentation for checkpatch Dwaipayan Ray
2021-02-14 12:15   ` Matthew Wilcox
2021-02-15 18:11     ` Joe Perches
2021-02-15 19:12       ` Matthew Wilcox
2021-02-14 16:57   ` Joe Perches
2021-02-15 15:50     ` Dwaipayan Ray
2021-02-15 15:55       ` Joe Perches
2021-02-16 14:18     ` Dwaipayan Ray
2021-02-17 10:37       ` Joe Perches
2021-02-17 15:46         ` Dwaipayan Ray [this message]
2021-02-13 13:15 ` [PATCH RFC v3 3/3] " Dwaipayan Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABJPP5A+g1_jCLPPgSc4wu8O7birW4yBE_9+HJusLFHOsS3Eug@mail.gmail.com \
    --to=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).