diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:02:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 18:02:34 +0000 |
commit | fadeddfbb2aa38a980dd959b5ec1ffba7afd43cb (patch) | |
tree | a7bde6111c84ea64619656a38fba50909fa0bf60 /CONTRIBUTE.md | |
parent | Initial commit. (diff) | |
download | lldpd-fadeddfbb2aa38a980dd959b5ec1ffba7afd43cb.tar.xz lldpd-fadeddfbb2aa38a980dd959b5ec1ffba7afd43cb.zip |
Adding upstream version 1.0.18.upstream/1.0.18upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | CONTRIBUTE.md | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md new file mode 100644 index 0000000..3c2f501 --- /dev/null +++ b/CONTRIBUTE.md @@ -0,0 +1,66 @@ +Coding standards +---------------- + +Contributed code should roughly follow [OpenBSD style][1]. For Emacs, +I am using the following snippet to get the appropriate indentation: + + (c-add-style + "openbsd" + '("bsd" + (c-basic-offset . 8) + (c-tab-width . 8) + (fill-column . 80) + (indent-tabs-mode . t) + (c-offsets-alist . ((defun-block-intro . +) + (statement-block-intro . +) + (statement-case-intro . +) + (statement-cont . *) + (substatement-open . *) + (substatement . +) + (arglist-cont-nonempty . *) + (inclass . +) + (inextern-lang . 0) + (knr-argdecl-intro . +))))) + +Important stuff is to use tabulations. Each tabulation has a width of +8 characters. This limits excessive nesting. Try to respect the 80 +columns limit if possible. + +Opening braces are on the same line, except for functions where they +are on their own lines. Closing braces are always on their own +lives. Return type for functions are on their own lines too: + + int + main(int argc, char *argv[]) + { + /* [...] */ + } + +[1]: http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 + +Submitting patches +------------------ + +Patches against git tip are preferred. Please, clone the repository: + + git clone https://github.com/lldpd/lldpd.git + +Do any modification you need. Commit the modifications with a +meaningful message: + + 1. Use a descriptive first-line. + + 2. Prepend the first line with the name of the subsystem modified + (`lldpd`, `lib`, `client`) or something a bit more precise. + + 3. Don't be afraid to put a lot of details in the commit message. + +Use `git format-patch` to get patches to submit: + + git format-patch origin/master + +Feel free to use `git send-email` which is like `git format-patch` but +will propose to directly send patches by email. You can also open a +[pull request][2] on Github. + +[2]: https://help.github.com/articles/using-pull-requests |