From 22672293c96b45e78b9ca646833ee1817cec65bc Mon Sep 17 00:00:00 2001 From: AlistairGrant Date: Mon, 28 Jan 2019 18:30:17 +0100 Subject: [PATCH] CONTRIBUTING.md: formatting guidelines - Enable C syntax highlightin in the example - Update tabs recommendation (keep existing styles, move to tab stop of 4 spaces) Thanks to @fniephaus and @nicolas-cellier-aka-nice for their feedback. --- CONTRIBUTING.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f84e478dbc..47bd7d283f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -226,7 +226,7 @@ same formatting conventions as exist in the file. C function declarations should have the type on one line and the function name and parameters on the following line, e.g.: -``` +```c static int convertCopy(char *from, int fromLen, char *to, int toLen, int term) ``` @@ -235,7 +235,10 @@ This facilitates searching for function definitions by searching for the name at the beginning of the line. -## Tabs are 4 spaces +## Tab stops are 4 spaces + +In this case the first rule is to keep the existing formatting within a +file - we don't want to polute the code history with space changes. -The heading says it all. +The goal is to use tabs set to 4 spaces.