CONTRIBUTING.rst 2.83 KB
Newer Older
1 2 3 4 5 6
===================================
 Contribution Guide for libgcompat
===================================
:Author:
  * **A. Wilcox**, documentation writer
:Copyright:
7
  © 2016-2018 Adélie Linux and contributors.  NCSA open source licence.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34




Introduction
============

This repository contains the libgcompat, a library providing GNU libc (glibc)
compatibility for Linux computers using the musl libc.




Code style
==========

Contributions are expected to maintain a consistent code style.  This ensures
readable and future maintainability, since all the code will look and feel the
same.  A few key notes about the C style used in this repository:


Include comments
````````````````

When using the ``#include`` preprocessor directive, add a comment next to it
detailing the interfaces used from that header.  For example:

A. Wilcox's avatar
A. Wilcox committed
35 36 37
::
 
  #include <stdlib.h>     /* getenv */
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66


Tabs
````

Hard tabs (\t) are used, and are 8 spaces.  Where brace alignment is required,
tabs are used to the nearest eighth space, followed by the requisite number of
spaces.


Braces
``````

**Always** use braces for blocks like ``if``, ``while``, ``for``, even if the
block only contains a single statement.  This is to ensure that more complex
decision trees do not have accidental side-effects.




Contributing Changes
====================

This section describes the usual flows of contribution to this repository.


GitLab Pull Requests
````````````````````

A. Wilcox's avatar
A. Wilcox committed
67
#. If you do not already have an Adélie GitLab_ account, you must create one.
68

69
#. Create a *fork* of the gcompat repository.  For more information, consult
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
   the GitLab online documentation.

#. Clone your forked repository to your computer.

#. Make your changes.

#. Test your changes to ensure they are correct.

#. Add (or remove) changed files using ``git add`` and ``git rm``.

#. Commit your changes to the tree using the command ``git commit`` and
   ``git push``.

#. Visit your forked repository in a Web browser.

#. Choose the *Create Pull Request* button.

#. Review your changes to ensure they are correct, and then submit the form.

A. Wilcox's avatar
A. Wilcox committed
89 90
.. GitLab_: https://code.foxkit.us/

91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112

Mailing List
````````````

#. Clone the packages repository to your computer.

#. Make your changes.

#. Test your changes to ensure they are correct.

#. Add (or remove) changed files using ``git add`` and ``git rm``.

#. Commit your changes to the tree using the command ``git commit``.

#. Use the command ``git format-patch HEAD^`` to create a patch file for your
   commit.

   .. note:: If you have made multiple commits to the tree, you will need to
             add an additional ^ for each commit you have made.  For example,
             if you have made three commits, you will use the command
             ``git format-patch HEAD^^^``.

113
#. Email the resulting patch to the gcompat@lists.adelielinux.org mailing
114
   list, or use ``git send-email``.