Skip to content

Commit

Permalink
Fix SC2196 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 21, 2018
1 parent 4778498 commit 78b07cd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/chkcopyrights.sh
Expand Up @@ -16,5 +16,5 @@


licensecheck -r . |
egrep -v "\/debian\/|\.\/python\/ext-libs|\.\/ms-windows\/osgeo4w\/untgz\/|\.\/src\/app\/gps\/qwtpolar-|\.\/src\/app\/gps\/qwtpolar-1.0|: BSD \(3 clause\)|: GPL \(v[23] or later\)$|: LGPL \(v2 or later\)$|: MIT\/X11 \(BSD like\)$|: Apache \(v2\.0\) GPL \(v2 or later\)$|: LGPL$|: Apache \(v2\.0\)$|: zlib\/libpng$|: GPL LGPL$|GENERATED FILE" |
grep -v -E "\/debian\/|\.\/python\/ext-libs|\.\/ms-windows\/osgeo4w\/untgz\/|\.\/src\/app\/gps\/qwtpolar-|\.\/src\/app\/gps\/qwtpolar-1.0|: BSD \(3 clause\)|: GPL \(v[23] or later\)$|: LGPL \(v2 or later\)$|: MIT\/X11 \(BSD like\)$|: Apache \(v2\.0\) GPL \(v2 or later\)$|: LGPL$|: Apache \(v2\.0\)$|: zlib\/libpng$|: GPL LGPL$|GENERATED FILE" |
sed -e "s/:.*$//"
2 changes: 1 addition & 1 deletion scripts/chkspelling.sh
Expand Up @@ -19,4 +19,4 @@
RE=$(echo $(cut -d: -f1 scripts/spelling.dat | sed -e 's/^/\\</; s/$/\\>|/;') | sed -e 's/| /|/g; s/|$//;')
EX="\.(svn-base|tmp|xpm|ts|o)|spelling\.dat|Exception_to_GPL_for_Qt.txt|sqlite3.c|qgisstyle|LexerR.py|debian/build.*|debian/.*/usr/|ms-windows/osgeo4w|ChangeLog|src/plugins/grass/qtermwidget|src/app/gps/qwtpolar-|python/ext-libs|i18n/"

egrep --exclude=*.{png,svg,db,bz2,pdf,qgs,qml,api,pyc} --exclude-dir=.git --exclude-dir=debian/build* --color=always "$RE" -ir . | egrep -iv "$EX"
grep --exclude=*.{png,svg,db,bz2,pdf,qgs,qml,api,pyc} --exclude-dir=.git --exclude-dir=debian/build* --color=always -E "$RE" -ir . | grep -iv -E "$EX"
2 changes: 1 addition & 1 deletion scripts/replacev2.sh
Expand Up @@ -23,7 +23,7 @@ do
fi
done

for i in $(git --no-pager grep "::[a-zA-Z0-9_]*V2" $codepaths | perl -pe 's#^.*::([a-zA-Z0-9_]*)V2([a-zA-Z0-9_]*).*$#$1V2$2#' | egrep -v "^Qgs|SslV2" | sort -u)
for i in $(git --no-pager grep "::[a-zA-Z0-9_]*V2" $codepaths | perl -pe 's#^.*::([a-zA-Z0-9_]*)V2([a-zA-Z0-9_]*).*$#$1V2$2#' | grep -v -E "^Qgs|SslV2" | sort -u)
do
src=$i
dst=${src/V2/}
Expand Down
4 changes: 2 additions & 2 deletions scripts/sip_include.sh
Expand Up @@ -58,9 +58,9 @@ for module in "${modules[@]}"; do
#echo "src/${module}/$header not found"
continue
fi
if ! egrep -xq '^(#define +)?SIP_NO_FILE' src/${module}/${header}; then
if ! grep -xq -E '^(#define +)?SIP_NO_FILE' src/${module}/${header}; then
sip=$(${GP}sed -r 's/(.*)\.h$/\1.sip/' <<< ${header})
if_cond=$(egrep -x '^(#define +)?SIP_IF_MODULE\((.*)\)$' src/${module}/${header} | \
if_cond=$(grep -x -E '^(#define +)?SIP_IF_MODULE\((.*)\)$' src/${module}/${header} | \
${GP}sed -r -e 's/(#define +)?SIP_IF_MODULE\((.*)\)/%If (\2)/')
if [[ ! -z $if_cond ]]; then
echo "$if_cond" >> $file
Expand Down
2 changes: 1 addition & 1 deletion tests/code_layout/test_shellcheck.sh
Expand Up @@ -5,7 +5,7 @@
DIR=$(git rev-parse --show-toplevel)

pushd ${DIR} > /dev/null || exit
result=$(shellcheck -e SC2016,SC2015,SC2086,SC2002,SC1117,SC2154,SC2076,SC2046,SC1090,SC2038,SC2031,SC2030,SC2162,SC2196,SC2044,SC2119,SC1001,SC2120,SC2059,SC2128,SC2005,SC2013,SC2027,SC2090,SC2089,SC2124,SC2001,SC2010,SC1072,SC1073,SC1009,SC2166,SC2045,SC2028,SC1091,SC1083 $(find . -name '*.sh'))
result=$(shellcheck -e SC2016,SC2015,SC2086,SC2002,SC1117,SC2154,SC2076,SC2046,SC1090,SC2038,SC2031,SC2030,SC2162,SC2044,SC2119,SC1001,SC2120,SC2059,SC2128,SC2005,SC2013,SC2027,SC2090,SC2089,SC2124,SC2001,SC2010,SC1072,SC1073,SC1009,SC2166,SC2045,SC2028,SC1091,SC1083 $(find . -name '*.sh'))
popd > /dev/null || exit

if [[ $result ]]; then
Expand Down

0 comments on commit 78b07cd

Please sign in to comment.