github-actions[bot] commented on PR #19352:
URL: https://github.com/apache/doris/pull/19352#issuecomment-1537122664

   #### `sh-checker report`
   
   To get the full details, please check in the 
[job]("https://github.com/apache/doris/actions/runs/4901367818";) output.
   
   <details>
   <summary>shellcheck errors</summary>
   
   ```
   
   'shellcheck ' returned error 1 finding the following syntactical issues:
   
   ----------
   
   In be/src/clucene/dist-test.sh line 30:
   if [ $# -eq 0 ]; then
      ^----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
   if [[ $# -eq 0 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 33:
       while [ "$1" != "" ]; do
             ^------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
   
   Did you mean: 
       while [[ "$1" != "" ]]; do
   
   
   In be/src/clucene/dist-test.sh line 34:
           if [ "$1" == "all" ]; then
              ^---------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests 
in Bash/Ksh.
   
   Did you mean: 
           if [[ "$1" == "all" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 36:
           elif [ "$1" == "env" ]; then
                ^---------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
           elif [[ "$1" == "env" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 38:
           elif [ "$1" == "c_all" ]; then
                ^-----------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
           elif [[ "$1" == "c_all" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 40:
           elif [ "$1" == "inline" ]; then
                ^------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
           elif [[ "$1" == "inline" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 42:
           elif [ "$1" == "compile" ]; then
                ^-------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
           elif [[ "$1" == "compile" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 44:
           elif [ "$1" == "c_header" ]; then
                ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] 
for tests in Bash/Ksh.
   
   Did you mean: 
           elif [[ "$1" == "c_header" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 46:
           elif [ "$1" == "license" ]; then
                ^-------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
           elif [[ "$1" == "license" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 48:
           elif [ "$1" == "ifdefs" ]; then
                ^------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
           elif [[ "$1" == "ifdefs" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 50:
           elif [ "$1" == "exports" ]; then
                ^-------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
           elif [[ "$1" == "exports" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 59:
   if [ $t_all -eq 1 ]; then
      ^--------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
        ^----^ SC2248 (style): Prefer double quoting even when variables don't 
contain special characters.
        ^----^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
   
   Did you mean: 
   if [[ "${t_all}" -eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 74:
       grep "#if" $1| grep -v "_UCS2" |grep -v "_CL_HAVE_" |grep -v "_ASCII" 
|grep -v "_WIN32"|grep -v "_MSC_"|grep -v "__MINGW32__" |grep -v "_WIN64" | 
while read line; do
                  ^-- SC2086 (info): Double quote to prevent globbing and word 
splitting.
                                                                                
                                                                               
^--^ SC2162 (info): read without -r will mangle backslashes.
   
   Did you mean: 
       grep "#if" "$1"| grep -v "_UCS2" |grep -v "_CL_HAVE_" |grep -v "_ASCII" 
|grep -v "_WIN32"|grep -v "_MSC_"|grep -v "__MINGW32__" |grep -v "_WIN64" | 
while read line; do
   
   
   In be/src/clucene/dist-test.sh line 75:
           I=`expr $I + 1`
             ^-----------^ SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
              ^--^ SC2003 (style): expr is antiquated. Consider rewriting this 
using $((..)), ${} or [[ ]].
                   ^-- SC2086 (info): Double quote to prevent globbing and word 
splitting.
                   ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           I=$(expr "${I}" + 1)
   
   
   In be/src/clucene/dist-test.sh line 76:
           if [ $I -gt 1 ]; then
              ^----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
                ^-- SC2086 (info): Double quote to prevent globbing and word 
splitting.
                ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           if [[ "${I}" -gt 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 77:
               echo $1 might have invalid ifdef: $line
                    ^-- SC2086 (info): Double quote to prevent globbing and 
word splitting.
                                                 ^---^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                                 ^---^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
               echo "$1" might have invalid ifdef: "${line}"
   
   
   In be/src/clucene/dist-test.sh line 83:
   if [ $t_env -eq 1 ]; then
      ^--------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
        ^----^ SC2248 (style): Prefer double quoting even when variables don't 
contain special characters.
        ^----^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
   
   Did you mean: 
   if [[ "${t_env}" -eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 84:
       rm -fdr $TMP 2>/dev/null
               ^--^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
               ^--^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       rm -fdr "${TMP}" 2>/dev/null
   
   
   In be/src/clucene/dist-test.sh line 85:
       mkdir $TMP
             ^--^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
             ^--^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       mkdir "${TMP}"
   
   
   In be/src/clucene/dist-test.sh line 88:
       echo "#include \"CLucene/StdHeader.h"\" >$TMP/pub-headers.cpp
                                                ^--^ SC2248 (style): Prefer 
double quoting even when variables don't contain special characters.
                                                ^--^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
       echo "#include \"CLucene/StdHeader.h"\" >"${TMP}"/pub-headers.cpp
   
   
   In be/src/clucene/dist-test.sh line 91:
       for H in `find ../src/shared/CLucene| grep "\.h$"` `find 
../src/core/CLucene| grep "\.h$"`; do
                ^-- SC2006 (style): Use $(...) notation instead of legacy 
backticks `...`.
                                                          ^-- SC2006 (style): 
Use $(...) notation instead of legacy backticks `...`.
   
   Did you mean: 
       for H in $(find ../src/shared/CLucene| grep "\.h$") $(find 
../src/core/CLucene| grep "\.h$"); do
   
   
   In be/src/clucene/dist-test.sh line 92:
           BH=`basename "$H"`
              ^-------------^ SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
                         ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           BH=$(basename "${H}")
   
   
   In be/src/clucene/dist-test.sh line 93:
           DN=`dirname "$H"`
              ^------------^ SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
                        ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           DN=$(dirname "${H}")
   
   
   In be/src/clucene/dist-test.sh line 94:
           if [ "${BH:0:1}" != "_" ]; then
              ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
           if [[ "${BH:0:1}" != "_" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 95:
               DH=`dirname "${H:3}"`
                  ^----------------^ SC2006 (style): Use $(...) notation 
instead of legacy backticks `...`.
   
   Did you mean: 
               DH=$(dirname "${H:3}")
   
   
   In be/src/clucene/dist-test.sh line 97:
               if [ "${H:7}" != "core/CLucene/util/Reader.h" ]; then
                  ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
   
   Did you mean: 
               if [[ "${H:7}" != "core/CLucene/util/Reader.h" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 99:
                    mkdir -p "$TMP/$DH" 2>/dev/null
                                 ^--^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                      ^-^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
                    mkdir -p "${TMP}/${DH}" 2>/dev/null
   
   
   In be/src/clucene/dist-test.sh line 100:
                    ln -s "`cd "$DN" && pwd`/$BH" "$TMP/${H:3}" 2>/dev/null
                              ^---------------^ SC2006 (style): Use $(...) 
notation instead of legacy backticks `...`.
                                   ^-^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                                ^-^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
                                                      ^--^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
                    ln -s "$(cd "${DN}" && pwd)/${BH}" "${TMP}/${H:3}" 
2>/dev/null
   
   
   In be/src/clucene/dist-test.sh line 103:
                 echo "#include \"${H:7}\"" >>$TMP/pub-headers.cpp
                                              ^--^ SC2248 (style): Prefer 
double quoting even when variables don't contain special characters.
                                              ^--^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
                 echo "#include \"${H:7}\"" >>"${TMP}"/pub-headers.cpp
   
   
   In be/src/clucene/dist-test.sh line 108:
       echo "int main(){return 0;}"  >>$TMP/pub-headers.cpp
                                       ^--^ SC2248 (style): Prefer double 
quoting even when variables don't contain special characters.
                                       ^--^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
       echo "int main(){return 0;}"  >>"${TMP}"/pub-headers.cpp
   
   
   In be/src/clucene/dist-test.sh line 117:
   if [ $t_c_h -eq 1 ] || [ $t_ifdefs -eq 1 ] || [ $t_exports -eq 1 ]; then
      ^--------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
        ^----^ SC2248 (style): Prefer double quoting even when variables don't 
contain special characters.
        ^----^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
                          ^-----------------^ SC2292 (style): Prefer [[ ]] over 
[ ] for tests in Bash/Ksh.
                            ^-------^ SC2248 (style): Prefer double quoting 
even when variables don't contain special characters.
                            ^-------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                                 ^------------------^ SC2292 
(style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                                   ^--------^ SC2248 (style): 
Prefer double quoting even when variables don't contain special characters.
                                                   ^--------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
   if [[ "${t_c_h}" -eq 1 ]] || [[ "${t_ifdefs}" -eq 1 ]] || [[ "${t_exports}" 
-eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 118:
       for H in `find $TMP/src | grep "\.h$"`; do
                ^---------------------------^ SC2006 (style): Use $(...) 
notation instead of legacy backticks `...`.
                      ^--^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
                      ^--^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       for H in $(find "${TMP}"/src | grep "\.h$"); do
   
   
   In be/src/clucene/dist-test.sh line 119:
           BH=`basename "$H"`
              ^-------------^ SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
                         ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           BH=$(basename "${H}")
   
   
   In be/src/clucene/dist-test.sh line 120:
           DH=`dirname "${H:3}"`
              ^----------------^ SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
   
   Did you mean: 
           DH=$(dirname "${H:3}")
   
   
   In be/src/clucene/dist-test.sh line 122:
           if [ $t_ifdefs -eq 1 ]; then
              ^-----------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
                ^-------^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
                ^-------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           if [[ "${t_ifdefs}" -eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 123:
               checkForIfdefs $H
                              ^-- SC2086 (info): Double quote to prevent 
globbing and word splitting.
                              ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
               checkForIfdefs "${H}"
   
   
   In be/src/clucene/dist-test.sh line 127:
           if [ $t_exports -eq 1 ]; then
              ^------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
                ^--------^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
                ^--------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           if [[ "${t_exports}" -eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 128:
                        if [ "${H:0:1}" == "_" ]; then
                      ^-------------------^ SC2292 (style): Prefer [[ ]] over [ 
] for tests in Bash/Ksh.
   
   Did you mean: 
                        if [[ "${H:0:1}" == "_" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 130:
                  XX=`awk '/^[ \t]*(class|struct)/ { print $line }' $H| grep -v 
