$treeview $search $mathjax $extrastylesheet
librsync
2.0.2
$projectbrief
|
$projectbrief
|
$searchbox |
00001 # Contributing to librsync {#page_contributing} 00002 00003 Instructions and conventions for people wanting to work on librsync. Please 00004 consider these guidelines even if you're doing your own fork. 00005 00006 ## Code Style 00007 00008 The prefered style for code is equivalent to using GNU indent with the 00009 following arguments; 00010 00011 ```Shell 00012 $ indent -linux -nut -i4 -ppi2 -l80 -lc80 -fc1 -fca -sob 00013 ``` 00014 00015 The preferred style for non-docbook comments are as follows; 00016 00017 ```C 00018 00019 /*= 00020 | A short poem that 00021 | shall never ever be 00022 | reformated or reindented 00023 */ 00024 00025 /* Single line comment indented to match code indenting. */ 00026 00027 /* Blank line delimited paragraph multi-line comments. 00028 00029 Without leading stars, or blank line comment delimiters. */ 00030 00031 int a; /* code line comments */ 00032 ``` 00033 00034 The preferred style for docbook comments is javadoc with autobrief as 00035 follows; 00036 00037 ```C 00038 /** \file file.c Brief summary paragraph. 00039 * 00040 * With blank line paragraph delimiters and leading stars. 00041 * 00042 * \param foo parameter descriptions... 00043 * 00044 * \param bar ...in separate blank-line delimited paragraphs. 00045 * 00046 * Example:\code 00047 * code blocks that will never be reformated. 00048 * \endcode 00049 * 00050 * Without blank-line comment delimiters. */ 00051 00052 int a; /**< brief attribute description */ 00053 int b; /**< multiline attribute description 00054 * 00055 * With blank line delimited paragraphs.*/ 00056 ``` 00057 00058 There is a `make tidy` target that will use GNU indent to reformat all 00059 code and non-docbook comments, doing some pre/post processing with sed 00060 to handle some corner cases indent doesn't handle well. 00061 00062 There is also a `make tidyc` target that will reformat all code and 00063 comments with https://github.com/dbaarda/tidyc. This will also 00064 correctly reformat all docbook comments, equivalent to running tidyc 00065 with the following arguments; 00066 00067 ```Shell 00068 $ tidyc -R -C -l80 00069 ``` 00070 00071 ## Pull requests 00072 00073 Fixes or improvements in pull requests are welcome. Please: 00074 00075 - [ ] Send small PRs that address one issues each. 00076 00077 - [ ] Update `NEWS.md` to say what you changed. 00078 00079 - [ ] Add a test as a self-contained C file in `tests/` that passes or fails, 00080 and is hooked into `CMakeLists.txt`. 00081 00082 - [ ] Keep the code style consistent with what's already there, especially in 00083 keeping symbols with an `rs_` prefix. 00084 00085 00086 ## NEWS 00087 00088 [NEWS.md](NEWS.md) contains a list of user-visible changes in the library between 00089 releases version. This includes changes to the way it's packaged, 00090 bug fixes, portability notes, changes to the API, and so on. 00091 00092 Add 00093 and update items under a "Changes in X.Y.Z" heading at the top of 00094 the file. Do this as you go along, so that we don't need to work 00095 out what happened when it's time for a release. 00096 00097 ## Tests 00098 00099 Please try to update docs and tests in parallel with code changes. 00100 00101 ## Releasing 00102 00103 If you are making a new tarball release of librsync, follow this checklist: 00104 00105 * NEWS.md - make sure the top "Changes in X.Y.Z" is correct, and the date is 00106 correct. 00107 00108 * `CMakeLists.txt` - version is correct. 00109 00110 * `librsync.spec` - make sure version and URL are right. 00111 00112 * Run `make all doc check` in a clean checkout of the release tag. 00113 00114 Test results for builds of public github branches are at 00115 https://travis-ci.org/librsync/librsync.