phrocker commented on a change in pull request #555: MINIFICPP-280: Adding 
extension linters
URL: https://github.com/apache/nifi-minifi-cpp/pull/555#discussion_r284748632
 
 

 ##########
 File path: thirdparty/google-styleguide/run_linter.sh
 ##########
 @@ -14,12 +15,31 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-# ./run_linter <includedir> <srcdir>
-#!/bin/bash
-if [ "$(uname)" == "Darwin" ]; then
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+# ./run_linter <includedir1> <includedir2> ... <includedirN> -- <srcdir1> 
<srcdir2> ... <srcdirN>
+
+if [[ "$(uname)" == "Darwin" ]]; then
+    SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 else
-SCRIPT=$(readlink -f $0)
-SCRIPT_DIR=`dirname $SCRIPT`
+    SCRIPT=$(readlink -f $0)
+    SCRIPT_DIR=`dirname $SCRIPT`
 fi
-python ${SCRIPT_DIR}/cpplint.py --linelength=200 --extensions=cpp --recursive 
${1}/*
+
+while (( $# )) ; do
+    [ x"$1" == x"--" ] && break
+    INCLUDE_DIRS="$INCLUDE_DIRS $1"
+    shift
+done
+
+while (( $# )) ; do
+    SOURCE_DIRS="$SOURCE_DIRS $1"
+    shift
+done
+
+[ x"$INCLUDE_DIRS" == x"" ] && echo "WARNING: No include directories 
specified."
+[ x"$SOURCE_DIRS" == x"" ] && echo "ERROR: No source directories specified." 
&& exit 1
+
+HEADERS=`find $INCLUDE_DIRS -name '*.h' | sort | uniq | tr '\n' ','`
+SOURCES=`find $SOURCE_DIRS -name  '*.cpp' | sort | uniq | tr '\n' ' '`
+echo ${HEADERS}
 
 Review comment:
   I will remove it. It was not in the original file. Thanks!

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to