commit be0d8e4042e96ec0e5a1dd851ecdc9c7e58c0acf Author: Jacob Appelbaum jacob@appelbaum.net Date: Fri Apr 19 17:42:17 2013 -0700
Lets integrate an image that shows build status --- HACKING | 104 --------------------------------------------------------- HACKING.md | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+), 104 deletions(-)
diff --git a/HACKING b/HACKING deleted file mode 100644 index b11ce31..0000000 --- a/HACKING +++ /dev/null @@ -1,104 +0,0 @@ -Please feel free to contribute patches; here are the basic guidelines to hack -along with us! - -Please work from a git tree by cloning the repo: - - git clone https://github.com/ioerror/tlsdate.git - -Please file bugs on the tlsdate issue tracker: - - https://github.com/ioerror/tlsdate/issues - -Please use the github pull request feature when possible. - -Continuous integration is available for a number of platforms: - - https://jenkins.torproject.org/job/tlsdate-ci-linux/ - https://travis-ci.org/ioerror/tlsdate - http://build.chromium.org/p/chromiumos/waterfall - -White Space: - - Spaces only, no tabs; all tabs must die - No stray spaces at the end of lines - Generally try not to add excessive empty white space - -Documentation: - - Document all functions with doxygen style comments - -Ensuring Correctness: - - Test your patches and ensure: - - No compiler warnings or errors - No linker warnings or errors - - Test your improved copy of tlsdate extensively - -Security: - - tlsdate is security sensitive - please consider where you add code and in - what context it will run. When possible, run with the least privilege as is - possible. - -Proactively find bugs: - - Run your copy of tlsdate under valgrind - -Weird but meaningful conventions are prefered in tlsdate. We prefer attention -to detail: - - if ( NULL == foo (void) ) - { - bar (void); - } - -Over quick, hard to read and potentilly incorrect: - - if (foo(void)==NULL)) - bar(); - -Define magic numbers and explain their origin: - - // As taken from RFC 3.14 - #define MAGIC_NUMBER 23 // This goes in foo.h - ptr = malloc (MAGIC_NUMBER); - -Rather than just throwing them about in code: - - ptr = malloc (23); - -It is almost always prefered to use dynamically allocated memory: - - widget_ptr = malloc (WIDGET_SIZE); - -Try to avoid static allocations like the following: - - char widget[WIDGET_SIZE]; - -Try to use unsigned values unless an API requires signed values: - - uint32_t server_time_s; - -Please provide relevant CHANGELOG entries for all changes. -Please remove items from the TODO file as they are completed. -Please provide unittest cases. - -When submitting patches via email, please use `git format-patch` to format -patches: - - git format-patch 9a61fcba9bebc3fa2d91c9f79306bf316c59cbcc - -Email patches with a GnuPG signature whenever possible. - -When applying patches, please use `git am` to apply patches: - - git am -i 0001-add-TODO-item.patch - -If `git format-patch` is not possible, please send a unified diff. - -When in doubt, please consult the Tor HACKING guide: - - https://gitweb.torproject.org/tor.git/blob/HEAD:/doc/HACKING - diff --git a/HACKING.md b/HACKING.md new file mode 100644 index 0000000..b069e07 --- /dev/null +++ b/HACKING.md @@ -0,0 +1,108 @@ +Please feel free to contribute patches; here are the basic guidelines to hack +along with us! + +Please work from a git tree by cloning the repo: + + git clone https://github.com/ioerror/tlsdate.git + +Please file bugs on the tlsdate issue tracker: + + https://github.com/ioerror/tlsdate/issues + +Please use the github pull request feature when possible. + +The current build status is available as a handy image: + +[%5D(http://tr...) + +Continuous integration is available for a number of platforms: + + https://jenkins.torproject.org/job/tlsdate-ci-linux/ + https://travis-ci.org/ioerror/tlsdate + http://build.chromium.org/p/chromiumos/waterfall + +White Space: + + Spaces only, no tabs; all tabs must die + No stray spaces at the end of lines + Generally try not to add excessive empty white space + +Documentation: + + Document all functions with doxygen style comments + +Ensuring Correctness: + + Test your patches and ensure: + + No compiler warnings or errors + No linker warnings or errors + + Test your improved copy of tlsdate extensively + +Security: + + tlsdate is security sensitive - please consider where you add code and in + what context it will run. When possible, run with the least privilege as is + possible. + +Proactively find bugs: + + Run your copy of tlsdate under valgrind + +Weird but meaningful conventions are prefered in tlsdate. We prefer attention +to detail: + + if ( NULL == foo (void) ) + { + bar (void); + } + +Over quick, hard to read and potentilly incorrect: + + if (foo(void)==NULL)) + bar(); + +Define magic numbers and explain their origin: + + // As taken from RFC 3.14 + #define MAGIC_NUMBER 23 // This goes in foo.h + ptr = malloc (MAGIC_NUMBER); + +Rather than just throwing them about in code: + + ptr = malloc (23); + +It is almost always prefered to use dynamically allocated memory: + + widget_ptr = malloc (WIDGET_SIZE); + +Try to avoid static allocations like the following: + + char widget[WIDGET_SIZE]; + +Try to use unsigned values unless an API requires signed values: + + uint32_t server_time_s; + +Please provide relevant CHANGELOG entries for all changes. +Please remove items from the TODO file as they are completed. +Please provide unittest cases. + +When submitting patches via email, please use `git format-patch` to format +patches: + + git format-patch 9a61fcba9bebc3fa2d91c9f79306bf316c59cbcc + +Email patches with a GnuPG signature whenever possible. + +When applying patches, please use `git am` to apply patches: + + git am -i 0001-add-TODO-item.patch + +If `git format-patch` is not possible, please send a unified diff. + +When in doubt, please consult the Tor HACKING guide: + + https://gitweb.torproject.org/tor.git/blob/HEAD:/doc/HACKING +
tor-commits@lists.torproject.org