[{"id":21009,"web_url":"https://patchwork.libcamera.org/comment/21009/","msgid":"<cff21131-0072-a7ad-6688-a7721b8db22b@ideasonboard.com>","date":"2021-11-18T13:24:58","subject":"Re: [libcamera-devel] [PATCH] Documentation: coding-style: Document\n\tthe git commit hooks","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Laurent,\n\nThank you for the patch.\n\nOn 11/18/21 6:19 PM, Laurent Pinchart wrote:\n> checkstyle.py is ignored too often. Document how to automate its usage\n> through git commit hooks.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n>   Documentation/coding-style.rst | 8 ++++++++\n>   1 file changed, 8 insertions(+)\n>\n> diff --git a/Documentation/coding-style.rst b/Documentation/coding-style.rst\n> index 4e8d6988fef8..053fdd998351 100644\n> --- a/Documentation/coding-style.rst\n> +++ b/Documentation/coding-style.rst\n> @@ -418,4 +418,12 @@ diff that fixes the issues, on top of the corresponding commit. As the script is\n>   in early development false positive are expected. The flagged issues should be\n>   reviewed, but the diff doesn't need to be applied blindly.\n>   \n> +Execution of checkstyle.py can be automated through git commit hooks. Example\n> +of pre-commit and post-commit hooks are available in `utils/hooks/pre-commit`\n> +and `utils/hooks/post-commit`. You can install either hook by copying it to\n> +`.git/hooks/`. The post-commit hook is easier to start with as it will only flag\n> +potential issues after committing, while the pre-commit hook will abort the\n> +commit if issues are detected and requires usage of `git commit --no-verify` to\n> +ignore false positives.\n> +\n>   Happy hacking, libcamera awaits your patches!\n>\n> base-commit: d9a2a1f703273a28b001dee40fddd378bba7a1b6","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D8242BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Nov 2021 13:25:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2F23D60371;\n\tThu, 18 Nov 2021 14:25:05 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7D85B60231\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Nov 2021 14:25:03 +0100 (CET)","from [192.168.1.106] (unknown [103.251.226.87])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3DDD7E7;\n\tThu, 18 Nov 2021 14:25:02 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"L8N26acB\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637241903;\n\tbh=D4t43tv7kktG7Hh0Ya83vUYjQKhNuVZkoJwVlrmXTQ8=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=L8N26acBtDDJ2ti8y6Bn1oacyJFuTBLrnzee32xpeGFn75cVNLHrCbnLWFW+x77Rw\n\tL0+PkjPSeIF/6zaeF3fkX63EAnSDjoccZNEdXeizmtR6ny5dvfoubPhRPwyOCu3FDL\n\tdLUi/RKPthYn2cfrM9s/S2iy7BrZ7eQ7T+0JG5pY=","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20211118124910.31123-1-laurent.pinchart@ideasonboard.com>","From":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<cff21131-0072-a7ad-6688-a7721b8db22b@ideasonboard.com>","Date":"Thu, 18 Nov 2021 18:54:58 +0530","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.10.2","MIME-Version":"1.0","In-Reply-To":"<20211118124910.31123-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH] Documentation: coding-style: Document\n\tthe git commit hooks","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":21010,"web_url":"https://patchwork.libcamera.org/comment/21010/","msgid":"<163724702010.789117.10352145701211228883@Monstersaurus>","date":"2021-11-18T14:50:20","subject":"Re: [libcamera-devel] [PATCH] Documentation: coding-style: Document\n\tthe git commit hooks","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2021-11-18 12:49:10)\n> checkstyle.py is ignored too often. Document how to automate its usage\n> through git commit hooks.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nDefinitely a useful addition, and gives us somewhere to point to.\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  Documentation/coding-style.rst | 8 ++++++++\n>  1 file changed, 8 insertions(+)\n> \n> diff --git a/Documentation/coding-style.rst b/Documentation/coding-style.rst\n> index 4e8d6988fef8..053fdd998351 100644\n> --- a/Documentation/coding-style.rst\n> +++ b/Documentation/coding-style.rst\n> @@ -418,4 +418,12 @@ diff that fixes the issues, on top of the corresponding commit. As the script is\n>  in early development false positive are expected. The flagged issues should be\n>  reviewed, but the diff doesn't need to be applied blindly.\n>  \n> +Execution of checkstyle.py can be automated through git commit hooks. Example\n> +of pre-commit and post-commit hooks are available in `utils/hooks/pre-commit`\n> +and `utils/hooks/post-commit`. You can install either hook by copying it to\n> +`.git/hooks/`. The post-commit hook is easier to start with as it will only flag\n> +potential issues after committing, while the pre-commit hook will abort the\n> +commit if issues are detected and requires usage of `git commit --no-verify` to\n> +ignore false positives.\n> +\n>  Happy hacking, libcamera awaits your patches!\n> \n> base-commit: d9a2a1f703273a28b001dee40fddd378bba7a1b6\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 18FB7BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Nov 2021 14:50:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 557AA60371;\n\tThu, 18 Nov 2021 15:50:24 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B638460231\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Nov 2021 15:50:22 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4DE3FE7;\n\tThu, 18 Nov 2021 15:50:22 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ie//eH7X\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637247022;\n\tbh=W1CnzX9PIJ/owO1mT7peLQH+L1YUEK5LwWnbkGKjhq4=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=ie//eH7XkViHrP1fgKiawwkjY/P4fi54CEGbbVOnsVapoY34UyyLg0q4ywUOOYQAu\n\tT8uoaYpg0BprAbwylBQfBZq0Hm2Ah9JWU9MRHffZi1slITAvKVC4+jIiWaFtD6x5Up\n\tdDIugQs8bfXF4tU4DKw6F3UQlkNJ2W29q2VDuD1c=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20211118124910.31123-1-laurent.pinchart@ideasonboard.com>","References":"<20211118124910.31123-1-laurent.pinchart@ideasonboard.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 18 Nov 2021 14:50:20 +0000","Message-ID":"<163724702010.789117.10352145701211228883@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] Documentation: coding-style: Document\n\tthe git commit hooks","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]