diff --git a/.gitignore b/.gitignore index b41ca378ac..5be47ba928 100644 --- a/.gitignore +++ b/.gitignore @@ -246,3 +246,8 @@ javascript/new-src/node_modules .cproject .settings .vscode/ +# QtCreator project files +*.config +*.creator* +*.files +*.includes diff --git a/.travis-ci.sh b/.travis-ci.sh index 466503673f..16df5a7da4 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -11,7 +11,19 @@ COVERITY_SCAN_BUILD_URL="https://scan.coverity.com/scripts/travisci_build_coveri PYCHECKER_BLACKLIST="threading,unittest,cmd,optparse,google,google.protobuf,ssl,fftpack,lapack_lite,mtrand" -SPELLINGBLACKLIST=$(cat <<-BLACKLIST +LINT_BLACKLIST=$(cat <<-EO_LINT_BL + -wholename "./common/protocol/Ola.pb.*" -or \ + -wholename "./common/rpc/Rpc.pb.*" -or \ + -wholename "./common/rpc/TestService.pb.*" -or \ + -wholename "./common/rdm/Pids.pb.*" -or \ + -wholename "./config.h" -or \ + -wholename "./plugins/*/messages/*ConfigMessages.pb.*" -or \ + -wholename "./tools/ola_trigger/config.tab.*" -or \ + -wholename "./tools/ola_trigger/lex.yy.cpp" +EO_LINT_BL +) + +SPELLING_BLACKLIST=$(cat <<-EO_SPELL_BL -wholename "./.codespellignore" -or \ -wholename "./.git/*" -or \ -wholename "./aclocal.m4" -or \ @@ -43,7 +55,7 @@ SPELLINGBLACKLIST=$(cat <<-BLACKLIST -wholename "./plugins/artnet/messages/ArtNetConfigMessages.pb.*" -or \ -wholename "./tools/ola_trigger/config.tab.*" -or \ -wholename "./tools/ola_trigger/lex.yy.cpp" -BLACKLIST +EO_SPELL_BL ) if [[ $TASK = 'lint' ]]; then @@ -69,19 +81,12 @@ if [[ $TASK = 'lint' ]]; then echo "Found $nolints generic NOLINTs" fi; # then fetch and run the main cpplint tool + lintfiles=$(eval "find ./ \( -name "*.h" -or -name "*.cpp" \) -and ! \( $LINT_BLACKLIST \) | xargs") wget -O cpplint.py $CPP_LINT_URL; chmod u+x cpplint.py; ./cpplint.py \ --filter=-legal/copyright,-readability/streams,-runtime/arrays \ - $(find ./ \( -name "*.h" -or -name "*.cpp" \) -and ! \( \ - -wholename "./common/protocol/Ola.pb.*" -or \ - -wholename "./common/rpc/Rpc.pb.*" -or \ - -wholename "./common/rpc/TestService.pb.*" -or \ - -wholename "./common/rdm/Pids.pb.*" -or \ - -wholename "./config.h" -or \ - -wholename "./plugins/*/messages/*ConfigMessages.pb.*" -or \ - -wholename "./tools/ola_trigger/config.tab.*" -or \ - -wholename "./tools/ola_trigger/lex.yy.cpp" \) | xargs) + $lintfiles if [[ $? -ne 0 ]]; then exit 1; fi; @@ -116,7 +121,7 @@ elif [[ $TASK = 'spellintian' ]]; then make builtfiles; travis_fold end "make_builtfiles" spellingfiles=$(eval "find ./ -type f -and ! \( \ - $SPELLINGBLACKLIST \ + $SPELLING_BLACKLIST \ \) | xargs") # count the number of spellintian errors, ignoring duplicate words spellingerrors=$(zrun spellintian $spellingfiles 2>&1 | grep -v "\(duplicate word\)" | wc -l) @@ -142,7 +147,7 @@ elif [[ $TASK = 'spellintian-duplicates' ]]; then make builtfiles; travis_fold end "make_builtfiles" spellingfiles=$(eval "find ./ -type f -and ! \( \ - $SPELLINGBLACKLIST \ + $SPELLING_BLACKLIST \ \) | xargs") # count the number of spellintian errors spellingerrors=$(zrun spellintian $spellingfiles 2>&1 | wc -l) @@ -168,7 +173,7 @@ elif [[ $TASK = 'codespell' ]]; then make builtfiles; travis_fold end "make_builtfiles" spellingfiles=$(eval "find ./ -type f -and ! \( \ - $SPELLINGBLACKLIST \ + $SPELLING_BLACKLIST \ \) | xargs") # count the number of codespell errors spellingerrors=$(zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" --exclude-file .codespellignore $spellingfiles 2>&1 | wc -l) diff --git a/plugins/convert_README_to_header.sh b/plugins/convert_README_to_header.sh index 86b1b42f09..e7bf244828 100755 --- a/plugins/convert_README_to_header.sh +++ b/plugins/convert_README_to_header.sh @@ -30,7 +30,8 @@ outfilename=`basename $outfile`; # See http://stackoverflow.com/a/16576291 # On Mac OS's sed, \n is not recognized as a newline character, but # \[actual newline] works -desc=`sed -e ':a' -e 'N' -e '$!ba' -e 's/\"/\\\"/g' -e 's/\n/\\\\n"\\ +desc=`sed -e ':a' -e 'N' -e '$!ba' -e 's/\\\/\\\\\\\/g' -e 's/\"/\\\"/g'\ + -e 's/\n/\\\\n"\\ "/g' "$path/README.md"`; identifier=`echo "PLUGINS_${plugin}_${outfilename%.h}_H_" | tr '[:lower:]' '[:upper:]'`