From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E859C433E0 for ; Wed, 17 Feb 2021 10:38:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C187664E28 for ; Wed, 17 Feb 2021 10:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232179AbhBQKiW (ORCPT ); Wed, 17 Feb 2021 05:38:22 -0500 Received: from smtprelay0124.hostedemail.com ([216.40.44.124]:36644 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229707AbhBQKiV (ORCPT ); Wed, 17 Feb 2021 05:38:21 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 99826837F24C; Wed, 17 Feb 2021 10:37:39 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: gold08_4914dfe2764b X-Filterd-Recvd-Size: 3759 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA; Wed, 17 Feb 2021 10:37:38 +0000 (UTC) Message-ID: <4d6856b33cc870ac655d801d066f04af6ebadcd7.camel@perches.com> Subject: Re: [PATCH RFC v3 2/3] docs: add documentation for checkpatch From: Joe Perches To: Dwaipayan Ray , Lukas Bulwahn Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel Date: Wed, 17 Feb 2021 02:37:37 -0800 In-Reply-To: References: <20210213131513.51386-1-dwaipayanray1@gmail.com> <20210213131513.51386-3-dwaipayanray1@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-02-16 at 19:48 +0530, Dwaipayan Ray wrote: > On Sun, Feb 14, 2021 at 10:27 PM Joe Perches 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
(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. 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);