@@ -173,9 +173,16 @@ it really only applies to the particular file in which it appears.
173173
174174#### Formatting
175175
176- NEVER alter somebody else's code to reformat just because you found
177- something that violates the rules. Let the group/author/leader know, and
178- resist the temptation to change it yourself.
176+ We use clang-format to enforce formatting rules for the vast majority of the
177+ code base. It is automatically run during CI and is a CI failure if the code
178+ does not conform. There are, however, parts of the code base that are not
179+ clang-formatted, either because we have not yet put them under the
180+ clang-format regime, or because individual modules were deemed to be less
181+ clear with clang-format than with hand formatting.
182+
183+ For non-clang-format regions of code, NEVER alter somebody else's code to
184+ reformat just because you found something that violates the rules. Let the
185+ group/author/leader know, and resist the temptation to change it yourself.
179186
180187Each line of text in your code should be at most 80 characters long.
181188Exceptions are allowed for those rare cases where letting a line be longer
@@ -217,13 +224,10 @@ Function calls should have a space between the function name and the opening
217224parenthesis, NO space inside the parenthesis, except for a single blank
218225space between each argument. For example:
219226
220- x = foo (a, b); // Yes, this is always ok
227+ x = foo(a, b); // Yes
221228
222229 x = foo ( a, b ); // No
223230 x = foo (a,b); // No
224- x = foo(a, b); // No
225- x = foo(a); // Occasionally, this just looks better, when the function name is short,
226- // and there's just one very short argument. What can I say, I do it too.
227231
228232Function declarations: function names should begin at column 0 for a full
229233function definition. (It's ok to violate this rule for very short inline
@@ -233,7 +237,7 @@ functions within class definitions.)
233237Here is a short code fragment that shows some of these rules in action:
234238
235239 static int
236- function (int a, int b)
240+ function(int a, int b)
237241 {
238242 int x = a + b;
239243 if (a == 0 || b == 0) {
@@ -244,7 +248,7 @@ Here is a short code fragment that shows some of these rules in action:
244248 }
245249 for (int i = 0; i < 3; ++i) {
246250 x += a * i;
247- x *= foo (i); // function call
251+ x *= foo(i); // function call
248252 }
249253 return x;
250254 }
0 commit comments