summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2018-08-22 12:31:48 +0530
committerNigel Babu <nigelb@redhat.com>2018-09-12 11:48:34 +0000
commitbe77dbbda692792335a8e9e7c02e0c281f003c40 (patch)
tree4c50b342ebd12452e8938a404e60481dbab47118 /doc
parentbc4201b4c23eee0e3d09a6760b449a0011677cd5 (diff)
clang-format: add the config file
Also update the required documents and scripts to enable clang-format Change-Id: I73aae6db06c2f732a1779d59a73bc05e28beafba updates: bz#1564149 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/developer-guide/coding-standard.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/developer-guide/coding-standard.md b/doc/developer-guide/coding-standard.md
index 9bc15a5cc15..7c1beddc2d5 100644
--- a/doc/developer-guide/coding-standard.md
+++ b/doc/developer-guide/coding-standard.md
@@ -1,6 +1,30 @@
GlusterFS Coding Standards
==========================
+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
+
+
+
Structure definitions should have a comment per member
------------------------------------------------------