DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/1] doc: explain steps for improved code spell checking
@ 2021-02-03 10:30 Thomas Monjalon
  2021-02-03 12:18 ` Bruce Richardson
  2021-05-21  8:57 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Monjalon @ 2021-02-03 10:30 UTC (permalink / raw)
  To: dev

The script build-dict.sh was added in DPDK 20.08.
It generates a better dictionary for spell checking
done via checkpatch.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/contributing/patches.rst | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
index a7346b4cb1..a27e5731a6 100644
--- a/doc/guides/contributing/patches.rst
+++ b/doc/guides/contributing/patches.rst
@@ -431,11 +431,15 @@ updating the Linux kernel sources.
 The path to the original Linux script must be set in the environment variable ``DPDK_CHECKPATCH_PATH``.
 
 Spell checking of commonly misspelled words
-can be enabled by downloading the codespell dictionary::
+can be enabled with the codespell library::
 
-   https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
+   git clone https://github.com/codespell-project/codespell.git
 
-The path to the downloaded ``dictionary.txt`` must be set
+There is a DPDK script to build an adjusted dictionary::
+
+   devtools/build-dict.sh codespell/ > codespell-dpdk.txt
+
+The path to the dictionary must be set
 in the environment variable ``DPDK_CHECKPATCH_CODESPELL``.
 
 Environment variables required by the development tools,
-- 
2.30.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH 1/1] doc: explain steps for improved code spell checking
  2021-02-03 10:30 [dpdk-dev] [PATCH 1/1] doc: explain steps for improved code spell checking Thomas Monjalon
@ 2021-02-03 12:18 ` Bruce Richardson
  2021-02-03 12:53   ` Thomas Monjalon
  2021-05-21  8:57 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
  1 sibling, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2021-02-03 12:18 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Wed, Feb 03, 2021 at 11:30:57AM +0100, Thomas Monjalon wrote:
> The script build-dict.sh was added in DPDK 20.08.
> It generates a better dictionary for spell checking
> done via checkpatch.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  doc/guides/contributing/patches.rst | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
> index a7346b4cb1..a27e5731a6 100644
> --- a/doc/guides/contributing/patches.rst
> +++ b/doc/guides/contributing/patches.rst
> @@ -431,11 +431,15 @@ updating the Linux kernel sources.
>  The path to the original Linux script must be set in the environment variable ``DPDK_CHECKPATCH_PATH``.
>  
>  Spell checking of commonly misspelled words
> -can be enabled by downloading the codespell dictionary::
> +can be enabled with the codespell library::
>  
> -   https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
> +   git clone https://github.com/codespell-project/codespell.git
>  

Does installing via apt or dnf work as well? If we do install from package
do we still need to specify the path to codespell as script parameter?

> -The path to the downloaded ``dictionary.txt`` must be set
> +There is a DPDK script to build an adjusted dictionary::
> +
> +   devtools/build-dict.sh codespell/ > codespell-dpdk.txt
> +

Do we always need to have people build this themselves? Can we create a
.codespell-dpdk.txt file in the repo and have that as the default value for
the path if the environment variable is not set?

> +The path to the dictionary must be set
>  in the environment variable ``DPDK_CHECKPATCH_CODESPELL``.
>  
>  Environment variables required by the development tools,
> -- 
> 2.30.0
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH 1/1] doc: explain steps for improved code spell checking
  2021-02-03 12:18 ` Bruce Richardson
@ 2021-02-03 12:53   ` Thomas Monjalon
  2021-02-03 13:59     ` Bruce Richardson
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2021-02-03 12:53 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

03/02/2021 13:18, Bruce Richardson:
> On Wed, Feb 03, 2021 at 11:30:57AM +0100, Thomas Monjalon wrote:
> > -   https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
> > +   git clone https://github.com/codespell-project/codespell.git
> >  
> 
> Does installing via apt or dnf work as well? If we do install from package
> do we still need to specify the path to codespell as script parameter?

It depends whether all needed dictionary files are installed. Are they?

> > -The path to the downloaded ``dictionary.txt`` must be set
> > +There is a DPDK script to build an adjusted dictionary::
> > +
> > +   devtools/build-dict.sh codespell/ > codespell-dpdk.txt
> > +
> 
> Do we always need to have people build this themselves? Can we create a
> .codespell-dpdk.txt file in the repo and have that as the default value for
> the path if the environment variable is not set?

The dictionaries are frequently updated.
I don't really want to update them in DPDK.

The default dictionary from the distro is used by default (if installed).

In general, I think only tree maintainers and CI admins
have to install the dictionaries for better result.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH 1/1] doc: explain steps for improved code spell checking
  2021-02-03 12:53   ` Thomas Monjalon
@ 2021-02-03 13:59     ` Bruce Richardson
  2021-02-03 15:53       ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2021-02-03 13:59 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Wed, Feb 03, 2021 at 01:53:58PM +0100, Thomas Monjalon wrote:
> 03/02/2021 13:18, Bruce Richardson:
> > On Wed, Feb 03, 2021 at 11:30:57AM +0100, Thomas Monjalon wrote:
> > > -   https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
> > > +   git clone https://github.com/codespell-project/codespell.git
> > >  
> > 
> > Does installing via apt or dnf work as well? If we do install from package
> > do we still need to specify the path to codespell as script parameter?
> 
> It depends whether all needed dictionary files are installed. Are they?
> 
> > > -The path to the downloaded ``dictionary.txt`` must be set
> > > +There is a DPDK script to build an adjusted dictionary::
> > > +
> > > +   devtools/build-dict.sh codespell/ > codespell-dpdk.txt
> > > +
> > 
> > Do we always need to have people build this themselves? Can we create a
> > .codespell-dpdk.txt file in the repo and have that as the default value for
> > the path if the environment variable is not set?
> 
> The dictionaries are frequently updated.
> I don't really want to update them in DPDK.
> 
> The default dictionary from the distro is used by default (if installed).
> 
> In general, I think only tree maintainers and CI admins
> have to install the dictionaries for better result.
> 
That's good. Perhaps it's better to note down then first that the default
distro dictionaries are used and if one wants enhanced checking to follow
the extra steps.

