Skip to content

Commit cd60c7d

Browse files
committedJan 17, 2018
build,win: 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 PR-URL: #18012 Reviewed-By: João Reis <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent e08cf1d commit cd60c7d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
 

‎vcbuild.bat

+8-6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ if /i "%1"=="test-v8" set test_v8=1&set custom_v8_test=1&goto arg-ok
9090
if /i "%1"=="test-v8-intl" set test_v8_intl=1&set custom_v8_test=1&goto arg-ok
9191
if /i "%1"=="test-v8-benchmarks" set test_v8_benchmarks=1&set custom_v8_test=1&goto arg-ok
9292
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
93+
if /i "%1"=="lint-cpp" set lint_cpp=1&goto arg-ok
9394
if /i "%1"=="lint-js" set lint_js=1&goto arg-ok
9495
if /i "%1"=="jslint" set lint_js=1&echo Please use lint-js instead of jslint&goto arg-ok
9596
if /i "%1"=="lint-js-ci" set lint_js_ci=1&goto arg-ok
@@ -481,22 +482,23 @@ call :run-python tools/cpplint.py %cppfilelist% > nul
481482
goto exit
482483

483484
:add-to-list
484-
echo %1 | findstr /c:"src\node_root_certs.h"
485+
@rem Subroutine used to filter items from the cpplint file list
486+
echo %1 | findstr /c:"src\node_root_certs.h" > nul 2>&1
485487
if %errorlevel% equ 0 goto exit
486488

487-
echo %1 | findstr /r /c:"src\\tracing\\trace_event.h"
489+
echo %1 | findstr /c:"src\tracing\trace_event.h" > nul 2>&1
488490
if %errorlevel% equ 0 goto exit
489491

490-
echo %1 | findstr /r /c:"src\\tracing\\trace_event_common.h"
492+
echo %1 | findstr /c:"src\tracing\trace_event_common.h" > nul 2>&1
491493
if %errorlevel% equ 0 goto exit
492494

493-
echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.h"
495+
echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.h" > nul 2>&1
494496
if %errorlevel% equ 0 goto exit
495497

496-
echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.cc"
498+
echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.cc" > nul 2>&1
497499
if %errorlevel% equ 0 goto exit
498500

499-
echo %1 | findstr /c:"test\\addons-napi\\common.h"
501+
echo %1 | findstr /c:"test\addons-napi\common.h" > nul 2>&1
500502
if %errorlevel% equ 0 goto exit
501503

502504
set "localcppfilelist=%localcppfilelist% %1"

0 commit comments

Comments
 (0)
Please sign in to comment.