Skip to content

Commit 9ee271d

Browse files
kfarnungaddaleax
authored andcommittedJul 18, 2017
build: split up cpplint to avoid long cmd lines
Refactors cpplint slightly to allow multiple runs of it. This allows downstream projects to run cpplint on their dependencies. PR-URL: #14116 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Kunal Pathak <[email protected]> Reviewed-By: João Reis <[email protected]>
1 parent 897405d commit 9ee271d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed
 

‎vcbuild.bat

+9-6
Original file line numberDiff line numberDiff line change
@@ -435,12 +435,16 @@ goto cpplint
435435

436436
:cpplint
437437
if not defined cpplint goto jslint
438-
echo running cpplint
438+
call :run-cpplint src\*.c src\*.cc src\*.h test\addons\*.cc test\addons\*.h test\cctest\*.cc test\cctest\*.h test\gc\binding.cc tools\icu\*.cc tools\icu\*.h
439+
call :run-python tools/check-imports.py
440+
goto jslint
441+
442+
:run-cpplint
443+
if "%*"=="" goto exit
444+
echo running cpplint '%*'
439445
set cppfilelist=
440446
setlocal enabledelayedexpansion
441-
for /f "tokens=*" %%G in ('dir /b /s /a src\*.c src\*.cc src\*.h ^
442-
test\addons\*.cc test\addons\*.h test\cctest\*.cc test\cctest\*.h ^
443-
test\gc\binding.cc tools\icu\*.cc tools\icu\*.h') do (
447+
for /f "tokens=*" %%G in ('dir /b /s /a %*') do (
444448
set relpath=%%G
445449
set relpath=!relpath:*%~dp0=!
446450
call :add-to-list !relpath!
@@ -449,8 +453,7 @@ test\gc\binding.cc tools\icu\*.cc tools\icu\*.h') do (
449453
set cppfilelist=%localcppfilelist%
450454
)
451455
call :run-python tools/cpplint.py %cppfilelist%
452-
call :run-python tools/check-imports.py
453-
goto jslint
456+
goto exit
454457

455458
:add-to-list
456459
echo %1 | findstr /c:"src\node_root_certs.h"

0 commit comments

Comments
 (0)