/Bruce

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH 1/1] doc: explain steps for improved code spell checking
  2021-02-03 13:59     ` Bruce Richardson
@ 2021-02-03 15:53       ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2021-02-03 15:53 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

03/02/2021 14:59, Bruce Richardson:
> On Wed, Feb 03, 2021 at 01:53:58PM +0100, Thomas Monjalon wrote:
> > 03/02/2021 13:18, Bruce Richardson:
> > > On Wed, Feb 03, 2021 at 11:30:57AM +0100, Thomas Monjalon wrote:
> > > > -   https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
> > > > +   git clone https://github.com/codespell-project/codespell.git
> > > >  
> > > 
> > > Does installing via apt or dnf work as well? If we do install from package
> > > do we still need to specify the path to codespell as script parameter?
> > 
> > It depends whether all needed dictionary files are installed. Are they?
> > 
> > > > -The path to the downloaded ``dictionary.txt`` must be set
> > > > +There is a DPDK script to build an adjusted dictionary::
> > > > +
> > > > +   devtools/build-dict.sh codespell/ > codespell-dpdk.txt
> > > > +
> > > 
> > > Do we always need to have people build this themselves? Can we create a
> > > .codespell-dpdk.txt file in the repo and have that as the default value for
> > > the path if the environment variable is not set?
> > 
> > The dictionaries are frequently updated.
> > I don't really want to update them in DPDK.
> > 
> > The default dictionary from the distro is used by default (if installed).
> > 
> > In general, I think only tree maintainers and CI admins
> > have to install the dictionaries for better result.
> > 
> That's good. Perhaps it's better to note down then first that the default
> distro dictionaries are used and if one wants enhanced checking to follow
> the extra steps.

Yes I'll reword.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v2] doc: explain steps for improved code spell checking
  2021-02-03 10:30 [dpdk-dev] [PATCH 1/1] doc: explain steps for improved code spell checking Thomas Monjalon
  2021-02-03 12:18 ` Bruce Richardson
@ 2021-05-21  8:57 ` Thomas Monjalon
  2021-05-21  9:17   ` David Marchand
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2021-05-21  8:57 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, ferruh.yigit, david.marchand

The script build-dict.sh was added in DPDK 20.08.
It generates a better dictionary for spell checking
done via checkpatch.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v2: explain the default
---
 doc/guides/contributing/patches.rst | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
index 6dbbd5f8d1..b9cc6e67ae 100644
--- a/doc/guides/contributing/patches.rst
+++ b/doc/guides/contributing/patches.rst
@@ -430,14 +430,17 @@ updating the Linux kernel sources.
 
 The path to the original Linux script must be set in the environment variable ``DPDK_CHECKPATCH_PATH``.
 
-Spell checking of commonly misspelled words
-can be enabled by downloading the codespell dictionary::
-
-   https://raw.githubusercontent.com/codespell-project/codespell/master/codespell_lib/data/dictionary.txt
-
-The path to the downloaded ``dictionary.txt`` must be set
+Spell checking of commonly misspelled words is enabled
+by default if installed in ``/usr/share/codespell/dictionary.txt``.
+A different dictionary path can be specified
 in the environment variable ``DPDK_CHECKPATCH_CODESPELL``.
 
+There is a DPDK script to build an adjusted dictionary
+from the multiple codespell dictionaries::
+
+   git clone https://github.com/codespell-project/codespell.git
+   devtools/build-dict.sh codespell/ > codespell-dpdk.txt
+
 Environment variables required by the development tools,
 are loaded from the following files, in order of preference::
 
-- 
2.31.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH v2] doc: explain steps for improved code spell checking
  2021-05-21  8:57 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
@ 2021-05-21  9:17   ` David Marchand
  2021-05-21 13:49     ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: David Marchand @ 2021-05-21  9:17 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Bruce Richardson, Yigit, Ferruh

On Fri, May 21, 2021 at 10:58 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> The script build-dict.sh was added in DPDK 20.08.
> It generates a better dictionary for spell checking
> done via checkpatch.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Reviewed-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH v2] doc: explain steps for improved code spell checking
  2021-05-21  9:17   ` David Marchand
@ 2021-05-21 13:49     ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2021-05-21 13:49 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Yigit, Ferruh, David Marchand

21/05/2021 11:17, David Marchand:
> On Fri, May 21, 2021 at 10:58 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > The script build-dict.sh was added in DPDK 20.08.
> > It generates a better dictionary for spell checking
> > done via checkpatch.
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-21 13:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03 10:30 [dpdk-dev] [PATCH 1/1] doc: explain steps for improved code spell checking Thomas Monjalon
2021-02-03 12:18 ` Bruce Richardson
2021-02-03 12:53   ` Thomas Monjalon
2021-02-03 13:59     ` Bruce Richardson
2021-02-03 15:53       ` Thomas Monjalon
2021-05-21  8:57 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon
2021-05-21  9:17   ` David Marchand
2021-05-21 13:49     ` Thomas Monjalon

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).