Skip to content

Commit 7e9ddad

Browse files
committed
Docs: Some minor updates to CONTRIBUTIONS and INSTALL docs (#1582)
Signed-off-by: Larry Gritz <[email protected]>
1 parent 0cdf072 commit 7e9ddad

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

180187
Each line of text in your code should be at most 80 characters long.
181188
Exceptions 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
217224
parenthesis, NO space inside the parenthesis, except for a single blank
218225
space 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

228232
Function declarations: function names should begin at column 0 for a full
229233
function definition. (It's ok to violate this rule for very short inline
@@ -233,7 +237,7 @@ functions within class definitions.)
233237
Here 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
}

INSTALL.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,14 @@ Here are the steps to check out, build, and test the OSL distribution:
9898
full errors, not warnings.
9999

100100
4. After compilation, you'll end up with a full OSL distribution in
101-
dist/ARCH, where ARCH is the architecture you are building on, one of
102-
"linux", "linux64", "macosx", "windows", or "windows64".
101+
dist/
103102

104-
Note: The default is to make an optimized "release" build. If
105-
instead type 'make debug' at the top level, you will end up with
106-
a debug build (no optimization, full symbols) in "dist/ARCH.debug".
107-
108-
5. Add the "dist/ARCH/bin" to your $PATH, and "dist/ARCH/lib" to your
109-
$LD_LIBRAY_PATH (or $DYLD_LIBRARY_PATH on OS X), or copy the contents
103+
5. Add the "dist/bin" to your $PATH, and "dist/lib" to your
104+
$LD_LIBRAY_PATH (or $DYLD_LIBRARY_PATH on MacOS), or copy the contents
110105
of those files to appropriate directories. Public include files
111106
(those needed when building applications that incorporate OSL)
112-
can be found in "dist/ARCH/include", and documentation can be found
113-
in "dist/ARCH/share/doc".
107+
can be found in "dist/include", and documentation can be found
108+
in "dist/share/doc".
114109

115110
6. After building (and setting your library path), you can run the
116111
test suite with:

0 commit comments

Comments
 (0)