From patchwork Mon Feb 22 09:46:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11354 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 65E7EBD1F1 for ; Mon, 22 Feb 2021 09:46:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DB2AC689FE; Mon, 22 Feb 2021 10:46:13 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="M6jU/8Zc"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9372B602F3 for ; Mon, 22 Feb 2021 10:46:12 +0100 (CET) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0F072344; Mon, 22 Feb 2021 10:46:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613987172; bh=ZkHTB2yjqs7YbXsHLLH+RMjJSPWbfJy9vI0FizPDUAE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M6jU/8ZcaS2hoQ+ZHfw4R6x96hTJ001ehnkrrXcIGT4kNsqnMqtyTDAHW36vXJHmg /etg6g7g0NseoZJJeGsAioCWFfAbAgF/xzk+PMNamU3x+6yHbsvwq8PJbOmL9zrle2 REMu+Qzxsydv5co7BLnI1F6ppCDY6hpn7c83JvdA= From: Kieran Bingham To: libcamera devel Date: Mon, 22 Feb 2021 09:46:08 +0000 Message-Id: <20210222094608.1541623-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210222032915.31452-1-laurent.pinchart@ideasonboard.com> References: <20210222032915.31452-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] clang-format: Enable sorted includes X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" We aim to ensure that our includes are alphabetically sorted. Whilst checkstyle.py also handles this, enable the clang-format explicitly to define the code-style requirement, and allow clang-format to also correct un-sorted header includes. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- I can't see why this isn't enabled, unless clang-format is sorting in a manner which is incompatible with the implementation in our checkstyle.py ? Some initial testing shows that clang-format only sorts per block, separated by newlines, which seems to match our implementation. .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index bef07cd84338..f5d9ba940eeb 100644 --- a/.clang-format +++ b/.clang-format @@ -97,7 +97,7 @@ PenaltyReturnTypeOnItsOwnLine: 60 PointerAlignment: Right ReflowComments: false -SortIncludes: false +SortIncludes: true #SortUsingDeclarations: false # Unknown to clang-format-4.0 SpaceAfterCStyleCast: false SpaceAfterTemplateKeyword: false