Blame doc/opensm-coding-style.txt

Packit 13e616
This short (hopefully) memo is about to define the coding style
Packit 13e616
recommended for OpenSM development.
Packit 13e616
Packit 13e616
The goal of this is to make OpenSM code base to be standard in terms of
Packit 13e616
the rest of OpenIB management software, OpenIB projects and Linux in
Packit 13e616
general. And in this way to make OpenSM more developer friendly and to
Packit 13e616
involve more open source programmers to be part of OpenSM development
Packit 13e616
process.
Packit 13e616
Packit 13e616
The goal of this is not to provide long and boring list of coding style
Packit 13e616
paradigms, but rather to define general coding style concept and to
Packit 13e616
suggest a way for such a concept to be implemented in the existing
Packit 13e616
OpenSM code base.
Packit 13e616
Packit 13e616
The OpenSM project is an OpenIB and Linux centric project, so we think
Packit 13e616
it is reasonable to use the coding style most popular with OpenIB
Packit 13e616
projects (linux/Documentation/CodingStyle) as the starting point rather
Packit 13e616
than reinventing one more coding style rule-set.
Packit 13e616
Packit 13e616
Some things from there in short: tab character for indentation and space
Packit 13e616
character for alignment, K&R style braces, short local and meanful
Packit 13e616
global names, please no confused Hungary style, short functions. And of
Packit 13e616
course to be reasonable about all above.
Packit 13e616
Packit 13e616
Packit 13e616
Some ideas about existing OpenSM code improvements in terms of the
Packit 13e616
Coding style:
Packit 13e616
Packit 13e616
* When writing new code, please try to follow the new Coding style.
Packit 13e616
* Coding style improvement patches are desired and accepted, but please
Packit 13e616
  try to not mix coding style improvement with functional and other
Packit 13e616
  changes in one patch.
Packit 13e616
* When you are going to improve coding style for existing code, please
Packit 13e616
  try to do it for entire file(s).