Skip to content

Commit fd845d8

Browse files
kfarnungMylesBorins
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 <reis@janeasystems.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
1 parent 15e07b8 commit fd845d8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

vcbuild.bat

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ if /i "%1"=="test-v8" set test_v8=1&set custom_v8_test=1&goto arg-ok
9292
if /i "%1"=="test-v8-intl" set test_v8_intl=1&set custom_v8_test=1&goto arg-ok
9393
if /i "%1"=="test-v8-benchmarks" set test_v8_benchmarks=1&set custom_v8_test=1&goto arg-ok
9494
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
95+
if /i "%1"=="lint-cpp" set lint_cpp=1&goto arg-ok
9596
if /i "%1"=="lint-js" set lint_js=1&goto arg-ok
9697
if /i "%1"=="jslint" set lint_js=1&echo Please use lint-js instead of jslint&goto arg-ok
9798
if /i "%1"=="lint-js-ci" set lint_js_ci=1&goto arg-ok
@@ -507,22 +508,23 @@ call :run-python tools/cpplint.py %cppfilelist% > nul
507508
goto exit
508509

509510
:add-to-list
510-
echo %1 | findstr /c:"src\node_root_certs.h"
511+
@rem Subroutine used to filter items from the cpplint file list
512+
echo %1 | findstr /c:"src\node_root_certs.h" > nul 2>&1
511513
if %errorlevel% equ 0 goto exit
512514

513-
echo %1 | findstr /r /c:"src\\tracing\\trace_event.h"
515+
echo %1 | findstr /c:"src\tracing\trace_event.h" > nul 2>&1
514516
if %errorlevel% equ 0 goto exit
515517

516-
echo %1 | findstr /r /c:"src\\tracing\\trace_event_common.h"
518+
echo %1 | findstr /c:"src\tracing\trace_event_common.h" > nul 2>&1
517519
if %errorlevel% equ 0 goto exit
518520

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

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

525-
echo %1 | findstr /c:"test\\addons-napi\\common.h"
527+
echo %1 | findstr /c:"test\addons-napi\common.h" > nul 2>&1
526528
if %errorlevel% equ 0 goto exit
527529

528530
set "localcppfilelist=%localcppfilelist% %1"

0 commit comments

Comments
 (0)