summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-06-12 07:29:22 +0200
committerThomas Haller <thaller@redhat.com>2019-06-12 07:31:00 +0200
commita3e75f329446a93a61ca4c458a7657bd919f4fe6 (patch)
tree2000f6ae2f07dfd299f5098a7b3c3310811335fd
parentb323b3d62eb1b9b9ae6881c1b721fc1fca9606a2 (diff)
CONTRIBUTING: style update
Also drop the paragraph about "autoconf mechanism". The general guideline is self evident, while it didn't mention meson builds. Also, a first time contributor likely won't likely be concerned about this, as this is already advanced.
-rw-r--r--CONTRIBUTING37
1 files changed, 18 insertions, 19 deletions
diff --git a/CONTRIBUTING b/CONTRIBUTING
index 464b0b899..3127eccf2 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -1,19 +1,17 @@
-Guidelines for Contributing:
-
-1) Platform-specific functionality (for example, location of binaries that
-NetworkManager calls, or functionality used only on some platforms or
-distribution, like resolvconf) should be configurable at build time, with the
-normal autoconf mechanisms for putting a #define in config.h (AC_DEFINE), then
-with #ifdef MY_DEFINE / #endif in the code.
-
-2) Coding standards are generally GNOME coding standards, with these exceptions:
- a) 4 space tabs (_not_ 8-space tabs)
- b) REAL tabs (_not_ a mix of tabs and spaces in the initial indent)
- c) spaces used to align continuation lines past the indent point of the
- first statement line, like so:
-
- if (some_really_really_long_variable_name &&
- another_really_really_long_variable_name) {
+Guidelines for Contributing
+===========================
+
+Coding Standard
+---------------
+
+Coding standards are generally GNOME coding standards, with these exceptions:
+ a) 4 space tabs (_not_ 8-space tabs)
+ b) REAL tabs (_not_ a mix of tabs and spaces in the initial indent)
+ c) spaces used to align continuation lines past the indent point of the
+ first statement line, like so:
+
+ if ( some_really_really_long_variable_name
+ && another_really_really_long_variable_name) {
...
}
@@ -36,7 +34,8 @@ with #ifdef MY_DEFINE / #endif in the code.
GOOD: #define MY_CONSTANT 42
BAD: static const unsigned myConstant = 42;
-3) Legal:
+Legal
+-----
NetworkManager is partly licensed under terms of GNU Lesser General Public License
version 2 or later (LGPL-2.0+). That is for example the case for libnm.
@@ -49,13 +48,13 @@ The reason for that is that we might eventually relicense everything as LGPL and
new contributions already must agree with that future change.
Assertions in NetworkManager code
-=================================
+---------------------------------
There are different kind of assertions. Use the one that is appropriate.
1) g_return_*() from glib. This is usually enabled in release builds and
can be disabled with G_DISABLE_CHECKS define. This uses g_log() with
- a cG_LOG_LEVEL_CRITICAL level (which allows the program to continue,
+ G_LOG_LEVEL_CRITICAL level (which allows the program to continue,
until G_DEBUG=fatal-criticals or G_DEBUG=fatal-warnings is set). As such,
this is the preferred way for assertions that are commonly enabled.