Whamcloud - gitweb
LU-5996 tests: check spaces and tabs in .sh files 76/12976/2
authorJian Yu <jian.yu@intel.com>
Sat, 6 Dec 2014 07:16:37 +0000 (23:16 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 9 Dec 2014 00:42:09 +0000 (00:42 +0000)
This patch fixes checkpatch.pl script to check the following
coding style rules in .sh files:
- code indent should use tabs where possible
- no space before tabs
- no spaces at the start of a line

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: I71821d2d15ca218528fcd8fb37119d0e0798027a
Reviewed-on: http://review.whamcloud.com/12976
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
contrib/scripts/checkpatch.pl

index f701b20..6f24be5 100755 (executable)
@@ -1841,8 +1841,9 @@ sub process {
                        }
                }
 
-# check we are in a valid source file C or perl if not then ignore this hunk
-               next if ($realfile !~ /\.(h|c|pl)$/);
+# check we are in a valid source file C, perl or bash script
+# if not then ignore this hunk
+               next if ($realfile !~ /\.(h|c|pl|sh)$/);
 
 # at the beginning of a line any tabs must come first and anything
 # more than 8 must use tabs.