";$"| grep -v CLUCENE_EXPORT| grep -v CLUCENE_INLINE_EXPORT| grep -v 
CLUCENE_SHARED_EXPORT| grep -v CLUCENE_SHARED_INLINE_EXPORT`
                        ^-- SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
                                                                       ^-- 
SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                       ^-- 
SC2250 (style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
                  XX=$(awk '/^[ \t]*(class|struct)/ { print $line }' "${H}"| 
grep -v ";$"| grep -v CLUCENE_EXPORT| grep -v CLUCENE_INLINE_EXPORT| grep -v 
CLUCENE_SHARED_EXPORT| grep -v CLUCENE_SHARED_INLINE_EXPORT)
   
   
   In be/src/clucene/dist-test.sh line 131:
                  if [ "$XX" == "" ]; then
                        ^-------------^ SC2292 (style): Prefer [[ ]] over [ ] 
for tests in Bash/Ksh.
                           ^-^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
                  if [[ "${XX}" == "" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 132:
                      echo "$H is internal but has exported class: $XX"
                               ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                                                                      ^-^ 
SC2250 (style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
                      echo "${H} is internal but has exported class: ${XX}"
   
   
   In be/src/clucene/dist-test.sh line 138:
                  XX=`awk '/^[ \t]*(class|struct)/ { print $line }' $H| grep -v 
";$"| grep -v CLUCENE_EXPORT| grep -v CLUCENE_INLINE_EXPORT| grep -v 
CLUCENE_SHARED_EXPORT| grep -v CLUCENE_SHARED_INLINE_EXPORT`
                        ^-- SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
                                                                       ^-- 
SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                       ^-- 
SC2250 (style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
                  XX=$(awk '/^[ \t]*(class|struct)/ { print $line }' "${H}"| 
grep -v ";$"| grep -v CLUCENE_EXPORT| grep -v CLUCENE_INLINE_EXPORT| grep -v 
CLUCENE_SHARED_EXPORT| grep -v CLUCENE_SHARED_INLINE_EXPORT)
   
   
   In be/src/clucene/dist-test.sh line 139:
                  if [ "$XX" != "" ]; then
                        ^-------------^ SC2292 (style): Prefer [[ ]] over [ ] 
for tests in Bash/Ksh.
                           ^-^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
                  if [[ "${XX}" != "" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 140:
                      echo "$H has unexported class: $XX"
                               ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                                                        ^-^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
                      echo "${H} has unexported class: ${XX}"
   
   
   In be/src/clucene/dist-test.sh line 148:
           if [ $t_c_h -eq 1 ]; then
              ^--------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests 
in Bash/Ksh.
                ^----^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
                ^----^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           if [[ "${t_c_h}" -eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 149:
               echo "#include \"CLucene/StdHeader.h"\" >$TMP/pub-header.cpp
                                                        ^--^ SC2248 (style): 
Prefer double quoting even when variables don't contain special characters.
                                                        ^--^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
               echo "#include \"CLucene/StdHeader.h"\" >"${TMP}"/pub-header.cpp
   
   
   In be/src/clucene/dist-test.sh line 150:
               echo "#include \"$H"\" >>$TMP/pub-header.cpp
                                ^-- SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                        ^--^ SC2248 (style): Prefer double 
quoting even when variables don't contain special characters.
                                        ^--^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
               echo "#include \"${H}"\" >>"${TMP}"/pub-header.cpp
   
   
   In be/src/clucene/dist-test.sh line 151:
               echo "int main(){ return 0; }" >>"$TMP/pub-header.cpp"
                                                 ^--^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
               echo "int main(){ return 0; }" >>"${TMP}/pub-header.cpp"
   
   
   In be/src/clucene/dist-test.sh line 152:
               ERROR=`g++ -I. -I$TMP/src/shared -I./src/shared -I../src/ext 
