[v2] doc: explain steps for improved code spell checking

Message ID 20210521085749.849907-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Headers
Series [v2] doc: explain steps for improved code spell checking |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot success github build: passed

Commit Message

Thomas Monjalon May 21, 2021, 8:57 a.m. UTC
  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(-)
  

Comments

David Marchand May 21, 2021, 9:17 a.m. UTC | #1
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>
  
Thomas Monjalon May 21, 2021, 1:49 p.m. UTC | #2
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
  

Patch

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::