CODING 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. The following guidelines are intended to aid programmers in creating
  2. code that is consistent with the existing core plugins.
  3. The primary goals of these standards are internal consistency, and
  4. readability in a wide range of environments.
  5. 1. C Language Programming
  6. All code should comply with the requirements of the Free Software
  7. Foundation Coding standards (which are currently available at
  8. http://www.gnu.org/prep/standards_toc.html). We also follow most of
  9. the FSF guidelines. Developers may suggest deviations from the FSF
  10. style recommendations, which will be considered by open discussion on
  11. the nagiosplug-devel mailing list. Any such deviations will apply to
  12. the entire code base to ensure consistency.
  13. Currently, the exceptions to FSF recommendations are roughly equivalent
  14. to GNU indent with invoked as 'indent -ts 2 -br'. Specifically, the
  15. exceptions are as follows:
  16. a) leading white space for a statement should be formatted as tabs,
  17. with one tab for each code indentation level.
  18. b) in statement continuation lines, format whitespace up to the column
  19. starting the statement as tabs, format the rest as spaces (this
  20. results in code that is legible regardless of tab-width setting).
  21. c) with the exception of the above, tabs should generally be avoided
  22. d) when tab width is 2 spaces, line-length should not exceed 80
  23. characters
  24. e) The opening brace of an if or while block is on the same line as
  25. the end of the conditional expression (the '-br' option).
  26. 2. Perl Language Programming
  27. <To Be Written>