-I$TMP/src/core $TMP/pub-header.cpp`
                     ^-- SC2006 (style): Use $(...) notation instead of legacy 
backticks `...`.
                                ^--^ SC2248 (style): Prefer double quoting even 
when variables don't contain special characters.
                                ^--^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                                                              
^--^ SC2248 (style): Prefer double quoting even when variables don't contain 
special characters.
                                                                              
^--^ SC2250 (style): Prefer putting braces around variable references even when 
not strictly required.
                                                                                
            ^--^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
                                                                                
            ^--^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
               ERROR=$(g++ -I. -I"${TMP}"/src/shared -I./src/shared 
-I../src/ext -I"${TMP}"/src/core "${TMP}"/pub-header.cpp)
   
   
   In be/src/clucene/dist-test.sh line 153:
               if [ $? -ne 0 ]; then 
                  ^----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests 
in Bash/Ksh.
                    ^-- SC2181 (style): Check exit code directly with e.g. 'if 
! mycmd;', not indirectly with $?.
   
   Did you mean: 
               if [[ $? -ne 0 ]]; then 
   
   
   In be/src/clucene/dist-test.sh line 155:
                echo "$H doesn't compile seperately..."
                         ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
                echo "${H} doesn't compile seperately..."
   
   
   In be/src/clucene/dist-test.sh line 156:
                echo $ERROR
                        ^----^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
                        ^----^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
                echo "${ERROR}"
   
   
   In be/src/clucene/dist-test.sh line 163:
       if [ $t_ifdefs -eq 1 ]; then
          ^-----------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests 
in Bash/Ksh.
            ^-------^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
            ^-------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       if [[ "${t_ifdefs}" -eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 178:
   if [ $t_license -eq 1 ]; then
      ^------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
        ^--------^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
        ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   if [[ "${t_license}" -eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 179:
       for H in `find ../src`; do
                ^-----------^ SC2044 (warning): For loops over find output are 
fragile. Use find -exec or a while read loop.
                ^-----------^ SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
   
   Did you mean: 
       for H in $(find ../src); do
   
   
   In be/src/clucene/dist-test.sh line 180:
           BH=`basename "$H"`
              ^-------------^ SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
                         ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           BH=$(basename "${H}")
   
   
   In be/src/clucene/dist-test.sh line 183:
           if [ "${BH:BH_len-2}" == ".h" ] || [ "${BH:BH_len-2}" == ".c" ] || [ 
"${BH:BH_len-4}" == ".cpp" ]; then
              ^--------------------------^ SC2292 (style): Prefer [[ ]] over [ 
] for tests in Bash/Ksh.
                                              ^--------------------------^ 
SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                                                              
^----------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests 
in Bash/Ksh.
   
   Did you mean: 
           if [[ "${BH:BH_len-2}" == ".h" ]] || [[ "${BH:BH_len-2}" == ".c" ]] 
|| [[ "${BH:BH_len-4}" == ".cpp" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 186:
                        if [ "echo $H|grep 'snowball/src_c'" != "" ]; then
                              ^-- SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
                                      ^-- SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                                                ^-- SC2193 
(warning): The arguments to this comparison can never be equal. Make sure your 
syntax is correct.
   
   Did you mean: 
                        if [[ "echo ${H}|grep 'snowball/src_c'" != "" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 190:
                        if [ "echo $H|grep 'libstemmer'" != "" ]; then
                              ^-- SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
                                      ^-- SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                                            ^-- SC2193 
(warning): The arguments to this comparison can never be equal. Make sure your 
syntax is correct.
   
   Did you mean: 
                        if [[ "echo ${H}|grep 'libstemmer'" != "" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 194:
                        if [ "echo $H|grep 'CLucene/util/zlib'" != "" ]; then
                              ^-- SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
                                      ^-- SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                                                   ^-- SC2193 
(warning): The arguments to this comparison can never be equal. Make sure your 
syntax is correct.
   
   Did you mean: 
                        if [[ "echo ${H}|grep 'CLucene/util/zlib'" != "" ]]; 
then
   
   
   In be/src/clucene/dist-test.sh line 198:
               if [ "`awk '/\* Copyright \(C\) [0-9]*-[0-9]* .*$/ { print $line 
}' $H`" == "" ]; then
                  ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
                     ^-- SC2006 (style): Use $(...) notation instead of legacy 
backticks `...`.
                                                                                
   ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                
   ^-- SC2250 (style): Prefer putting braces around variable references even 
