We would like to poll the community on some proposed additions to the PBS Pro coding standards located here: https://pbspro.atlassian.net/wiki/spaces/DG/pages/5537826/Coding+Standards
Please post a reply if you find any of the following proposed updates unacceptable.
Do not attempt to align variable names or types with whitespace when declaring multiple variables. Use a single space between variable names and types.
Do this:
int foo;
char *bar;
Not this:
int foo;
char *bar;
Place one space on either side of the ‘=’ when assigning variable values. This includes variables initialized in “for” loops. This should also be done for operations including ‘+’, ‘*’, ‘<’, ‘>’, etc. Do not use spaces between increment/decrement operators or pointer operations such as ‘*’, ‘&’ and ‘->’.
Do this:
foo = 0;
for (bar = 0; bar < 100; bar++) {}
Not this:
foo=0;
for (bar=0; bar<100; bar++) {}