From patchwork Fri Mar 1 17:08:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Santana X-Patchwork-Id: 50726 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C1F0037A2; Fri, 1 Mar 2019 18:08:11 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 37B612C0C; Fri, 1 Mar 2019 18:08:09 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9059A3F3B3; Fri, 1 Mar 2019 17:08:08 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.18.25.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBD3B5D707; Fri, 1 Mar 2019 17:08:07 +0000 (UTC) From: Michael Santana To: dev@dpdk.org Cc: stable@dpdk.org, Bruce Richardson , Van Haaren Harry , ramirose@gmail.com, Thomas Monjalon Date: Fri, 1 Mar 2019 12:08:05 -0500 Message-Id: <20190301170806.3547-2-msantana@redhat.com> In-Reply-To: <20190301170806.3547-1-msantana@redhat.com> References: <20190214193547.30783-1-msantana@redhat.com> <20190301170806.3547-1-msantana@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 01 Mar 2019 17:08:08 +0000 (UTC) Subject: [dpdk-dev] [PATCH v3 1/2] Enable codespell by default. Can be disabled from config file. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Enable codespell by default. codespell is a feature by checkpatch.pl that checks for common spelling mistakes in patches. This feature is disabled by default. To enable it one must add the '--codespell' flag to the $options variable in checkpatches.sh. With this change codespell is enabled by default. The user can decide to turn off codespell from a one of the config files read by checkpatches.sh. Signed-off-by: Michael Santana Reviewed-by: Rami Rosen --- v2->v3: Also enable codespell by setting a path to a dictionary file. devtools/checkpatches.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index 3b03b7ef2..d3c0b309a 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -2,9 +2,14 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright 2015 6WIND S.A. +# Enable codespell by default. This can be overwritten from a config file. +# You can also enable codespell by setting DPDK_CHECKPATCH_CODESPELL to a valid path +# to a dictionary.txt file if your dictionary.txt is not in the default location. +DPDK_CHECKPATCH_CODESPELL=enable # Load config options: # - DPDK_CHECKPATCH_PATH # - DPDK_CHECKPATCH_LINE_LENGTH +# - DPDK_CHECKPATCH_CODESPELL . $(dirname $(readlink -e $0))/load-devel-config VALIDATE_NEW_API=$(dirname $(readlink -e $0))/check-symbol-change.sh @@ -13,6 +18,12 @@ length=${DPDK_CHECKPATCH_LINE_LENGTH:-80} # override default Linux options options="--no-tree" +if [ "$DPDK_CHECKPATCH_CODESPELL" == "enable" ]; then + options="$options --codespell" +elif [ -f "$DPDK_CHECKPATCH_CODESPELL" ]; then + options="$options --codespell" + options="$options --codespellfile $DPDK_CHECKPATCH_CODESPELL" +fi options="$options --max-line-length=$length" options="$options --show-types" options="$options --ignore=LINUX_VERSION_CODE,\ From patchwork Fri Mar 1 17:08:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Santana X-Patchwork-Id: 50727 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 88B474C88; Fri, 1 Mar 2019 18:08:13 +0100 (CET) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 075E73256; Fri, 1 Mar 2019 18:08:10 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6490CACA8; Fri, 1 Mar 2019 17:08:09 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.18.25.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF4095D707; Fri, 1 Mar 2019 17:08:08 +0000 (UTC) From: Michael Santana To: dev@dpdk.org Cc: stable@dpdk.org, Bruce Richardson , Van Haaren Harry , ramirose@gmail.com, Thomas Monjalon Date: Fri, 1 Mar 2019 12:08:06 -0500 Message-Id: <20190301170806.3547-3-msantana@redhat.com> In-Reply-To: <20190301170806.3547-1-msantana@redhat.com> References: <20190214193547.30783-1-msantana@redhat.com> <20190301170806.3547-1-msantana@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 01 Mar 2019 17:08:09 +0000 (UTC) Subject: [dpdk-dev] [PATCH v3 2/2] devtools: fix result of svg include check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Fix trivial bug. In sh shell, 'foo = 1' is not the same as 'foo=1'. Using 'foo = 1' makes the shell attempt to interpret foo as a command, rather than a simple variable assignment. Signed-off-by: Michael Santana Fixes: dafc04c15174 ("devtools: fix return of forbidden addition checks") Reviewed-by: David Marchand --- devtools/checkpatches.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index d3c0b309a..16b705384 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -73,7 +73,7 @@ check_forbidden_additions() { # -v RET_ON_FAIL=1 \ -v MESSAGE='Using explicit .svg extension instead of .*' \ -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk \ - "$1" || res = 1 + "$1" || res=1 return $res }