DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Santana <msantana@redhat.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
	Van Haaren Harry <harry.van.haaren@intel.com>,
	ramirose@gmail.com, Thomas Monjalon <thomas@monjalon.net>
Subject: [dpdk-dev] [PATCH v4 1/2] Enable codespell by default. Can be disabled from config file.
Date: Mon,  4 Mar 2019 14:07:15 -0500	[thread overview]
Message-ID: <20190304190716.5847-2-msantana@redhat.com> (raw)
In-Reply-To: <20190304190716.5847-1-msantana@redhat.com>

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 <msantana@redhat.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
---
v3->v4:
  Support enabling codespell via environment variable.

 devtools/checkpatches.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 3b03b7ef2..7e862e0a4 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -5,14 +5,25 @@
 # 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
 
+# Enable codespell by default. This can be overwritten from a config file.
+# 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}
 
 # override default Linux options
 options="--no-tree"
+if [ "$codespell" = "enable" ]; then
+    options="$options --codespell"
+elif [ -f "$codespell" ]; then
+    options="$options --codespell"
+    options="$options --codespellfile $codespell"
+fi
 options="$options --max-line-length=$length"
 options="$options --show-types"
 options="$options --ignore=LINUX_VERSION_CODE,\
-- 
2.20.1

  reply	other threads:[~2019-03-04 19:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13 19:08 [dpdk-dev] [PATCH 0/2] Minor changes to checkpatches Michael Santana
2019-02-13 19:08 ` [dpdk-dev] [PATCH 1/2] Enable codespell from config file Michael Santana
2019-02-13 19:16   ` Van Haaren, Harry
2019-02-14 14:07     ` Bruce Richardson
2019-02-14  2:50   ` Rami Rosen
2019-02-13 19:08 ` [dpdk-dev] [PATCH 2/2] Fix variable assignment Michael Santana
2019-02-14 19:35 ` [dpdk-dev] [PATCH v2 0/2] Minor changes to checkpatches Michael Santana
2019-02-14 19:35   ` [dpdk-dev] [PATCH v2 1/2] Enable codespell by default. Can be disabled from config file Michael Santana
2019-02-28 11:21     ` Thomas Monjalon
2019-02-28 22:09       ` Michael Santana Francisco
2019-02-28 23:01         ` Thomas Monjalon
2019-02-14 19:35   ` [dpdk-dev] [PATCH v2 2/2] Fix variable assignment Michael Santana
2019-02-28 11:14     ` Thomas Monjalon
2019-02-15 14:02   ` [dpdk-dev] [PATCH v2 0/2] Minor changes to checkpatches Bruce Richardson
2019-03-01 17:08   ` [dpdk-dev] [PATCH v3 " Michael Santana
2019-03-01 17:08     ` [dpdk-dev] [PATCH v3 1/2] Enable codespell by default. Can be disabled from config file Michael Santana
2019-03-01 17:43       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-03-01 17:51         ` Thomas Monjalon
2019-03-01 20:24           ` Michael Santana Francisco
2019-03-01 21:08             ` Thomas Monjalon
2019-03-04 16:59               ` Michael Santana Francisco
2019-03-01 17:08     ` [dpdk-dev] [PATCH v3 2/2] devtools: fix result of svg include check Michael Santana
2019-03-01 17:52       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-03-04 10:17         ` David Marchand
2019-03-04 19:07     ` [dpdk-dev] [PATCH v4 0/2] Minor changes to checkpatches Michael Santana
2019-03-04 19:07       ` Michael Santana [this message]
2019-03-04 19:07       ` [dpdk-dev] [PATCH v4 2/2] devtools: fix result of svg include check Michael Santana
2019-03-04 21:46       ` [dpdk-dev] [dpdk-stable] [PATCH v4 0/2] Minor changes to checkpatches Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190304190716.5847-2-msantana@redhat.com \
    --to=msantana@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=ramirose@gmail.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).