فهرست منبع

do not use tabs for indent (backport of https://trac.osgeo.org/grass/changeset/64658)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@65036 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 10 سال پیش
والد
کامیت
5723533017
1فایلهای تغییر یافته به همراه16 افزوده شده و 2 حذف شده
  1. 16 2
      tools/grass_indent.sh

+ 16 - 2
tools/grass_indent.sh

@@ -1,6 +1,20 @@
 #!/bin/sh
 #!/bin/sh
 
 
-# Indent source code according to GRASS SUBMITTING rules
+# Indent source code according to GRASS GIS submitting rules
+
+# Should be in sync with:
+#     https://trac.osgeo.org/grass/wiki/Submitting/C
+#     http://grasswiki.osgeo.org/wiki/Development#Explanation_of_C_indentation_rules
+
+# Dependencies:
+#     indent
+
+# Changes and their reasons:
+#    -ts8 -ut -> --no-tabs
+#        Do not use 8 space wide tabs when indent level is 4
+
+# TODO: replace short flags by long ones to improve readability
+
 
 
 if [ $# -lt 1 ] ; then
 if [ $# -lt 1 ] ; then
  echo "No files specified (give file name(s) as parameter)"
  echo "No files specified (give file name(s) as parameter)"
@@ -8,7 +22,7 @@ if [ $# -lt 1 ] ; then
 else
 else
  indent -npro -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \
  indent -npro -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \
       -nbbo -nbc -nbfda -nbfde -ncdb -ncdw -nce -nfca -npcs -nprs \
       -nbbo -nbc -nbfda -nbfde -ncdb -ncdw -nce -nfca -npcs -nprs \
-      -npsl -nsc -nsob -saf -sai -saw -sbi0 -ss -ts8 -ut "$@"
+      -npsl -nsc -nsob -saf -sai -saw -sbi0 -ss --no-tabs "$@"
 
 
  # fix broken gettext macros:
  # fix broken gettext macros:
  grep -l '\<_$' "$@" | \
  grep -l '\<_$' "$@" | \