From 2eaf8e846afd71c30f2a6ff6f863a39b1145b8b6 Mon Sep 17 00:00:00 2001 From: kshithijiyer Date: Wed, 5 Jun 2019 19:40:29 +0530 Subject: Fixing formatting errors in markdown files There are a lot of fromatting error is markdown files peresent under /doc directiory of the project. Fixing formatting errors and sending a patch. Fixes: bz#1718273 Change-Id: I08f938088bbaaafddf634f73616ea0dbfe7aedf3 Signed-off-by: kshithijiyer --- doc/developer-guide/coding-standard.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'doc/developer-guide/coding-standard.md') diff --git a/doc/developer-guide/coding-standard.md b/doc/developer-guide/coding-standard.md index a8aa49cc2da..031c6c0da99 100644 --- a/doc/developer-guide/coding-standard.md +++ b/doc/developer-guide/coding-standard.md @@ -6,23 +6,23 @@ Before you get started Before starting with other part of coding standard, install `clang-format` On Fedora: - +``` $ dnf install clang - +``` On debian/Ubuntu: - +``` $ apt-get install clang - +``` Once you are done with all the local changes, you need to run below set of commands, before submitting the patch for review. - - $ git add $file # if any - $ git commit -a -s -m "commit message" - $ git show --pretty="format:" --name-only | grep -v "contrib/" | egrep "*\.[ch]$" | xargs clang-format -i - $ git diff # see if there are any changes - $ git commit -a --amend # get the format changes done - $ ./submit-for-review.sh - +``` +$ git add $file # if any +$ git commit -a -s -m "commit message" +$ git show --pretty="format:" --name-only | grep -v "contrib/" | egrep "*\.[ch]$" | xargs clang-format -i +$ git diff # see if there are any changes +$ git commit -a --amend # get the format changes done +$ ./submit-for-review.sh +``` Structure definitions should have a comment per member @@ -620,8 +620,8 @@ If a value isn't supposed/expected to change, there's no cost to adding a ### Avoid global variables (including 'static' auto variables) Almost all state in Gluster is contextual and should be contained in the -appropriate structure reflecting its scope (e.g. call\_frame\_t, call\_stack\_t, -xlator\_t, glusterfs\_ctx\_t). With dynamic loading and graph switches in play, +appropriate structure reflecting its scope (e.g. `call\_frame\_t`, `call\_stack\_t`, +`xlator\_t`, `glusterfs\_ctx\_t`). With dynamic loading and graph switches in play, each global requires careful consideration of when it should be initialized or reinitialized, when it might _accidentally_ be reinitialized, when its value might become stale, and so on. A few global variables are needed to serve as -- cgit