From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 56FE6A0C43; Wed, 20 Oct 2021 16:26:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12D37411FA; Wed, 20 Oct 2021 16:26:09 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 1E304411FA for ; Wed, 20 Oct 2021 16:26:07 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10143"; a="289638121" X-IronPort-AV: E=Sophos;i="5.87,167,1631602800"; d="scan'208";a="289638121" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 07:26:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,167,1631602800"; d="scan'208";a="494645908" Received: from silpixa00399126.ir.intel.com ([10.237.223.151]) by orsmga008.jf.intel.com with ESMTP; 20 Oct 2021 07:26:06 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Andrew Rybchenko , Bruce Richardson Date: Wed, 20 Oct 2021 15:26:01 +0100 Message-Id: <20211020142601.157649-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211020134840.2421686-1-bruce.richardson@intel.com> References: <20211020134840.2421686-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] devtools: clarify that lines up to 100 characters are ok X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Since we allow line lengths of up to 100, and the CI checkpatches job only check for that amount, the rest of our tooling and docs should reflect this reality. Therefore we can: * adjust the editorconfig to use that value, to save editors (e.g. vim) from automatically wrapping lines at 80 characters when typing. [Since python checkers all seem to expect 79 character lines max, add for python only a 79-char max line length.] * change the default line length setting in checkpatches script to 100 so as it matches CI and pre-merge checks. * update the docs to clarify that while 80 chars is recommended, up to 100 characters is acceptable. Signed-off-by: Bruce Richardson --- V2: update the checkpatches default and the docs. --- .editorconfig | 3 ++- devtools/checkpatches.sh | 2 +- doc/guides/contributing/coding_style.rst | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index 5101630c8c..ab41c95085 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,11 +11,12 @@ trim_trailing_whitespace = true charset = utf-8 indent_style = tab tab_width = 8 -max_line_length = 80 +max_line_length = 100 [*.py] indent_style = space indent_size = 4 +max_line_length = 79 [meson.build] indent_style = space diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index c314d83a29..205b8a52bf 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -15,7 +15,7 @@ VALIDATE_NEW_API=$(dirname $(readlink -f $0))/check-symbol-change.sh # Codespell can also be enabled by setting DPDK_CHECKPATCH_CODESPELL to a valid path # to a dictionary.txt file if dictionary.txt is not in the default location. codespell=${DPDK_CHECKPATCH_CODESPELL:-enable} -length=${DPDK_CHECKPATCH_LINE_LENGTH:-80} +length=${DPDK_CHECKPATCH_LINE_LENGTH:-100} # override default Linux options options="--no-tree" diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst index b27b5fcfdb..1ce5d00e36 100644 --- a/doc/guides/contributing/coding_style.rst +++ b/doc/guides/contributing/coding_style.rst @@ -27,7 +27,7 @@ Line length is recommended to be not more than 80 characters, including comments .. note:: The above is recommendation, and not a hard limit. - However, it is expected that the recommendations should be followed in all but the rarest situations. + Generally, line lengths up to 100 characters are acceptable in the code. C Comment Style --------------- -- 2.32.0