mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: lukas.bulwahn@gmail.com,
	linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] docs: add documentation for checkpatch
Date: Fri, 19 Feb 2021 09:55:40 -0800	[thread overview]
Message-ID: <02966e73a288d49372746d61547084e13a2fac29.camel@perches.com> (raw)
In-Reply-To: <20210217165434.69298-3-dwaipayanray1@gmail.com>

On Wed, 2021-02-17 at 22:24 +0530, Dwaipayan Ray wrote:
> Add documentation for kernel script checkpatch.pl.
> This documentation is also parsed by checkpatch to
> enable a verbose mode.
> 
> The checkpatch message types are grouped by usage. Under
> each group the types are described briefly. 34 of such
> types are documented.

Of course with more to come as you are work on them... ;)

> diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst
[]
> +    This applies for all non-functional blocks.
> +    However, there is one special case, namely functions: they have the
> +    opening brace at the beginning of the next line, thus::
> +
> +      int function(int x)
> +      {
> +        body of function
> +      }
> +
> +    Ref: `Documentation/process/coding-style.rst section 3`

Ideally, these Ref: entries should use a form with the specific section
to jump to.  For example:

	Ref: `https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces`

Perhaps "See: " might be better than "Ref: "

	See: `https://www.kernel.org/doc/html/latest/process/coding-style.html#placing-braces-and-spaces`

> +  **CODE_INDENT**
> +    Code indent should use tabs instead of spaces.
> +    Outside of comments, documentation and Kconfig,
> +    spaces are never used for indentation.
> +    Ref: `Documentation/process/coding-style.rst section 1`

	See: `https://www.kernel.org/doc/html/latest/process/coding-style.html#indentation`

etc...



  reply	other threads:[~2021-02-19 17:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 16:54 [PATCH v4 0/2] checkpatch: add verbose mode Dwaipayan Ray
2021-02-17 16:54 ` [PATCH v4 1/2] " Dwaipayan Ray
2021-02-19 17:55   ` Joe Perches
2021-02-17 16:54 ` [PATCH v4 2/2] docs: add documentation for checkpatch Dwaipayan Ray
2021-02-19 17:55   ` Joe Perches [this message]
2021-02-19 18:34     ` 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=02966e73a288d49372746d61547084e13a2fac29.camel@perches.com \
    --to=joe@perches.com \
    --cc=dwaipayanray1@gmail.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

all inboxes | Powered by JetHome®