From 58c13eb38adfd50608c543dc03172461b98c1c0c Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Fri, 5 Jan 2018 18:19:36 -0800 Subject: [PATCH 1/2] build: update lint-cpp on Windows * Added a `lint-cpp` argument * Updated `findstr` calls to output to `nul` * Updated `findstr` calls to only use `/r` when the input is a regex --- vcbuild.bat | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vcbuild.bat b/vcbuild.bat index e7e392a69203dd..f5d12af79f301f 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -90,6 +90,7 @@ if /i "%1"=="test-v8" set test_v8=1&set custom_v8_test=1&goto arg-ok if /i "%1"=="test-v8-intl" set test_v8_intl=1&set custom_v8_test=1&goto arg-ok if /i "%1"=="test-v8-benchmarks" set test_v8_benchmarks=1&set custom_v8_test=1&goto arg-ok if /i "%1"=="test-v8-all" set test_v8=1&set test_v8_intl=1&set test_v8_benchmarks=1&set custom_v8_test=1&goto arg-ok +if /i "%1"=="lint-cpp" set lint_cpp=1&goto arg-ok if /i "%1"=="lint-js" set lint_js=1&goto arg-ok if /i "%1"=="jslint" set lint_js=1&echo Please use lint-js instead of jslint&goto arg-ok if /i "%1"=="lint-js-ci" set lint_js_ci=1&goto arg-ok @@ -480,22 +481,22 @@ call :run-python tools/cpplint.py %cppfilelist% > nul goto exit :add-to-list -echo %1 | findstr /c:"src\node_root_certs.h" +echo %1 | findstr /c:"src\node_root_certs.h" > nul 2>&1 if %errorlevel% equ 0 goto exit -echo %1 | findstr /r /c:"src\\tracing\\trace_event.h" +echo %1 | findstr /c:"src\tracing\trace_event.h" > nul 2>&1 if %errorlevel% equ 0 goto exit -echo %1 | findstr /r /c:"src\\tracing\\trace_event_common.h" +echo %1 | findstr /c:"src\tracing\trace_event_common.h" > nul 2>&1 if %errorlevel% equ 0 goto exit -echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.h" +echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.h" > nul 2>&1 if %errorlevel% equ 0 goto exit -echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.cc" +echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.cc" > nul 2>&1 if %errorlevel% equ 0 goto exit -echo %1 | findstr /c:"test\\addons-napi\\common.h" +echo %1 | findstr /c:"test\addons-napi\common.h" > nul 2>&1 if %errorlevel% equ 0 goto exit set "localcppfilelist=%localcppfilelist% %1" From 2a56d413db955b695517d8b445a45e316fd79357 Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Tue, 16 Jan 2018 11:16:49 -0800 Subject: [PATCH 2/2] [squash] Add comment to subroutine --- vcbuild.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/vcbuild.bat b/vcbuild.bat index f5d12af79f301f..fcb22e6945b51f 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -481,6 +481,7 @@ call :run-python tools/cpplint.py %cppfilelist% > nul goto exit :add-to-list +@rem Subroutine used to filter items from the cpplint file list echo %1 | findstr /c:"src\node_root_certs.h" > nul 2>&1 if %errorlevel% equ 0 goto exit