Skip to content

Commit 2c4e021

Browse files
kfarnungevanlucas
authored andcommitted
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 1dcae57 commit 2c4e021

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
@@ -93,6 +93,7 @@ if /i "%1"=="test-v8" set test_v8=1&set custom_v8_test=1&goto arg-ok
9393
if /i "%1"=="test-v8-intl" set test_v8_intl=1&set custom_v8_test=1&goto arg-ok
9494
if /i "%1"=="test-v8-benchmarks" set test_v8_benchmarks=1&set custom_v8_test=1&goto arg-ok
9595
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
96+
if /i "%1"=="lint-cpp" set lint_cpp=1&goto arg-ok
9697
if /i "%1"=="lint-js" set lint_js=1&goto arg-ok
9798
if /i "%1"=="jslint" set lint_js=1&echo Please use lint-js instead of jslint&goto arg-ok
9899
if /i "%1"=="lint-js-ci" set lint_js_ci=1&goto arg-ok
@@ -512,22 +513,23 @@ call :run-python tools/cpplint.py %cppfilelist% > nul
512513
goto exit
513514

514515
:add-to-list
515-
echo %1 | findstr /c:"src\node_root_certs.h"
516+
@rem Subroutine used to filter items from the cpplint file list
517+
echo %1 | findstr /c:"src\node_root_certs.h" > nul 2>&1
516518
if %errorlevel% equ 0 goto exit
517519

518-
echo %1 | findstr /r /c:"src\\tracing\\trace_event.h"
520+
echo %1 | findstr /c:"src\tracing\trace_event.h" > nul 2>&1
519521
if %errorlevel% equ 0 goto exit
520522

521-
echo %1 | findstr /r /c:"src\\tracing\\trace_event_common.h"
523+
echo %1 | findstr /c:"src\tracing\trace_event_common.h" > nul 2>&1
522524
if %errorlevel% equ 0 goto exit
523525

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

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

530-
echo %1 | findstr /c:"test\\addons-napi\\common.h"
532+
echo %1 | findstr /c:"test\addons-napi\common.h" > nul 2>&1
531533
if %errorlevel% equ 0 goto exit
532534

533535
set "localcppfilelist=%localcppfilelist% %1"

0 commit comments

Comments
 (0)