when not strictly required.
   
   Did you mean: 
               if [[ "$(awk '/\* Copyright \(C\) [0-9]*-[0-9]* .*$/ { print 
$line }' "${H}")" == "" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 199:
                   if [ "`awk '/\* Copyright [0-9]*-[0-9]* .*$/ { print $line 
}' $H`" == "" ]; then
                      ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
                         ^-- SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
                                                                                
 ^-- SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                
 ^-- SC2250 (style): Prefer putting braces around variable references even when 
not strictly required.
   
   Did you mean: 
                   if [[ "$(awk '/\* Copyright [0-9]*-[0-9]* .*$/ { print $line 
}' "${H}")" == "" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 200:
                       echo "$H ($BH) has invalid license"
                             ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                                 ^-^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
                       echo "${H} (${BH}) has invalid license"
   
   
   In be/src/clucene/dist-test.sh line 210:
   if [ $t_c_all -eq 1 ]; then
      ^----------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
        ^------^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
        ^------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   if [[ "${t_c_all}" -eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 211:
       g++ -I$TMP/src -I../src/ext -I$TMP/src/shared -I$TMP/src/core 
$TMP/pub-headers.cpp -I./src/shared
             ^--^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
             ^--^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
                                     ^--^ SC2248 (style): Prefer double quoting 
even when variables don't contain special characters.
                                     ^--^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                                       ^--^ SC2248 (style): 
Prefer double quoting even when variables don't contain special characters.
                                                       ^--^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
                                                                     ^--^ 
SC2248 (style): Prefer double quoting even when variables don't contain special 
characters.
                                                                     ^--^ 
SC2250 (style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
       g++ -I"${TMP}"/src -I../src/ext -I"${TMP}"/src/shared 
-I"${TMP}"/src/core "${TMP}"/pub-headers.cpp -I./src/shared
   
   
   In be/src/clucene/dist-test.sh line 214:
   if [ $t_inline -eq 1 ]; then
      ^-----------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
        ^-------^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
        ^-------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   if [[ "${t_inline}" -eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 215:
                if [ ! -d "./doc" ]; then
                      ^--------------^ SC2292 (style): Prefer [[ ]] over [ ] 
for tests in Bash/Ksh.
   
   Did you mean: 
                if [[ ! -d "./doc" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 224:
       grep -c "\[inline" doc/html/*.html|grep -v ":0$"|grep -v "util"|grep -v 
"jstreams" | while read line; do
                                                                                
                  ^--^ SC2162 (info): read without -r will mangle backslashes.
   
   
   In be/src/clucene/dist-test.sh line 227:
           if [ "doc/html/classlucene_1_1index_1_1Term.html:1" == $line ]; then
              ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                                                  ^---^ SC2086 
(info): Double quote to prevent globbing and word splitting.
                                                                  ^---^ SC2250 
(style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
           if [[ "doc/html/classlucene_1_1index_1_1Term.html:1" == "${line}" 
]]; then
   
   
   In be/src/clucene/dist-test.sh line 230:
           if [ "doc/html/classlucene_1_1search_1_1Similarity.html:1" == $line 
]; then
              ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                                                         ^---^ 
SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                         ^---^ 
SC2250 (style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
           if [[ "doc/html/classlucene_1_1search_1_1Similarity.html:1" == 
"${line}" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 233:
           if [ "doc/html/classlucene_1_1store_1_1BufferedIndexInput.html:1" == 
$line ]; then
              ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                                                                                
^---^ SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                                
^---^ SC2250 (style): Prefer putting braces around variable references even 
when not strictly required.
   
   Did you mean: 
           if [[ "doc/html/classlucene_1_1store_1_1BufferedIndexInput.html:1" 
== "${line}" ]]; then
   
   
   In be/src/clucene/dist-test.sh line 237:
           if [ $INLINES -eq 0 ]; then
              ^----------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
                ^------^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
                ^------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           if [[ "${INLINES}" -eq 0 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 242:
           echo $line
                ^---^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
                ^---^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           echo "${line}"
   
   
   In be/src/clucene/dist-test.sh line 246:
   if [ $t_compile -eq 1 ]; then
      ^------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
        ^--------^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
        ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   if [[ "${t_compile}" -eq 1 ]]; then
   
   
   In be/src/clucene/dist-test.sh line 249:
       if [ $? -ne 0 ]; then 
          ^----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
            ^-- SC2181 (style): Check exit code directly with e.g. 'if ! 
mycmd;', not indirectly with $?.
   
   Did you mean: 
       if [[ $? -ne 0 ]]; then 
   
   
   In be/src/clucene/dist-test.sh line 260:
       if [ $? -ne 0 ]; then 
          ^----------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
            ^-- SC2181 (style): Check exit code directly with e.g. 'if ! 
mycmd;', not indirectly with $?.
   
   Did you mean: 
       if [[ $? -ne 0 ]]; then 
   
   
   In be/src/clucene/dist-test.sh line 268:
   if [ $FAIL == 1 ]; then
      ^------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
        ^---^ SC2248 (style): Prefer double quoting even when variables don't 
contain special characters.
        ^---^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
   
   Did you mean: 
   if [[ "${FAIL}" == 1 ]]; then
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 12:
       echo Usage: $0 testname
                   ^-- SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean: 
       echo Usage: "$0" testname
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 35:
   SOURCEDIR=`grep CMAKE_HOME_DIRECTORY CMakeCache.txt |perl -pi -e 
's/.*=(.*)/\1/'`
             ^-- SC2006 (style): Use $(...) notation instead of legacy 
backticks `...`.
   
   Did you mean: 
   SOURCEDIR=$(grep CMAKE_HOME_DIRECTORY CMakeCache.txt |perl -pi -e 
's/.*=(.*)/\1/')
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 36:
   if [ "$SOURCEDIR" == "" ]; then
      ^--------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
         ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   if [[ "${SOURCEDIR}" == "" ]]; then
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 46:
       echo Testing revision $REVISION.
                             ^-------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                             ^-------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
       echo Testing revision "${REVISION}".
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 52:
       cd $TESTDIR
       ^---------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' 
in case cd fails.
       ^---------^ SC2317 (info): Command appears to be unreachable. Check 
usage (or ignore if invoked indirectly).
          ^------^ SC2154 (warning): TESTDIR is referenced but not assigned.
          ^------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
          ^------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       cd "${TESTDIR}" || exit
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 53:
       svn update $MODULE -r $REVISION $SOURCEDIR
       ^-- SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
                  ^-----^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
                  ^-----^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
                             ^-------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                             ^-------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                       ^--------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
                                       ^--------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
       svn update "${MODULE}" -r "${REVISION}" "${SOURCEDIR}"
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 54:
       if (( $? != 0 )); then
       ^-- SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
          ^-----------^ SC2317 (info): Command appears to be unreachable. Check 
usage (or ignore if invoked indirectly).
             ^-- SC2181 (style): Check exit code directly with e.g. 'if ! 
mycmd;', not indirectly with $?.
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 56:
           rm -rf $TESTDIR/$MODULE
           ^---------------------^ SC2317 (info): Command appears to be 
unreachable. Check usage (or ignore if invoked indirectly).
                  ^--------------^ SC2115 (warning): Use "${var:?}" to ensure 
this never expands to / .
                  ^------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
                  ^------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                           ^-----^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                           ^-----^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           rm -rf "${TESTDIR}"/"${MODULE}"
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 57:
           svn checkout -r $REVISION $SVNURL $SOURCEDIR
           ^-- SC2317 (info): Command appears to be unreachable. Check usage 
(or ignore if invoked indirectly).
                           ^-------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                           ^-------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                     ^-----^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                                     ^-----^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
                                             ^--------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                             ^--------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
           svn checkout -r "${REVISION}" "${SVNURL}" "${SOURCEDIR}"
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 58:
           if (( $? != 0 )); then exit; fi
           ^-----------------------------^ SC2317 (info): Command appears to be 
unreachable. Check usage (or ignore if invoked indirectly).
              ^-----------^ SC2317 (info): Command appears to be unreachable. 
Check usage (or ignore if invoked indirectly).
                 ^-- SC2181 (style): Check exit code directly with e.g. 'if ! 
mycmd;', not indirectly with $?.
                                  ^--^ SC2317 (info): Command appears to be 
unreachable. Check usage (or ignore if invoked indirectly).
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 63:
       if (( $FORCEFULLBUILD == 1 )); then
       ^-- SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
          ^------------------------^ SC2317 (info): Command appears to be 
unreachable. Check usage (or ignore if invoked indirectly).
             ^-------------^ SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
             ^-------------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       if (( ${FORCEFULLBUILD} == 1 )); then
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 64:
           rm -rf $TESTDIR/$MODULE/build
           ^---------------------------^ SC2317 (info): Command appears to be 
unreachable. Check usage (or ignore if invoked indirectly).
                  ^------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
                  ^------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                           ^-----^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                           ^-----^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           rm -rf "${TESTDIR}"/"${MODULE}"/build
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 66:
       mkdir $TESTDIR/$MODULE/build
       ^--------------------------^ SC2317 (info): Command appears to be 
unreachable. Check usage (or ignore if invoked indirectly).
             ^------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
             ^------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
                      ^-----^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
                      ^-----^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       mkdir "${TESTDIR}"/"${MODULE}"/build
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 67:
       cd $TESTDIR/$MODULE/build
       ^-----------------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd 
... || return' in case cd fails.
       ^-----------------------^ SC2317 (info): Command appears to be 
unreachable. Check usage (or ignore if invoked indirectly).
          ^------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
          ^------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
                   ^-----^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
                   ^-----^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       cd "${TESTDIR}"/"${MODULE}"/build || exit
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 68:
       cmake $SOURCEDIR
       ^--------------^ SC2317 (info): Command appears to be unreachable. Check 
usage (or ignore if invoked indirectly).
             ^--------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
             ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       cmake "${SOURCEDIR}"
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 69:
       if (( $? != 0 )); then return; fi
       ^-- SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
          ^-----------^ SC2317 (info): Command appears to be unreachable. Check 
usage (or ignore if invoked indirectly).
             ^-- SC2181 (style): Check exit code directly with e.g. 'if ! 
mycmd;', not indirectly with $?.
                              ^----^ SC2317 (info): Command appears to be 
unreachable. Check usage (or ignore if invoked indirectly).
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 73:
       echo $MAKE $TESTNAME
       ^------------------^ SC2317 (info): Command appears to be unreachable. 
Check usage (or ignore if invoked indirectly).
            ^---^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
            ^---^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
                  ^-------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
                  ^-------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       echo "${MAKE}" "${TESTNAME}"
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 74:
       $MAKE $TESTNAME
       ^-------------^ SC2317 (info): Command appears to be unreachable. Check 
usage (or ignore if invoked indirectly).
       ^---^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
             ^-------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
             ^-------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       ${MAKE} "${TESTNAME}"
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 75:
       if (( $? != 0 )); then return; fi
       ^-- SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
          ^-----------^ SC2317 (info): Command appears to be unreachable. Check 
usage (or ignore if invoked indirectly).
             ^-- SC2181 (style): Check exit code directly with e.g. 'if ! 
mycmd;', not indirectly with $?.
                              ^----^ SC2317 (info): Command appears to be 
unreachable. Check usage (or ignore if invoked indirectly).
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 78:
       TESTPATH=`find -name $TESTNAME -type f -perm -u+x`
       ^-- SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
                ^-- SC2006 (style): Use $(...) notation instead of legacy 
backticks `...`.
                 ^--^ SC2185 (info): Some finds don't have a default path. 
Specify '.' explicitly.
                 ^-- SC2317 (info): Command appears to be unreachable. Check 
usage (or ignore if invoked indirectly).
                            ^-------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                            ^-------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
       TESTPATH=$(find -name "${TESTNAME}" -type f -perm -u+x)
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 81:
       $TESTPATH
       ^-------^ SC2317 (info): Command appears to be unreachable. Check usage 
(or ignore if invoked indirectly).
       ^-------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       ${TESTPATH}
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 82:
       if (( $? == 0 )); then
       ^-- SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
          ^-----------^ SC2317 (info): Command appears to be unreachable. Check 
usage (or ignore if invoked indirectly).
             ^-- SC2181 (style): Check exit code directly with e.g. 'if 
mycmd;', not indirectly with $?.
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 83:
           echo The last revision where the test $TESTNAME worked was $REVISION.
           ^-- SC2317 (info): Command appears to be unreachable. Check usage 
(or ignore if invoked indirectly).
                                                 ^-------^ SC2086 (info): 
Double quote to prevent globbing and word splitting.
                                                 ^-------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
                                                                      ^-------^ 
SC2086 (info): Double quote to prevent globbing and word splitting.
                                                                      ^-------^ 
SC2250 (style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
           echo The last revision where the test "${TESTNAME}" worked was 
"${REVISION}".
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 84:
           BROKEN=`grep -B 1 $REVISION $TESTDIR/revisions |head -1`
           ^-- SC2317 (info): Command appears to be unreachable. Check usage 
(or ignore if invoked indirectly).
                  ^-- SC2006 (style): Use $(...) notation instead of legacy 
backticks `...`.
                   ^-- SC2317 (info): Command appears to be unreachable. Check 
usage (or ignore if invoked indirectly).
                             ^-------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                             ^-------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                       ^------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                                       ^------^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
           BROKEN=$(grep -B 1 "${REVISION}" "${TESTDIR}"/revisions |head -1)
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 85:
           echo The first revision that was broken was $BROKEN:
           ^-- SC2317 (info): Command appears to be unreachable. Check usage 
(or ignore if invoked indirectly).
                                                       ^-----^ SC2086 (info): 
Double quote to prevent globbing and word splitting.
                                                       ^-----^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
           echo The first revision that was broken was "${BROKEN}":
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 86:
           svn log -r $BROKEN $TESTDIR/$MODULE $SOURCEDIR
           ^-- SC2317 (info): Command appears to be unreachable. Check usage 
(or ignore if invoked indirectly).
                      ^-----^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
                      ^-----^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                              ^------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                              ^------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                       ^-----^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                                       ^-----^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
                                               ^--------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                               ^--------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
           svn log -r "${BROKEN}" "${TESTDIR}"/"${MODULE}" "${SOURCEDIR}"
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 87:
           exit
           ^--^ SC2317 (info): Command appears to be unreachable. Check usage 
(or ignore if invoked indirectly).
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 92:
   SVNURL=`svn info $SOURCEDIR | grep -m 1 '^URL: ' | cut -b 6-`
          ^-- SC2006 (style): Use $(...) notation instead of legacy backticks 
`...`.
                    ^--------^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
                    ^--------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
   SVNURL=$(svn info "${SOURCEDIR}" | grep -m 1 '^URL: ' | cut -b 6-)
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 93:
   if (( $? != 0 )); then exit; fi
         ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', 
not indirectly with $?.
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 95:
   echo $SVNURL
        ^-----^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
        ^-----^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   echo "${SVNURL}"
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 98:
   MODULE=`basename $SVNURL`
          ^----------------^ SC2006 (style): Use $(...) notation instead of 
legacy backticks `...`.
                    ^-----^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
                    ^-----^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
   MODULE=$(basename "${SVNURL}")
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 100:
   echo $MODULE
        ^-----^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
        ^-----^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   echo "${MODULE}"
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 103:
   svn log $MODULE --limit $MAXLOGENTRIES --non-interactive $SOURCEDIR\
           ^-----^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
           ^-----^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
                           ^------------^ SC2248 (style): Prefer double quoting 
even when variables don't contain special characters.
                           ^------------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
                                                            ^--------^ SC2086 
(info): Double quote to prevent globbing and word splitting.
                                                            ^--------^ SC2250 
(style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
   svn log "${MODULE}" --limit "${MAXLOGENTRIES}" --non-interactive 
"${SOURCEDIR}"\
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 105:
        | perl -pi -e 's/^r(\d+).*/\1/' | head -n $MAXSTEPS > revisions
                                                     ^-------^ SC2248 (style): 
Prefer double quoting even when variables don't contain special characters.
                                                     ^-------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
        | perl -pi -e 's/^r(\d+).*/\1/' | head -n "${MAXSTEPS}" > revisions
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 106:
   if (( $? != 0 )); then exit; fi
         ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', 
not indirectly with $?.
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 108:
   for REVISION in `cat revisions`; do
                   ^-------------^ SC2013 (info): To read lines rather than 
words, pipe/redirect to a 'while read' loop.
                   ^-------------^ SC2006 (style): Use $(...) notation instead 
of legacy backticks `...`.
   
   Did you mean: 
   for REVISION in $(cat revisions); do
   
   
   In be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh 
line 109:
       runTest $REVISION;
               ^-------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
               ^-------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       runTest "${REVISION}";
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 11:
   STRIGICMD="`find -type f -name strigicmd -type f -perm -o+x` "
              ^-- SC2006 (style): Use $(...) notation instead of legacy 
backticks `...`.
               ^--^ SC2185 (info): Some finds don't have a default path. 
Specify '.' explicitly.
   
   Did you mean: 
   STRIGICMD="$(find -type f -name strigicmd -type f -perm -o+x) "
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 12:
   echo Using $STRIGICMD
              ^--------^ SC2086 (info): Double quote to prevent globbing and 
word splitting.
              ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   echo Using "${STRIGICMD}"
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 19:
   echo == $STRIGICMD create -t clucene -d y x ==
   ^-- SC2284 (error): Use [ x = y ] to compare values (or quote '==' if 
literal).
           ^--------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
           ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   echo == "${STRIGICMD}" create -t clucene -d y x ==
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 20:
   if ! $STRIGICMD create -j 1 -t clucene -d y x; then
        ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   if ! ${STRIGICMD} create -j 1 -t clucene -d y x; then
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 23:
   echo == $STRIGICMD listFiles -t clucene -d y ==
   ^-- SC2284 (error): Use [ x = y ] to compare values (or quote '==' if 
literal).
           ^--------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
           ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   echo == "${STRIGICMD}" listFiles -t clucene -d y ==
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 24:
   if ! $STRIGICMD listFiles -t clucene -d y; then
        ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   if ! ${STRIGICMD} listFiles -t clucene -d y; then
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 28:
   echo == $STRIGICMD update -j $NTHREADS -t clucene -d y x ==
   ^-- SC2284 (error): Use [ x = y ] to compare values (or quote '==' if 
literal).
           ^--------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
           ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
                                ^-------^ SC2248 (style): Prefer double quoting 
even when variables don't contain special characters.
                                ^-------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
   echo == "${STRIGICMD}" update -j "${NTHREADS}" -t clucene -d y x ==
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 29:
   if ! $STRIGICMD update -j $NTHREADS -t clucene -d y x; then
        ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
                             ^-------^ SC2248 (style): Prefer double quoting 
even when variables don't contain special characters.
                             ^-------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
   if ! ${STRIGICMD} update -j "${NTHREADS}" -t clucene -d y x; then
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 32:
   echo == $STRIGICMD listFiles -t clucene -d y ==
   ^-- SC2284 (error): Use [ x = y ] to compare values (or quote '==' if 
literal).
           ^--------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
           ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   echo == "${STRIGICMD}" listFiles -t clucene -d y ==
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 33:
   if ! $STRIGICMD listFiles -t clucene -d y; then
        ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   if ! ${STRIGICMD} listFiles -t clucene -d y; then
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 36:
   OUT=`$STRIGICMD listFiles -t clucene -d y`
       ^-- SC2006 (style): Use $(...) notation instead of legacy backticks 
`...`.
        ^--------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
   OUT=$(${STRIGICMD} listFiles -t clucene -d y)
   
   
   In be/src/clucene/src/contribs/bashscripts/simpleupdate.sh line 37:
   if [[ $OUT == $'x\nx/z' ]]; then
         ^--^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
   
   Did you mean: 
   if [[ ${OUT} == $'x\nx/z' ]]; then
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 17:
   echo == src/strigicmd/strigicmd create -t clucene -d y x ==
   ^-- SC2284 (error): Use [ x = y ] to compare values (or quote '==' if 
literal).
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 18:
   if ! $VG src/strigicmd/strigicmd create -t clucene -d y x; then
        ^-^ SC2154 (warning): VG is referenced but not assigned.
        ^-^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
   
   Did you mean: 
   if ! ${VG} src/strigicmd/strigicmd create -t clucene -d y x; then
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 21:
   echo == src/strigicmd/strigicmd listFiles -t clucene -d y ==
   ^-- SC2284 (error): Use [ x = y ] to compare values (or quote '==' if 
literal).
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 22:
   if ! $VG src/strigicmd/strigicmd listFiles -t clucene -d y; then
        ^-^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
   
   Did you mean: 
   if ! ${VG} src/strigicmd/strigicmd listFiles -t clucene -d y; then
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 28:
   echo == src/strigicmd/strigicmd update -t clucene -d y x ==
   ^-- SC2284 (error): Use [ x = y ] to compare values (or quote '==' if 
literal).
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 30:
   if ! $VG src/strigicmd/strigicmd update -t clucene -d y x; then
   ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore 
if invoked indirectly).
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
        ^-^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
   
   Did you mean: 
   if ! ${VG} src/strigicmd/strigicmd update -t clucene -d y x; then
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 31:
       fail
       ^--^ SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 33:
   echo == src/strigicmd/strigicmd listFiles -t clucene -d y ==
   ^-- SC2284 (error): Use [ x = y ] to compare values (or quote '==' if 
literal).
   ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore 
if invoked indirectly).
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 34:
   if ! $VG src/strigicmd/strigicmd listFiles -t clucene -d y; then
   ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore 
if invoked indirectly).
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
        ^-^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
   
   Did you mean: 
   if ! ${VG} src/strigicmd/strigicmd listFiles -t clucene -d y; then
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 35:
       fail
       ^--^ SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 37:
   OUT=`$VG src/strigicmd/strigicmd listFiles -t clucene -d y`
   ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore 
if invoked indirectly).
       ^-- SC2006 (style): Use $(...) notation instead of legacy backticks 
`...`.
        ^-- SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
        ^-^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
   
   Did you mean: 
   OUT=$(${VG} src/strigicmd/strigicmd listFiles -t clucene -d y)
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 38:
   if [[ $OUT == 'x/z' ]]; then
   ^-- SC2317 (info): Command appears to be unreachable. Check usage (or ignore 
if invoked indirectly).
      ^-----------------^ SC2317 (info): Command appears to be unreachable. 
Check usage (or ignore if invoked indirectly).
         ^--^ SC2250 (style): Prefer putting braces around variable references 
even when not strictly required.
   
   Did you mean: 
   if [[ ${OUT} == 'x/z' ]]; then
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 39:
       echo Test succesfull
       ^------------------^ SC2317 (info): Command appears to be unreachable. 
Check usage (or ignore if invoked indirectly).
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 40:
       exit 0
       ^----^ SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
   
   
   In be/src/clucene/src/contribs/bashscripts/twofileupdate.sh line 42:
   fail
   ^--^ SC2317 (info): Command appears to be unreachable. Check usage (or 
ignore if invoked indirectly).
   
   For more information:
     https://www.shellcheck.net/wiki/SC2284 -- Use [ x = y ] to compare values 
(...
     https://www.shellcheck.net/wiki/SC2044 -- For loops over find output are 
fr...
     https://www.shellcheck.net/wiki/SC2115 -- Use "${var:?}" to ensure this 
nev...
   ----------
   
   You can address the above issues in one of three ways:
   1. Manually correct the issue in the offending shell script;
   2. Disable specific issues by adding the comment:
     # shellcheck disable=NNNN
   above the line that contains the issue, where NNNN is the error code;
   3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.
   
   
   
   ```
   </details>
   
   <details>
   <summary>shfmt errors</summary>
   
   ```
   
   'shfmt ' returned error 1 finding the following formatting issues:
   
   ----------
   --- be/src/clucene/dist-test.sh.orig
   +++ be/src/clucene/dist-test.sh
   @@ -14,7 +14,7 @@
        echo "    <license - test that each header has a valid license>]"
        echo "    <ifdefs - test that each header doesn't have invalid ifdefs>]"
        echo "    <exports - test that each header exports all its classes>]"
   -    exit 1;
   +    exit 1
    }
    t_all=0
    t_env=0
   @@ -67,136 +67,132 @@
        t_exports=1
    fi
    
   -
    #check to see that no #ifdefs exist in headers that don't belong
    function checkForIfdefs {
        I=0
   -    grep "#if" $1| grep -v "_UCS2" |grep -v "_CL_HAVE_" |grep -v "_ASCII" 
|grep -v "_WIN32"|grep -v "_MSC_"|grep -v "__MINGW32__" |grep -v "_WIN64" | 
while read line; do
   -        I=`expr $I + 1`
   +    grep "#if" $1 | grep -v "_UCS2" | grep -v "_CL_HAVE_" | grep -v 
"_ASCII" | grep -v "_WIN32" | grep -v "_MSC_" | grep -v "__MINGW32__" | grep -v 
"_WIN64" | while read line; do
   +        I=$(expr $I + 1)
            if [ $I -gt 1 ]; then
                echo $1 might have invalid ifdef: $line
            fi
        done
    }
    
   -
    if [ $t_env -eq 1 ]; then
        rm -fdr $TMP 2>/dev/null
        mkdir $TMP
   -    
   +
        #create header file for testing of symbols in headers.
        echo "#include \"CLucene/StdHeader.h"\" >$TMP/pub-headers.cpp
    
   -            #iterate all headers
   -    for H in `find ../src/shared/CLucene| grep "\.h$"` `find 
../src/core/CLucene| grep "\.h$"`; do
   -        BH=`basename "$H"`
   -        DN=`dirname "$H"`
   +    #iterate all headers
   +    for H in $(find ../src/shared/CLucene | grep "\.h$") $(find 
../src/core/CLucene | grep "\.h$"); do
   +        BH=$(basename "$H")
   +        DN=$(dirname "$H")
            if [ "${BH:0:1}" != "_" ]; then
   -            DH=`dirname "${H:3}"`
   -        
   +            DH=$(dirname "${H:3}")
   +
                if [ "${H:7}" != "core/CLucene/util/Reader.h" ]; then
   -                #move headers somewhere to compile
   -                mkdir -p "$TMP/$DH" 2>/dev/null
   -                ln -s "`cd "$DN" && pwd`/$BH" "$TMP/${H:3}" 2>/dev/null
   -                
   -                #create pub-headers.cpp
   -              echo "#include \"${H:7}\"" >>$TMP/pub-headers.cpp
   +                #move headers somewhere to compile
   +                mkdir -p "$TMP/$DH" 2>/dev/null
   +                ln -s "$(cd "$DN" && pwd)/$BH" "$TMP/${H:3}" 2>/dev/null
   +
   +                #create pub-headers.cpp
   +                echo "#include \"${H:7}\"" >>$TMP/pub-headers.cpp
                fi
            fi
        done
   -    
   -    echo "int main(){return 0;}"  >>$TMP/pub-headers.cpp
   +
   +    echo "int main(){return 0;}" >>$TMP/pub-headers.cpp
    fi
    
   -
    ################################################
    #now the environment is finished being setup...
    ################################################
    echo "Starting tests..."
    
    if [ $t_c_h -eq 1 ] || [ $t_ifdefs -eq 1 ] || [ $t_exports -eq 1 ]; then
   -    for H in `find $TMP/src | grep "\.h$"`; do
   -        BH=`basename "$H"`
   -        DH=`dirname "${H:3}"`
   -        
   +    for H in $(find $TMP/src | grep "\.h$"); do
   +        BH=$(basename "$H")
   +        DH=$(dirname "${H:3}")
   +
            if [ $t_ifdefs -eq 1 ]; then
                checkForIfdefs $H
            fi
   -    
   +
            #check that all classes are exported
            if [ $t_exports -eq 1 ]; then
   -                    if [ "${H:0:1}" == "_" ]; then
   -                            #internal headers... none must be exported
   -              XX=`awk '/^[ \t]*(class|struct)/ { print $line }' $H| grep -v 
";$"| grep -v CLUCENE_EXPORT| grep -v CLUCENE_INLINE_EXPORT| grep -v 
CLUCENE_SHARED_EXPORT| grep -v CLUCENE_SHARED_INLINE_EXPORT`
   -              if [ "$XX" == "" ]; then
   -                  echo "$H is internal but has exported class: $XX"
   -                  echo ""
   -                  FAIL=1
   -              fi
   -          else
   -            #external headers... all must be exported
   -              XX=`awk '/^[ \t]*(class|struct)/ { print $line }' $H| grep -v 
";$"| grep -v CLUCENE_EXPORT| grep -v CLUCENE_INLINE_EXPORT| grep -v 
CLUCENE_SHARED_EXPORT| grep -v CLUCENE_SHARED_INLINE_EXPORT`
   -              if [ "$XX" != "" ]; then
   -                  echo "$H has unexported class: $XX"
   -                  echo ""
   -                  FAIL=1
   -              fi
   -          fi
   +            if [ "${H:0:1}" == "_" ]; then
   +                #internal headers... none must be exported
   +                XX=$(awk '/^[ \t]*(class|struct)/ { print $line }' $H | 
grep -v ";$" | grep -v CLUCENE_EXPORT | grep -v CLUCENE_INLINE_EXPORT | grep -v 
CLUCENE_SHARED_EXPORT | grep -v CLUCENE_SHARED_INLINE_EXPORT)
   +                if [ "$XX" == "" ]; then
   +                    echo "$H is internal but has exported class: $XX"
   +                    echo ""
   +                    FAIL=1
   +                fi
   +            else
   +                #external headers... all must be exported
   +                XX=$(awk '/^[ \t]*(class|struct)/ { print $line }' $H | 
grep -v ";$" | grep -v CLUCENE_EXPORT | grep -v CLUCENE_INLINE_EXPORT | grep -v 
CLUCENE_SHARED_EXPORT | grep -v CLUCENE_SHARED_INLINE_EXPORT)
   +                if [ "$XX" != "" ]; then
   +                    echo "$H has unexported class: $XX"
   +                    echo ""
   +                    FAIL=1
   +                fi
   +            fi
            fi
   -        
   +
            #test that each header compiles independently...
            if [ $t_c_h -eq 1 ]; then
                echo "#include \"CLucene/StdHeader.h"\" >$TMP/pub-header.cpp
                echo "#include \"$H"\" >>$TMP/pub-header.cpp
                echo "int main(){ return 0; }" >>"$TMP/pub-header.cpp"
   -            ERROR=`g++ -I. -I$TMP/src/shared -I./src/shared -I../src/ext 
-I$TMP/src/core $TMP/pub-header.cpp`
   -            if [ $? -ne 0 ]; then 
   -              echo ""
   -                    echo "$H doesn't compile seperately..."
   -                    echo $ERROR
   -                    FAIL=1; 
   +            ERROR=$(g++ -I. -I$TMP/src/shared -I./src/shared -I../src/ext 
-I$TMP/src/core $TMP/pub-header.cpp)
   +            if [ $? -ne 0 ]; then
   +                echo ""
   +                echo "$H doesn't compile seperately..."
   +                echo $ERROR
   +                FAIL=1
                fi
            fi
        done
   -    
   -    
   +
        if [ $t_ifdefs -eq 1 ]; then
   -      echo "Not all ifdefs are invalid, you have to figure it out for 
yourself :-)"
   -      echo "If defs in classes which change depending on a user setting can 
cause big problems due to offset changes"
   -      echo "for example:"
   -      echo "class X {"
   -      echo " #ifdef _DEBUG"
   -      echo "  int x;"
   -      echo " #endif"
   -      echo " int y;"
   -      echo "}"
   -      echo "If the library is compiled with _DEBUG, and then a user calls y 
without _DEBUG defined, unexpected behaviour will occur"
   +        echo "Not all ifdefs are invalid, you have to figure it out for 
yourself :-)"
   +        echo "If defs in classes which change depending on a user setting 
can cause big problems due to offset changes"
   +        echo "for example:"
   +        echo "class X {"
   +        echo " #ifdef _DEBUG"
   +        echo "  int x;"
   +        echo " #endif"
   +        echo " int y;"
   +        echo "}"
   +        echo "If the library is compiled with _DEBUG, and then a user calls 
y without _DEBUG defined, unexpected behaviour will occur"
        fi
    fi
    
    #iterate all our code...
    if [ $t_license -eq 1 ]; then
   -    for H in `find ../src`; do
   -        BH=`basename "$H"`
   +    for H in $(find ../src); do
   +        BH=$(basename "$H")
            BH_len=${#BH}
   -        
   +
            if [ "${BH:BH_len-2}" == ".h" ] || [ "${BH:BH_len-2}" == ".c" ] || 
[ "${BH:BH_len-4}" == ".cpp" ]; then
   -                    
   -                    #snowball has its own license...
   -                    if [ "echo $H|grep 'snowball/src_c'" != "" ]; then
   -                            continue
   -                    fi
   -                    #snowball has its own license...
   -                    if [ "echo $H|grep 'libstemmer'" != "" ]; then
   -                            continue
   -                    fi
   -                    #zlib has its own license...
   -                    if [ "echo $H|grep 'CLucene/util/zlib'" != "" ]; then
   -                            continue
   -                    fi
   -                    
   -            if [ "`awk '/\* Copyright \(C\) [0-9]*-[0-9]* .*$/ { print 
$line }' $H`" == "" ]; then
   -                if [ "`awk '/\* Copyright [0-9]*-[0-9]* .*$/ { print $line 
}' $H`" == "" ]; then
   +
   +            #snowball has its own license...
   +            if [ "echo $H|grep 'snowball/src_c'" != "" ]; then
   +                continue
   +            fi
   +            #snowball has its own license...
   +            if [ "echo $H|grep 'libstemmer'" != "" ]; then
   +                continue
   +            fi
   +            #zlib has its own license...
   +            if [ "echo $H|grep 'CLucene/util/zlib'" != "" ]; then
   +                continue
   +            fi
   +
   +            if [ "$(awk '/\* Copyright \(C\) [0-9]*-[0-9]* .*$/ { print 
$line }' $H)" == "" ]; then
   +                if [ "$(awk '/\* Copyright [0-9]*-[0-9]* .*$/ { print $line 
}' $H)" == "" ]; then
                        echo "$H ($BH) has invalid license"
                        FAIL=1
                    fi
   @@ -205,35 +201,34 @@
        done
    fi
    
   -
    #test if headers can compile together by themselves:
    if [ $t_c_all -eq 1 ]; then
        g++ -I$TMP/src -I../src/ext -I$TMP/src/shared -I$TMP/src/core 
$TMP/pub-headers.cpp -I./src/shared
    fi
    
    if [ $t_inline -eq 1 ]; then
   -            if [ ! -d "./doc" ]; then
   -                    echo "Couldn't find docs, run:"
   -              echo "# cmake -DENABLE_CLDOCS:BOOLEAN=TRUE ."
   -              echo "# make doc"
   -              echo "and then try again"
   -              exit 1
   -            fi
   -    
   +    if [ ! -d "./doc" ]; then
   +        echo "Couldn't find docs, run:"
   +        echo "# cmake -DENABLE_CLDOCS:BOOLEAN=TRUE ."
   +        echo "# make doc"
   +        echo "and then try again"
   +        exit 1
   +    fi
   +
        INLINES=0
   -    grep -c "\[inline" doc/html/*.html|grep -v ":0$"|grep -v "util"|grep -v 
"jstreams" | while read line; do
   -    
   +    grep -c "\[inline" doc/html/*.html | grep -v ":0$" | grep -v "util" | 
grep -v "jstreams" | while read line; do
   +
            #ignore some actual inlines...
            if [ "doc/html/classlucene_1_1index_1_1Term.html:1" == $line ]; then
   -            continue;
   +            continue
            fi
            if [ "doc/html/classlucene_1_1search_1_1Similarity.html:1" == $line 
]; then
   -            continue;
   +            continue
            fi
            if [ "doc/html/classlucene_1_1store_1_1BufferedIndexInput.html:1" 
== $line ]; then
   -            continue;
   +            continue
            fi
   -        
   +
            if [ $INLINES -eq 0 ]; then
                echo "These files report inline code:"
                INLINES=1
   @@ -246,25 +241,23 @@
    if [ $t_compile -eq 1 ]; then
        #compile serperately
        make cl_test
   -    if [ $? -ne 0 ]; then 
   -        FAIL=1; 
   +    if [ $? -ne 0 ]; then
   +        FAIL=1
        fi
   -    
   +
        echo "Undefines for shared lib:"
   -    nm -u --demangle bin/libclucene-shared.so |grep -E "lucene::"
   +    nm -u --demangle bin/libclucene-shared.so | grep -E "lucene::"
        echo "Undefines for core lib:"
   -    nm -u --demangle bin/libclucene-core.so |grep -E "lucene::"|grep -v 
"lucene::util::Misc" |grep -v "lucene::util::mutex" |grep -v 
"lucene::util::StringBuffer"|grep -v "lucene::util::shared_condition"
   +    nm -u --demangle bin/libclucene-core.so | grep -E "lucene::" | grep -v 
"lucene::util::Misc" | grep -v "lucene::util::mutex" | grep -v 
"lucene::util::StringBuffer" | grep -v "lucene::util::shared_condition"
    
        #compile together
        make test-all
   -    if [ $? -ne 0 ]; then 
   -        FAIL=1; 
   +    if [ $? -ne 0 ]; then
   +        FAIL=1
        fi
   -    
   -    
   +
    fi
    
   -
    if [ $FAIL == 1 ]; then
        echo "There were errors, please correct them and re-run"
        exit 1
   --- 
be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh.orig
   +++ be/src/clucene/src/contribs/bashscripts/findPatchThatBrokeUnitTest.sh
   @@ -8,7 +8,7 @@
    # This goes on until the unit test is not present or runs successfully.
    
    # check the arguments
   -if (( $# != 1 && $# != 2)); then
   +if (($# != 1 && $# != 2)); then
        echo Usage: $0 testname
        echo Note: This script must be run from the base
        exit
   @@ -32,7 +32,7 @@
    FORCEFULLBUILD=0
    
    #get the source dir
   -SOURCEDIR=`grep CMAKE_HOME_DIRECTORY CMakeCache.txt |perl -pi -e 
's/.*=(.*)/\1/'`
   +SOURCEDIR=$(grep CMAKE_HOME_DIRECTORY CMakeCache.txt | perl -pi -e 
's/.*=(.*)/\1/')
    if [ "$SOURCEDIR" == "" ]; then
        echo "Run cmake before running this script"
        exit 1
   @@ -44,44 +44,43 @@
    function runTest {
        REVISION=$1
        echo Testing revision $REVISION.
   -    
   -    
   +
        exit 0
    
        # go back to the given revision
        cd $TESTDIR
        svn update $MODULE -r $REVISION $SOURCEDIR
   -    if (( $? != 0 )); then
   +    if (($? != 0)); then
            # if updating failed, we have to get a fresh version
            rm -rf $TESTDIR/$MODULE
            svn checkout -r $REVISION $SVNURL $SOURCEDIR
   -        if (( $? != 0 )); then exit; fi
   +        if (($? != 0)); then exit; fi
        fi
    
        # configure the code
        # if we cannot configure the test, we continue to the next revision 
number
   -    if (( $FORCEFULLBUILD == 1 )); then
   +    if (($FORCEFULLBUILD == 1)); then
            rm -rf $TESTDIR/$MODULE/build
        fi
        mkdir $TESTDIR/$MODULE/build
        cd $TESTDIR/$MODULE/build
        cmake $SOURCEDIR
   -    if (( $? != 0 )); then return; fi
   +    if (($? != 0)); then return; fi
    
        # get the name of the unit test and build it
        # if we cannot build the test, we continue to the next revision number
        echo $MAKE $TESTNAME
        $MAKE $TESTNAME
   -    if (( $? != 0 )); then return; fi
   +    if (($? != 0)); then return; fi
    
        # find the test executable
   -    TESTPATH=`find -name $TESTNAME -type f -perm -u+x`
   +    TESTPATH=$(find -name $TESTNAME -type f -perm -u+x)
    
        # run the unit test and exit if it ran without error
        $TESTPATH
   -    if (( $? == 0 )); then
   +    if (($? == 0)); then
            echo The last revision where the test $TESTNAME worked was 
$REVISION.
   -        BROKEN=`grep -B 1 $REVISION $TESTDIR/revisions |head -1`
   +        BROKEN=$(grep -B 1 $REVISION $TESTDIR/revisions | head -1)
            echo The first revision that was broken was $BROKEN:
            svn log -r $BROKEN $TESTDIR/$MODULE $SOURCEDIR
            exit
   @@ -89,25 +88,23 @@
    }
    
    # determine the URL of the svn repository
   -SVNURL=`svn info $SOURCEDIR | grep -m 1 '^URL: ' | cut -b 6-`
   -if (( $? != 0 )); then exit; fi
   +SVNURL=$(svn info $SOURCEDIR | grep -m 1 '^URL: ' | cut -b 6-)
   +if (($? != 0)); then exit; fi
    
    echo $SVNURL
    
    # determine the module name
   -MODULE=`basename $SVNURL`
   +MODULE=$(basename $SVNURL)
    
    echo $MODULE
    
    # get the last 100 relevant version numbers
   -svn log $MODULE --limit $MAXLOGENTRIES --non-interactive $SOURCEDIR\
   -    | grep -E '^r[0123456789]+' \
   -    | perl -pi -e 's/^r(\d+).*/\1/' | head -n $MAXSTEPS > revisions
   -if (( $? != 0 )); then exit; fi
   +svn log $MODULE --limit $MAXLOGENTRIES --non-interactive $SOURCEDIR | grep 
-E '^r[0123456789]+' |
   +    perl -pi -e 's/^r(\d+).*/\1/' | head -n $MAXSTEPS >revisions
   +if (($? != 0)); then exit; fi
    
   -for REVISION in `cat revisions`; do
   -    runTest $REVISION;
   +for REVISION in $(cat revisions); do
   +    runTest $REVISION
    done
    
    echo No revision was found in which the unit test worked.
   -
   --- be/src/clucene/src/contribs/bashscripts/simpleupdate.sh.orig
   +++ be/src/clucene/src/contribs/bashscripts/simpleupdate.sh
   @@ -8,11 +8,11 @@
        exit 1
    }
    
   -STRIGICMD="`find -type f -name strigicmd -type f -perm -o+x` "
   +STRIGICMD="$(find -type f -name strigicmd -type f -perm -o+x) "
    echo Using $STRIGICMD
    NTHREADS=1
    
   -rm -r x y 2> /dev/null
   +rm -r x y 2>/dev/null
    mkdir x
    touch x/y
    touch x/z
   @@ -33,7 +33,7 @@
    if ! $STRIGICMD listFiles -t clucene -d y; then
        fail
    fi
   -OUT=`$STRIGICMD listFiles -t clucene -d y`
   +OUT=$($STRIGICMD listFiles -t clucene -d y)
    if [[ $OUT == $'x\nx/z' ]]; then
        echo Test succesfull
        exit 0
   --- be/src/clucene/src/contribs/bashscripts/twofileupdate.sh.orig
   +++ be/src/clucene/src/contribs/bashscripts/twofileupdate.sh
   @@ -34,7 +34,7 @@
    if ! $VG src/strigicmd/strigicmd listFiles -t clucene -d y; then
        fail
    fi
   -OUT=`$VG src/strigicmd/strigicmd listFiles -t clucene -d y`
   +OUT=$($VG src/strigicmd/strigicmd listFiles -t clucene -d y)
    if [[ $OUT == 'x/z' ]]; then
        echo Test succesfull
        exit 0
   ----------
   
   You can reformat the above files to meet shfmt's requirements by typing:
   
     shfmt  -w filename
   
   
   ```
   </details>
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org


Reply via email to