OpenPBS's C++ Coding Standards

Hi everyone

Due to the conversion of the scheduler to C++, we would like to conform to some Coding Standards, like we have for C and Python.

The proposed standards are here.


@vstumpf I have one comment and one question for “Brace Style”:

Comment: In single line if-else, we have “good” (where we keep brace) and “Also good” (where we don’t keep brace). I would suggest keep only one of them not both. As keeping both in standards creates lots of questions and confusion during code review. Also keeping both, will have mix style for single line if-else in code as some developers likes to keep them and some (like me :slight_smile:) don’t.

About function definition: As per current standards we use below format, are you proposing change in that? If yes then any reason to do that?

add(int x, int y)

You bring up a good point, since we already have a C standard, and we still have C code, we should follow that standard as much as possible.

I’ve removed the conflicting standards to only include C++ specific changes.

Thanks @vstumpf, now its look good.