Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2610 → Rev 2801

/trunk/sctools/testingscripts/qstringempty.sh
0,0 → 1,16
#!/bin/sh
##
# Name: Empty char* comparison
# Description: Finds usage where a QString is compared to "" where using .isEmpty() should be used because it is much faster.
# ToResolve: Change code to use string.isEmpty() In the event that it is a std::string change to empty()
# Author: Benjamin Meyer <ben + kdetest at meyerhome dot net>
##
 
for file in `find . -name '*.cpp' -o -name '*.cc'` ; do
awk '{gsub(/[\t]/, " ", $0); } /==[ ]*""/||/""[ ]*==/||/!=[ ]*""/||/""[ ]*!=/ { print NR":" $0; num++ } END { if (num > 0) exit 1 } ' $file
if [ $? == 1 ] ; then
echo $file;
echo
fi;
done
 
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/thispointer.sh
===================================================================
--- testingscripts/thispointer.sh (nonexistent)
+++ testingscripts/thispointer.sh (revision 2801)
@@ -0,0 +1,28 @@
+#!/bin/sh
+##
+# Name: Finds this-> constructs
+# Description: Finds classes that use this-> that aren't templates.
+# ToResolve: When it isn't a (see <a href="http://www.parashift.com/c++-faq-lite/containers-and-templates.html#faq-34.17">template-derived-class</a>), simply remove "this->"
+# Author: Benjamin Meyer < ben + kdetest at meyerhome dot net >
+##
+
+for file in `find . -name \*.cpp | grep -v kresources/groupwise/soap` ; do
+ awk '/\ this->/ {
+ # Store line
+ ln=$0;
+ # Strip whitespace
+ gsub(/[ ]|[\t]*|;/, "", $0);
+ # Strip this->
+ $0=substr($0,7);
+ split($0,vars,"=");
+ if(vars[1] != vars[2]) {
+ print NR":" ln;
+ exit 1;
+ }
+ }' $file
+
+ if [ $? = 1 ] ; then
+ echo "Possible warning in: $file"
+ echo
+ fi
+done
/testingscripts/thispointer.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/noifbody.sh
===================================================================
--- testingscripts/noifbody.sh (nonexistent)
+++ testingscripts/noifbody.sh (revision 2801)
@@ -0,0 +1,29 @@
+#!/bin/sh
+##
+# Name: No if body
+# Description: Finds if and while statements that have no body or the body is never called because there is a \";\"
+# ToResolve: Either give an empty body {} or fix the bug.
+# Author: Benjamin Meyer <ben + kdetest at meyerhome dot net>
+##
+
+for file in `find $1 -name '*.cpp' -o -name '*.cc'` ; do
+ egrep -n '\bif\([^)]*\);' $file
+ if [ $? == 0 ] ; then
+ echo "\";\" at end of line in: $file"
+ echo
+ fi
+ # for is hard to detect, lots of edge cases
+ #egrep -n '\bfor\([^)]*\);' $file | egrep '\);$'
+ #egrep '\bfor\([^)]*\);^' $file
+
+ error=`egrep -n '\bwhile\([^)]*\);' $file`
+ if [ $? == 0 ] ; then
+ grep "do" $file >> /dev/null
+ if [ $? == 1 ] ; then
+ echo $error
+ echo "\";\" at end of line in while: $file"
+ echo
+ fi
+ fi
+done
+
/testingscripts/noifbody.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/cstringlength.sh
===================================================================
--- testingscripts/cstringlength.sh (nonexistent)
+++ testingscripts/cstringlength.sh (revision 2801)
@@ -0,0 +1,35 @@
+#!/bin/sh
+##
+# Name: Q<b>C</b>String length cache
+# Description: QCString::length() calls strlen on each invocation so it should never be called in a loop. <a href="http://developer.kde.org/documentation/other/mistakes.html">See here for more details</a>
+# ToResolve: Move length calculation outside of loop. NOTE: this script isn't the most advanced and if a QString and QCString vars are named the same in the same file it will confuse them. <b>QString</b>.length() in a loop is ok. Watch out for cases were the string is modified within the loop.
+# Author: Benjamin Meyer <ben + kdetest at meyerhome dot net>
+##
+
+for file in `find . -name '*.cpp' -o -name '*.cc'` ; do
+ found=false
+ for var in `grep 'QCString ' $file | sed -e s/.*QC//g | sed -e s/\&//g | awk '{print $2}'` ; do
+ var=`echo $var | sed -e s/\=.*//g | sed -e s/,.*//g | sed -e s/\(.*//g | sed -e s/\;.*//g | sed -e s/\).*//g`
+ if [ -z "${var}" ] ; then
+ continue;
+ fi
+ var=`echo $var | sed -e s/\\\]/\\\\\\\]/g | sed -e s/\\\[/\\\\\\\[/g`
+ error=`grep -n "${var}.length\(\)" $file | grep "for[\ ]*("`
+
+ if [ $? = 0 ] ; then
+ grep -n "${var}.length().*;.*;.*)" $file >> /dev/null
+ if [ $? = 0 ] ; then
+ echo "ignore if length is not in the middle?: $error" >> /dev/null
+ else
+ echo "$error" | sed -e s/\</"\&"lt\;/g | sed -e s/\>/"\&"gt\;/g
+ found=true
+ fi
+ fi
+
+ done
+ if [ $found == true ] ; then
+ echo "Possible warning in: $file"
+ echo
+ fi
+done
+
/testingscripts/cstringlength.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/startswith.sh
===================================================================
--- testingscripts/startswith.sh (nonexistent)
+++ testingscripts/startswith.sh (revision 2801)
@@ -0,0 +1,16 @@
+#!/bin/sh
+##
+# Name: startsWith
+# Description: Although techniqly 's.mid(0, 3) == "Foo"' is faster then 's.startsWith("Foo")' (by ~10 asm instructions) startsWith should be used to avoid bugs like: s.mid(0, 4) ==
+#"Foo".
+# ToResolve: Convert.
+# Author: Benjamin Meyer [ben + kdetesting at meyerhome dot net ]
+##
+
+for file in `find . -name '*.cpp' -o -name '*.cc'` ; do
+ awk '/.mid\(0.*=.*".*"/ { print NR":" $0; found=1;} END { if ( found==1 ) exit 0; else exit 1; }' $file
+ if [ $? = 0 ] ; then
+ echo "Found in : $file"
+ echo
+ fi
+done
/testingscripts/startswith.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/true.sh
===================================================================
--- testingscripts/true.sh (nonexistent)
+++ testingscripts/true.sh (revision 2801)
@@ -0,0 +1,27 @@
+#!/bin/sh
+##
+# Name: TRUE, FALSE
+# Description: TRUE and FALSE aren't really valid C++ bool names.
+# ToResolve: Change TRUE to true and FALSE to false.
+# Author: Benjamin Meyer [ben at meyerhome dot net ]
+##
+
+for file in `find . -name '*.cpp' -o -name '*.cc'` ; do
+ echo $file | grep test >> /dev/null
+ if [ $? -eq 0 ] ; then
+ continue;
+ fi
+
+ grep generated $file >> /dev/null
+ if [ $? -eq 0 ] ; then
+ continue;
+ fi
+
+
+ awk '/TRUE/||/FALSE/ { print NR":" $0; found=1;} END { if ( found==1 ) exit 0; else exit 1; }' $file
+ if [ $? = 0 ] ; then
+ echo "Inproper C++ bool in: $file"
+ echo
+ fi
+done
+
/testingscripts/true.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/qptrlist.sh
===================================================================
--- testingscripts/qptrlist.sh (nonexistent)
+++ testingscripts/qptrlist.sh (revision 2801)
@@ -0,0 +1,21 @@
+#!/bin/sh
+##
+# Name: Returning QPtrList
+# Description: QPtrList's are not implicitly shared so returning them will copy the full QPtrList by iterating over all of its elements and inserting them in the newly created
+#QPtrList which is very slow.
+# ToResolve: change to use QValueList.
+# Author: Benjamin Meyer <ben + kdetest at meyerhome dot net>
+##
+if [ ! -z `echo $PWD | grep kdelibs` ] ; then
+ echo "Skipping kdelibs till HEAD is for 4.0";
+ exit -1;
+fi
+
+for file in `find $1 -name \*.h` ; do
+ awk '{gsub(/([\t])|(virtual)/, " ", $0);} /^[ ]*QPtrList[ ]*\(/ {print $0}' $file
+ if [ $? == 1 ] ; then
+ echo "$file"
+ echo
+ fi
+done
+
/testingscripts/qptrlist.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/qstringnull.sh
===================================================================
--- testingscripts/qstringnull.sh (nonexistent)
+++ testingscripts/qstringnull.sh (revision 2801)
@@ -0,0 +1,16 @@
+#!/bin/sh
+##
+# Name: QString::null == calls
+# Description: Finds cases where QString foo == QString::null is used when foo.isNull() should be used because it is much faster.
+# ToResolve: Change code to use string.isNull()
+# Author: Benjamin Meyer <ben + kdetest at meyerhome dot net>
+##
+
+for file in `find . -name '*.cpp' -o -name '*.cc'` ; do
+ awk '{gsub(/[ ]/||/[\t]/, "", $0); } /QString::null==/||/==QString::null/||/QString::null!=/||/!=QString::null/ { print $0; num++ } END { if (num > 0) exit 1 } ' $file
+ if [ $? == 1 ] ; then
+ echo $file;
+ echo
+ fi;
+done
+
/testingscripts/qstringnull.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/donot.sh
===================================================================
--- testingscripts/donot.sh (nonexistent)
+++ testingscripts/donot.sh (revision 2801)
@@ -0,0 +1,38 @@
+#!/bin/sh
+##
+# Name: don't
+# Description: Finds abbreviation's in strings in the code.
+# ToResolve: Change "don't" to "do not" etc
+# Author: Benjamin Meyer [ben + kdetest at meyerhome dot net]
+##
+
+for file in `find . -name '*.cpp' -o -name '*.cc' -o -name '*.c' -o -name '*.h' -o -name '*.cxx' -o -name '*.py' -o -name '*.docbook'` ; do
+ # C++ comment
+ grep "\/\/" $file >> /dev/null
+ if [ $? = 1 ] ; then
+
+ # C comment
+ grep "\/\*" $file >> /dev/null
+ if [ $? = 1 ] ; then
+
+ # Shell comment
+ grep "#" $file >> /dev/null
+ if [ $? = 1 ] ; then
+
+ # Docbook comment
+ grep "<!--" $file >> /dev/null
+ if [ $? = 1 ] ; then
+
+ grep -e "\(don't\|havn't\|won't\|we'll\|doesn't\|can't\)" $file
+ #grep -e "\(don't\|doesn't\)" $file
+ if [ $? = 0 ] ; then
+ echo "Possible warning in: $file"
+ echo
+ fi
+
+ fi
+ fi
+ fi
+ fi
+done
+
/testingscripts/donot.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/homedircheck.sh
===================================================================
--- testingscripts/homedircheck.sh (nonexistent)
+++ testingscripts/homedircheck.sh (revision 2801)
@@ -0,0 +1,30 @@
+#!/bin/sh
+##
+# Name: Unix home
+# Description: When and only when refering to the users home directory QDir::homeDirPath is prefered to \"~\"
+# Author: Benjamin Meyer <ben + kdetest at meyerhome dot net>
+# ToResolve: Change \"~\" to QDir::homeDirPath().
+##
+
+#source generatereport testpaths
+
+check() {
+ if [ ! -d "${KDESOURCE}/${1}" ] ; then
+ return;
+ fi
+
+ echo "Checking: $1";
+ cd "${KDESOURCE}/${1}"
+ for file in `find . -name '*.cpp' -o -name '*.cc'` ; do
+ grep "\".*~.*\"" $file | grep -v "http" | grep -v "kdDebug" | grep -v "URL" | grep -v "QDir::homeDirPath" | grep -v "debug" | grep -v "#"
+ if [ $? -eq 0 ] ;then
+ echo "Warning: <b>IF</b> refering to the home directory change: $file"
+ echo ""
+ fi
+ done
+}
+
+for module in $KDEMODULES ; do
+ check $module
+done
+
/testingscripts/homedircheck.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/postincrement.sh
===================================================================
--- testingscripts/postincrement.sh (nonexistent)
+++ testingscripts/postincrement.sh (revision 2801)
@@ -0,0 +1,17 @@
+#!/bin/sh
+##
+# Name: Post-increment operators on iterators
+# Description: Prefer to use pre-increment over post-increment operators on iterators. It avoids creating an unnecessary temporary object.
+# ToResolve: Change to ++iterator. Note: use a const iterator and caching the end() will produce loops significatly faster. For example: const QStringList::const_iterator cend = list.constEnd(); for ( QStringList::const_iterator it = list.begin(); it != cend; ++it ) { }
+# Author: Benjamin Meyer <ben + kdetest at meyerhome dot net>
+##
+
+# TODO add check for i--
+
+for file in `find . -name '*.cpp' -o -name '*.cc'` ; do
+ awk '{gsub(/[ ]/||/[\t]/, "", $0); } /(for[\ ]*\(.*\++[\ ]*\))/&&/begin/ { print NR":" $0; num++ } END { if (num > 0) exit 1 } ' $file
+ if [ $? == 1 ] ; then
+ echo $file;
+ echo
+ fi;
+done
/testingscripts/postincrement.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/deleteprivate.sh
===================================================================
--- testingscripts/deleteprivate.sh (nonexistent)
+++ testingscripts/deleteprivate.sh (revision 2801)
@@ -0,0 +1,19 @@
+#!/bin/sh
+##
+# Name: Delete Private
+# Description: When a private class is used (and created in the constructor) it needs to be deleted in the destructor.
+# ToResolve: Delete private class in the destructor. See <a href="http://developer.kde.org/documentation/library/kdeqt/kde3arch/devel-binarycompatibility.html">Using a d-Pointer (see last paragraph on the page)</a>. NOTE: If you fix any memory leaks in HEAD make sure it is backported to the current stable branch.
+# Author: Benjamin Meyer <ben + kdetest at meyerhome dot net>
+##
+
+for file in `find . -name '*.cpp' -o -name '*.cc' | grep -v libkdenetwork/gpgmepp` ; do
+ awk '{gsub(/[ ]/||/[\t]/, "", $0); } /^d=new.*Private/ { exit 1 } ' $file
+ if [ $? -eq 1 ] ;then
+ awk '{gsub(/[ ]/||/[\t]/, "", $0); } /deleted/ { exit 1 } ' $file
+ if [ ! $? -eq 1 ] ;then
+ echo "Warning the private variable \"d\" might never be deleted in: $file"
+ echo
+ fi
+ fi
+done
+
/testingscripts/deleteprivate.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/constqstring.sh
===================================================================
--- testingscripts/constqstring.sh (nonexistent)
+++ testingscripts/constqstring.sh (revision 2801)
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+##
+# Name: const QString &
+# Description: Finds functions that don't pass a Qt item using a const reference. This is slower and makes bigger binaries.
+# ToResolve: Change to use "const class &" (Note: Don't change libs until 4.0! It breaks binary compatiblity!). Note that in some cases you can't just change the function header, but have to massage the code a little. If you change a slot don't forget to change the connect() as it wont break compile, but it will break at runtime.
+# Author: Benjamin Meyer <ben + kdetest at meyerhome dot net>
+##
+
+if [ ! -z `echo $PWD | grep kdelibs` ] ; then
+ echo "Skipping kdelibs till HEAD is for 4.0";
+ exit -1;
+fi
+
+a="(.*QString .*)"
+b="QString[ ]*\*"
+c="QString[ ]*&"
+d="QString::"
+e="QString"
+for item in QCString QStringList QColor QImage QPixmap QByteArray QPoint QSize QBitmap QTime QDate QPen QIconSet QPalette; do
+ a="$a\|(.*$item .*)"
+ b="$b\|$item[ ]*\*"
+ c="$c\|$item[ ]*&"
+ d="$d\|$item::"
+ e="$e\|$item"
+done
+export e
+
+for file in `find $1 -name \*.h` ; do
+ # Skip DCOP stuff sense it can't be const?
+ grep DCOP $file >> /dev/null
+ if [ $? -eq 0 ] ; then
+ continue;
+ fi
+
+ # Will miss for void processDirectory(QCString *received, const QString &host, QString path);
+ grep -n "$a" $file | grep -v "$b" | grep -v "$c" | grep -v "$d" | grep -v "const" | grep -v "Q_PROPERTY" | sed -e s/virtual//g | sed -e s/static//g | awk '{
+ gsub(/[\t]/, "", $0);
+ ln=$0
+ gsub(/[ ]/||/[\t]/, "", ln);
+ substr(ln,1,7);
+ if(ln != $e && substr(ln,0,1) != "*") {
+ print $0
+ found++;
+ }
+ }
+ END {
+ if(found > 0) {
+ exit 2;
+ }
+ }'
+ if [ $? == 2 ] ; then
+ echo "Missing const in : $file"
+ echo
+ fi
+done
+
/testingscripts/constqstring.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/nolistend.sh
===================================================================
--- testingscripts/nolistend.sh (nonexistent)
+++ testingscripts/nolistend.sh (revision 2801)
@@ -0,0 +1,17 @@
+#!/bin/sh
+##
+# Name: .end() call in for loop
+# Description: When iteratoring through a list the value of end() should be cached to avoid the unnecessary creation of the temporary variable. See: <a
+# href="http://developer.kde.org/documentation/other/mistakes.html">Iterators</a>
+# ToResolve: Create temporary variable (preferably const) outside of for loop to compare against.
+# Author: Benjamin Meyer <ben + kdetest at meyerhome dot net>
+##
+
+for file in `find . -name '*.cpp' -o -name '*.cc'` ; do
+ awk '{gsub(/[ ]/||/[\t]/, "", $0); } /for[\ ]*\(.*\.end.*\)/ { print $0; num++ } END { if (num > 0) exit 1 } ' $file
+ if [ $? == 1 ] ; then
+ echo $file;
+ echo
+ fi;
+done
+
/testingscripts/nolistend.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/headerincluded.sh
===================================================================
--- testingscripts/headerincluded.sh (nonexistent)
+++ testingscripts/headerincluded.sh (revision 2801)
@@ -0,0 +1,15 @@
+#!/bin/sh
+##
+# Name: possible double inclusion
+# Description: A possible double inclusion in possible for headers that don't include #ifndef
+# ToResolve: Add #ifndef FILENAME_H and #define FILENAME_H at the top and #endif FILENAME_H at the bottom (replace FILENAME with the file name of course). Check out other headers for examples
+# Author: Benjamin Meyer [ben + kdetesting at meyerhome dot net ]
+##
+
+for file in `find . -name \*.h | grep -v config.h | grep -v .ui.h | grep -v version.h | grep -v generated` ; do
+ grep 'ifndef' $file >> /dev/null
+ if [ $? = 1 ] ; then
+ echo "Missing ifndef in: $file"
+ fi
+done
+
/testingscripts/headerincluded.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: testingscripts/swears.sh
===================================================================
--- testingscripts/swears.sh (nonexistent)
+++ testingscripts/swears.sh (revision 2801)
@@ -0,0 +1,21 @@
+#!/bin/sh
+##
+# Name: Swears
+# Description: Finds swear words in code.
+# ToResolve: The author may have been annoyed at some api/tutorial/doc that wasn't documented well. Evaluate if the code or a doc that needs to be improved. If you are the author
+#it is up to you to decide if you want this comment or not in *your* code. If you arn't the author don't touch the comment, people tend to get all pissy when you change their
+#fucking swear words. Unless it is in a kdDebug() which goes out to the user and it should be removed.
+# Author: Benjamin Meyer [ben + kdetest at meyerhome dot net]
+##
+
+for file in `find . -name '*.cpp' -o -name '*.cc' -o -name '*.c' -o -name '*.h' -o -name '*.cxx' -o -name '*.py' -o -name '*.sh' -o -name '*.pl'` ; do
+ awk '{tolower($0)} /[" ]fuck[" ]|[" ]cunt[" ]|[" ]crap[" ]|[" ]dick[" ]|[" ]shitty[" ]|[" ]shit[" ]|[" ]cock[" ]|[" ]wank[" ]|[" ]piss[" ]/ {print $0; exit 1}' $file
+
+ #grep --word-regexp -e '/fuck|cunt|crap|dick|shit|cock|wank|piss/' $file
+
+ if [ $? = 1 ] ; then
+ echo "Possible warning in: $file"
+ echo
+ fi
+done
+
/testingscripts/swears.sh
Property changes:
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property