All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Simon Glass <sjg@chromium.org>, u-boot@lists.denx.de
Subject: Re: [PATCH 1/4] doc: Migrate CodingStyle wiki page to sphinx
Date: Sat, 9 Jul 2022 08:36:34 -0400	[thread overview]
Message-ID: <20220709123634.GE1146598@bill-the-cat> (raw)
In-Reply-To: <d10b468b-444a-a6a2-04c0-39116f0938e7@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 2563 bytes --]

On Sat, Jul 09, 2022 at 08:12:27AM +0200, Heinrich Schuchardt wrote:
> On 6/27/22 19:17, Tom Rini wrote:
> > Move the current CodingStyle wiki page to doc/develop/codingstyle.rst.
> > The changes here are for formatting or slight rewording so that it reads
> > well when linking to other sphinx documents.
[snip]
> > +U-Boot adopted the kernel-doc annotation style, this is the only exception from
> > +multi-line comment rule of Coding Style. While not mandatory, adding
> > +documentation is strongly advised. The Linux kernel `kernel-doc <https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html>`_ documentation applies with no changes.
> 
> Developers tend to read the rst files with text editors. Please, keep
> lines short (80 characters). `kernel-doc can go onto the next line.

Linux doesn't have a hard 80 character limit anymore and neither do we,
keep in mind.

> > +applies with no changes.
> > +
> > +Use structures for I/O access
> > +-----------------------------
> > +
> > +U-Boot typically uses a C structure to map out the registers in an I/O region, rather than offsets. The reasons for this are:
> > +
> > +* It dissociates the register location (offset) from the register type, which
> > +  means the developer has to make sure the type is right for each access,
> > +  whereas with the struct method, this is checked by the compiler;
> 
> Please, add blank lines between bullets.

Different than markdown, OK.

[snip]
> > +Tests
> > +-----
> > +
> > +
> > +Please add tests when you add code. Please change or expand tests when you change code.
> > +
> > +Run the tests with::
> > +
> 
> %s/::/:/
> 
> .. code-block:: bash
> 
> > +   make check
> > +   make qcheck   (skips some tests)
> > +
> > +Python tests are in test/py/tests - see the docs in test/py for info.
> 
> Please, add a reference to doc/develop/tests_writing.rst
> 
> > +
> > +Try to write your tests in C if you can. For example, tests to check a command
> > +will be much faster (10-100x or more) if they can directly call run_command()
> 
> %s/10-100x/10 - 100x/
> Please, avoid duplicating information from tests_writing.rst.
> 
> > +and ut_check_console_line() instead of using Python to send commands over a
> > +pipe to U-Boot.
> > +
> > +Tests run all supported CI systems (gitlab, travis, azure) using scripts in the
> 
> %s/gitlab/Gitlab/
> %s/azure/Azure/
> 
> We don't use Travis CI anymore.

This is more substantive than wiki->rST so I'll handle this in another
patch.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  parent reply	other threads:[~2022-07-09 12:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 17:17 [PATCH 0/4] Migrate some wiki pages to sphinx Tom Rini
2022-06-27 17:17 ` [PATCH 1/4] doc: Migrate CodingStyle wiki page " Tom Rini
2022-06-30 10:06   ` Simon Glass
2022-07-09  6:15     ` Heinrich Schuchardt
2022-07-09  6:12   ` Heinrich Schuchardt
2022-07-09 12:32     ` Tom Rini
2022-07-09 12:36     ` Tom Rini [this message]
2022-06-27 17:17 ` [PATCH 2/4] doc: Migrate DesignPrinciples " Tom Rini
2022-06-30 10:06   ` Simon Glass
2022-07-08  7:22   ` Claudius Heine
2022-07-09  6:37   ` Heinrich Schuchardt
2022-07-09 12:39     ` Tom Rini
2022-06-27 17:17 ` [PATCH 3/4] doc: codingstyle: Remove comment about '//' style comments Tom Rini
2022-06-30 10:06   ` Simon Glass
2022-07-09  6:40   ` Heinrich Schuchardt
2022-06-27 17:17 ` [PATCH 4/4] doc: Migrate Process wiki page to sphinx Tom Rini
2022-06-30 10:06   ` Simon Glass
2022-07-08  7:06   ` Claudius Heine
2022-07-08  7:22     ` Martin Bonner
2022-07-08 17:44       ` Tom Rini
2022-07-09  6:55   ` Heinrich Schuchardt
2022-07-09 12:41     ` Tom Rini
2022-07-09 15:02     ` Tom Rini

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=20220709123634.GE1146598@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /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.