diff mbox series

[2/5] doc: Move coccinelle into its own section

Message ID 20210722033553.1588358-3-sjg@chromium.org
State Accepted
Commit a980e7bbde5becf014a8cda7dd0c6fe9c1b234d9
Delegated to: Simon Glass
Headers show
Series doc: Improve documentation for testing | expand

Commit Message

Simon Glass July 22, 2021, 3:35 a.m. UTC
This tool has nothing to do with testing. It is for refactoring code
automatically using a 'semantic patch' tool.

Create a new section for 'refactoring' and move it into there. It is
likely that other topics may fall under the same heading, such as
using moveconfig and search/replace tools.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
This patch was submitted previously:

http://patchwork.ozlabs.org/project/uboot/patch/20210304135118.643277-38-sjg@chromium.org/

It was rejected, but I think that was incorrect.

 doc/develop/index.rst | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Heinrich Schuchardt July 22, 2021, 5:53 a.m. UTC | #1
On 7/22/21 5:35 AM, Simon Glass wrote:
> This tool has nothing to do with testing. It is for refactoring code
> automatically using a 'semantic patch' tool.
>
> Create a new section for 'refactoring' and move it into there. It is
> likely that other topics may fall under the same heading, such as
> using moveconfig and search/replace tools.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> This patch was submitted previously:
>
> http://patchwork.ozlabs.org/project/uboot/patch/20210304135118.643277-38-sjg@chromium.org/
>
> It was rejected, but I think that was incorrect.
>
>   doc/develop/index.rst | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/doc/develop/index.rst b/doc/develop/index.rst
> index 901d39f4564..2bd7c4a1a3a 100644
> --- a/doc/develop/index.rst
> +++ b/doc/develop/index.rst
> @@ -41,7 +41,14 @@ Testing
>      :maxdepth: 1
>
>      testing
> -   coccinelle
>      py_testing
>      tests_writing
>      tests_sandbox
> +
> +Refactoring
> +-----------

Coccinelle is used to detect common coding issues (e.g. using 0 instead
of NULL for pointers). How does this relate to refactoring?

Best regards

Heinrich

> +
> +.. toctree::
> +   :maxdepth: 1
> +
> +   coccinelle
>
Simon Glass July 22, 2021, 1:28 p.m. UTC | #2
Hi Heinrich,

On Wed, 21 Jul 2021 at 23:53, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 7/22/21 5:35 AM, Simon Glass wrote:
> > This tool has nothing to do with testing. It is for refactoring code
> > automatically using a 'semantic patch' tool.
> >
> > Create a new section for 'refactoring' and move it into there. It is
> > likely that other topics may fall under the same heading, such as
> > using moveconfig and search/replace tools.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> > This patch was submitted previously:
> >
> > http://patchwork.ozlabs.org/project/uboot/patch/20210304135118.643277-38-sjg@chromium.org/
> >
> > It was rejected, but I think that was incorrect.
> >
> >   doc/develop/index.rst | 9 ++++++++-
> >   1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/doc/develop/index.rst b/doc/develop/index.rst
> > index 901d39f4564..2bd7c4a1a3a 100644
> > --- a/doc/develop/index.rst
> > +++ b/doc/develop/index.rst
> > @@ -41,7 +41,14 @@ Testing
> >      :maxdepth: 1
> >
> >      testing
> > -   coccinelle
> >      py_testing
> >      tests_writing
> >      tests_sandbox
> > +
> > +Refactoring
> > +-----------
>
> Coccinelle is used to detect common coding issues (e.g. using 0 instead
> of NULL for pointers). How does this relate to refactoring?

Please read the docs in there. You will see a lot of discussion about
semantic patch (spatch). We use coccinelle to do global renames and
refactors.

Regards,
Simon
Simon Glass July 31, 2021, 11:03 p.m. UTC | #3
Hi Heinrich,

On Wed, 21 Jul 2021 at 23:53, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 7/22/21 5:35 AM, Simon Glass wrote:
> > This tool has nothing to do with testing. It is for refactoring code
> > automatically using a 'semantic patch' tool.
> >
> > Create a new section for 'refactoring' and move it into there. It is
> > likely that other topics may fall under the same heading, such as
> > using moveconfig and search/replace tools.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> > This patch was submitted previously:
> >
> > http://patchwork.ozlabs.org/project/uboot/patch/20210304135118.643277-38-sjg@chromium.org/
> >
> > It was rejected, but I think that was incorrect.
> >
> >   doc/develop/index.rst | 9 ++++++++-
> >   1 file changed, 8 insertions(+), 1 deletion(-)
> >
Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/doc/develop/index.rst b/doc/develop/index.rst
index 901d39f4564..2bd7c4a1a3a 100644
--- a/doc/develop/index.rst
+++ b/doc/develop/index.rst
@@ -41,7 +41,14 @@  Testing
    :maxdepth: 1
 
    testing
-   coccinelle
    py_testing
    tests_writing
    tests_sandbox
+
+Refactoring
+-----------
+
+.. toctree::
+   :maxdepth: 1
+
+   coccinelle