gnunet-handbook

The GNUnet Handbook
Log | Files | Refs

commit fb8f10d994376ee095fec57a5b31541540cf5b59
parent aedd1097955fd35d9c4e4d16d42c72b6b2671562
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Fri,  6 Oct 2023 21:16:24 +0200

some cleanup, clarifications

Diffstat:
Mdevelopers/style.rst | 35++++++++++-------------------------
1 file changed, 10 insertions(+), 25 deletions(-)

diff --git a/developers/style.rst b/developers/style.rst @@ -28,12 +28,10 @@ Suffix Usage There exist a few exceptions to these rules within the codebase: -* ``gnunet_config.h`` and ``gnunet_directories.h`` are automatically - generated. -* ``gnunet_common.h``, which defines fundamental routines -* ``platform.h``, first included. - .. I have no idea what that means -* ``gettext.h``, an external library. +* ``gnunet_config.h`` is automatically generated. +* ``gnunet_common.h``, which defines fundamental routines. +* ``platform.h``, a collection of portability functions and macros. +* ``gettext.h``, the internationalization configuration for gettext in GNUnet. Binaries @@ -83,7 +81,7 @@ Symbols ------- Exported symbols must be prefixed with ``GNUNET_[module_name]_`` and be -defined in ``[module_name].c``. The only exceptions to this rule are +defined in ``[module_name].c``. There are exceptions to this rule such as symbols defined in ``gnunet_common.h``. Private symbols, including ``struct``\ s and macros, must not be prefixed. @@ -104,31 +102,19 @@ In either case, if there is only a single test, ``[test_description]`` may be omitted. -``src`` subdirectories ----------------------- - -Subdirectories of ``src`` - - - Coding style ============ -.. todo:: Examples should follow GNU Coding Standards? This project follows the GNU Coding Standards. Indentation is done with two spaces per level, never with tabs. Specific (though incomplete) indentation rules are defined in an ``uncrustify`` -configuration file (in ``contrib``) and are enforced by Git hooks. - -.. todo:: Link to uncrustify config in contrib. +configuration file (in ``contrib/uncrustify.cfg``) and are enforced by Git hooks. C99-style struct initialisation is acceptable and generally encouraged. -.. todo:: Clarify whether there are cases where C99-style struct init is discouraged? - -As in all good C code, we care about symbol space pollution and thus use -:code:`static` to limit the scope where possible, even in the compilation +As in all good C code, we care about symbol space pollution and thus use +:code:`static` to limit the scope where possible, even in the compilation unit that contains :code:`main`. Only one variable should be declared per line: @@ -418,9 +404,8 @@ to inform users and packages of noteworthy changes. NEWS: The API for foo has changed: lorem ipsum. Note that if you run \"./bootstrap\" hooks will be installed that add message hints -to your commit message template when you run \"git commit\" and if you fail -to provide a "NEWS:" line when required the commit will fail. - +to your commit message template when you run \"git commit\". + If you need to modify a commit you can do so using: .. code-block:: console