diff options
| author | Ethan Galstad <egalstad@users.sourceforge.net> | 2002-02-28 06:42:51 +0000 |
|---|---|---|
| committer | Ethan Galstad <egalstad@users.sourceforge.net> | 2002-02-28 06:42:51 +0000 |
| commit | 44a321cb8a42d6c0ea2d96a1086a17f2134c89cc (patch) | |
| tree | a1a4d9f7b92412a17ab08f34f04eec45433048b7 /CODING | |
| parent | 54fd5d7022ff2d6a59bc52b8869182f3fc77a058 (diff) | |
| download | monitoring-plugins-44a321cb8a42d6c0ea2d96a1086a17f2134c89cc.tar.gz | |
Initial revision
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'CODING')
| -rw-r--r-- | CODING | 38 |
1 files changed, 38 insertions, 0 deletions
| @@ -0,0 +1,38 @@ | |||
| 1 | The following guidelines are intended to aid programmers in creating | ||
| 2 | code that is consistent with the existing core plugins. | ||
| 3 | |||
| 4 | The primary goals of these standards are internal consistency, and | ||
| 5 | readability in a wide range of environments. | ||
| 6 | |||
| 7 | 1. C Language Programming | ||
| 8 | |||
| 9 | All code should comply with the requirements of the Free Software | ||
| 10 | Foundation Coding standards (which are currently available at | ||
| 11 | http://www.gnu.org/prep/standards_toc.html). We also follow most of | ||
| 12 | the FSF guidelines. Developers may suggest deviations from the FSF | ||
| 13 | style recommendations, which will be considered by open discussion on | ||
| 14 | the netsaintplug-devel mailing list. Any such deviations will apply to | ||
| 15 | the entire code base to ensure consistency. | ||
| 16 | |||
| 17 | Currently, the exceptions to FSF recommendatios are roughly equivalent | ||
| 18 | to GNU indent with invoked as 'indent -ts 2 -br'. Specifically, the | ||
| 19 | exceptions are as follows: | ||
| 20 | |||
| 21 | a) leading white space for a statement should be formatted as tabs, | ||
| 22 | with one tab for each code indentation level. | ||
| 23 | |||
| 24 | b) in statement continuation lines, format whitespace up to the column | ||
| 25 | starting the statement as tabs, format the rest as spaces (this | ||
| 26 | results in code that is legible regardless of tab-width setting). | ||
| 27 | |||
| 28 | c) with the exception of the above, tabs should generally be avoided | ||
| 29 | |||
| 30 | d) when tab width is 2 spaces, line-length should not exceed 80 | ||
| 31 | characters | ||
| 32 | |||
| 33 | e) The opening brace of an if or while block is on the same line as | ||
| 34 | the end of the conditional expression (the '-br' option). | ||
| 35 | |||
| 36 | 2. Perl Language Programming | ||
| 37 | |||
| 38 | <To Be Written> | ||
