[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] CONTRIBUTING.md: Add some style guidelines (#350)

Fabio Niephaus notifications at github.com
Sun Jan 6 07:59:49 UTC 2019


fniephaus commented on this pull request.



> @@ -212,3 +212,30 @@ If you were working on a feature branch, do this:
 
 If your feature branch is ready or you are an external contributor with your own
 fork, use the github web interface to open a pull request.
+
+
+# C Source Code Formatting
+
+When editing an existing file, please be polite and first follow the 
+guidelines below, and secondly follow the general rule of keeping to the 
+same formatting conventions as exist in the file.
+
+
+## C Function Declarations
+
+C function declarations should have the type on one line and the 
+function name and parameters on the following line, e.g.:
+
+```

Adding a *c* to the end of this line should enable C-syntax highlight.

> +
+C function declarations should have the type on one line and the 
+function name and parameters on the following line, e.g.:
+
+```
+static int 
+convertCopy(char *from, int fromLen, char *to, int toLen, int term)
+```
+
+This facilitates searching for function definitions by searching for the 
+name at the beginning of the line.
+
+
+## Tabs are 4 spaces
+
+The heading says it all.

I'm afraid the title doesn't answer the question *when to use* spaces/tabs? Are tabs banned?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/350#pullrequestreview-189619439
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190105/02dc7218/attachment.html>


More information about the Vm-dev mailing list