All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: msantana@redhat.com
Cc: dev@dpdk.org, Van Haaren Harry <harry.van.haaren@intel.com>,
	ramirose@gmail.com, Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH v2 1/2] Enable codespell by default. Can be disabled from config file.
Date: Fri, 01 Mar 2019 00:01:57 +0100	[thread overview]
Message-ID: <1841609.ZLcW5ieq3c@xps> (raw)
In-Reply-To: <f602838b-bdd2-bfe3-96f0-44a4ef880fc3@redhat.com>

28/02/2019 23:09, Michael Santana Francisco:
> On 2/28/19 6:21 AM, Thomas Monjalon wrote:
> > 14/02/2019 20:35, Michael Santana:
> >> Enable codespell by default.
> >> codespell is a feature by checkpatch.pl that
> >> checks for common spelling mistakes in patches.
> > What is the difference between codespell and spelling.txt included
> > with checkpatch?
> > Is it just a different dictionary?
> codespell has a larger dictionary, about 15000 word fixes whereas 
> spelling.txt has about 1000.
> That's really the only big difference

OK

> >> This feature is disabled by default. To enable it one must add
> >> the '--codespell' flag to the $options variable in
> >> checkpatches.sh.
> > We need also to specify the dictionary path if not in
> > /usr/share/codespell/dictionary.txt
> > In my case, it is in /usr/lib/python3.7/site-packages/codespell_lib/data/dictionary.txt
> >
> >> With this change codespell is enabled by default.
> > It seems it is not enabled by default,
> > because we need DPDK_CHECKPATCH_CODESPELL=enable
> V2 sets DPDK_CHECKPATCH_CODESPELL=enable at the beginning of 
> checkpatches, right before reading in the config files.
> If DPDK_CHECKPATCH_CODESPELL is set in one of the config files it 
> overwrites the enabled by default.
> This way a user can disable it via a config file

OK I missed it.

> >> The user can decide to turn off codespell from a one of the config
> >> files read by checkpatches.sh.
> > [...]
> >>   # override default Linux options
> >>   options="--no-tree"
> >> +if [ "$DPDK_CHECKPATCH_CODESPELL" == "enable" ]; then
> > What about allowing either "enable" or a path?
> > If it is a path (have some slash), then we can add --codespellfile option.
> I like your thinking. We can use `if [ -f <file> ]` to see if the path 
> given is an existing file.
> so, if DPDK_CHECKPATCH_CODESPELL is set to enable, then enable it with 
> default path (the way it is right now)
> if DPDK_CHECKPATCH_CODESPELL is set to a valid path to a file then 
> enable codespell and set --codespellfile to said file
> otherwise if it's not set to enable or set to a valid path file, then 
> assume it's disabled.
> Missed anything?

Well described. Would be nice to see in v3. Thanks

  reply	other threads:[~2019-02-28 23:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13 19:08 [PATCH 0/2] Minor changes to checkpatches Michael Santana
2019-02-13 19:08 ` [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 ` [PATCH 2/2] Fix variable assignment Michael Santana
2019-02-14 19:35 ` [PATCH v2 0/2] Minor changes to checkpatches Michael Santana
2019-02-14 19:35   ` [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 [this message]
2019-02-14 19:35   ` [PATCH v2 2/2] Fix variable assignment Michael Santana
2019-02-28 11:14     ` Thomas Monjalon
2019-02-15 14:02   ` [PATCH v2 0/2] Minor changes to checkpatches Bruce Richardson
2019-03-01 17:08   ` [PATCH v3 " Michael Santana
2019-03-01 17:08     ` [PATCH v3 1/2] Enable codespell by default. Can be disabled from config file Michael Santana
2019-03-01 17:43       ` [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     ` [PATCH v3 2/2] devtools: fix result of svg include check Michael Santana
2019-03-01 17:52       ` [dpdk-stable] " Thomas Monjalon
2019-03-04 10:17         ` David Marchand
2019-03-04 19:07     ` [PATCH v4 0/2] Minor changes to checkpatches Michael Santana
2019-03-04 19:07       ` [PATCH v4 1/2] Enable codespell by default. Can be disabled from config file Michael Santana
2019-03-04 19:07       ` [PATCH v4 2/2] devtools: fix result of svg include check Michael Santana
2019-03-04 21:46       ` [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=1841609.ZLcW5ieq3c@xps \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=msantana@redhat.com \
    --cc=ramirose@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.