summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-07 17:34:31 +0000
committerivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-07 17:34:31 +0000
commit78443eecf294bcda485e2a80c59d072fe05adcec (patch)
treecb58a2b58e5268937d2d23fd6c10a05cbcb9695f /TOOLS
parentc6baa53b12583d5ef2aabcbfeec06177ed038203 (diff)
downloadmpv-78443eecf294bcda485e2a80c59d072fe05adcec.tar.bz2
mpv-78443eecf294bcda485e2a80c59d072fe05adcec.tar.xz
test for tab characters
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23253 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/checktree.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/TOOLS/checktree.sh b/TOOLS/checktree.sh
index d03232bcd7..2357871c03 100755
--- a/TOOLS/checktree.sh
+++ b/TOOLS/checktree.sh
@@ -19,6 +19,7 @@
_spaces=yes
_extensions=yes
_crlf=yes
+_tabs=no
_trailws=no
_rcsid=no
_oll=no
@@ -45,6 +46,7 @@ enable_all_tests() {
_spaces=yes
_extensions=yes
_crlf=yes
+ _tabs=yes
_trailws=yes
_rcsid=yes
_oll=yes
@@ -56,6 +58,7 @@ disable_all_tests() {
_spaces=no
_extensions=no
_crlf=no
+ _tabs=no
_trailws=no
_rcsid=no
_oll=no
@@ -96,6 +99,7 @@ for i in "$@"; do
printoption "spaces " "test for spaces in filenames" "$_spaces"
printoption "extensions" "test for uppercase extensions" "$_extensions"
printoption "crlf " "test for MSDOS line endings" "$_crlf"
+ printoption "tabs " "test for tab characters" "$_tabs"
printoption "trailws " "test for trailing whitespace" "$_trailws"
printoption "rcsid " "test for missing RCS Id's" "$_rcsid"
printoption "oll " "test for overly long lines" "$_oll"
@@ -170,6 +174,12 @@ for i in "$@"; do
-nocrlf)
_crlf=no
;;
+ -tabs)
+ _tabs=yes
+ ;;
+ -notabs)
+ _tabs=no
+ ;;
-trailws)
_trailws=yes
;;
@@ -259,6 +269,14 @@ fi
# -----------------------------------------------------------------------------
+if [ "$_tabs" = "yes" ]; then
+ printhead "checking for TAB characters ..."
+ TAB=`echo " " | tr ' ' '\011'`
+ grep $_grepopts "$TAB" $filelist
+fi
+
+# -----------------------------------------------------------------------------
+
if [ "$_trailws" = "yes" ]; then
printhead "checking for trailing whitespace ..."
grep $_grepopts "[[:space:]]\+$" $filelist