/[hyperestraier]/upstream/0.5.1/lab/tabcheck
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /upstream/0.5.1/lab/tabcheck

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (hide annotations)
Fri Jul 29 21:56:53 2005 UTC (18 years, 10 months ago) by dpavlin
File size: 773 byte(s)
import of HyperEstraier 0.5.1

1 dpavlin 2 #! /bin/sh
2    
3     #================================================================
4     # tabcheck
5     # Find files including dispensable tab and space characters
6     #================================================================
7    
8    
9     # set variables
10     LANG=C ; export LANG
11     LC_ALL=C ; export LC_ALL
12     regex='(\.h|\.c|\.cc|\.cpp|\.cxx|\.java|\.pl|\.pm|\.pod|\.rb|\.rd)$'
13     tabcode=`printf '\t'`
14    
15    
16     # find tab
17     find . -type f | egrep $regex |
18     while read file
19     do
20     printf 'Checking %s ... ' $file
21     err=0
22     if grep "$tabcode" $file > /dev/null
23     then
24     printf '### !!! TAB FOUND !!! ###'
25     err=1
26     fi
27     if grep ' $' $file > /dev/null
28     then
29     printf '### !!! TAILING SPACE FOUND !!! ###'
30     err=1
31     fi
32     [ "$err" = 0 ] && printf 'ok'
33     printf '\n'
34     done
35    
36    
37     # exit normally
38     exit 0
39    
40    
41    
42     # END OF FILE

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26