-
Notifications
You must be signed in to change notification settings - Fork 37
Contributing
Ales Kozumplik edited this page Apr 29, 2014
·
12 revisions
To have your patches merged:
- conform to hawkey's coding style
- all unit tests on your branch are passing
- preferably with no errors under basic Valgrind check
- add unit tests for any new functionality /fixes your branch is providing
- if you are extending or changing the lib's interface, reflect the changes in Python bindings
- document your changes
- make a pull request against the master branch
- remember to describe all API changes in the request
- indent width is 4, tabs are used for multiples of eight
- in Emacs:
(setq c-basic-offset 4) (setq-default indent-tabs-mode t) (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80))
- in Vim (See also: Per project .vimrc):
"Number of spaces that a <Tab> in the file counts for while editing set tabstop=8 "Number of spaces that a <Tab> counts set softtabstop=4 "Number of spaces to use for each step of (auto)indent (Used for <<, >>, ...) set shiftwidth=2 "GNU style indentation set cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 set autoindent set noexpandtab
- this sucks but is the same as RPM
- indentation style is 'gnu'
- max line width is 80
- avoid curly braces for single-statement blocks. E.g. don't do:
if (condition) { one_thing(); }
- replace the deprecated
fail_if()
andfail_unless()
calls in the unit tests with the newck_*
macros.