From 98b06aef28c576333b4447d642c23cae1ef976c2 Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Tue, 20 Jun 2017 10:46:14 -0700 Subject: [PATCH] build: split up cpplint to avoid long cmd lines PR-URL: https://github.com/nodejs/node-chakracore/pull/330 Reviewed-By: Refael Ackermann --- vcbuild.bat | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/vcbuild.bat b/vcbuild.bat index f0d6baa0003..e8490ca2d44 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -465,12 +465,17 @@ goto cpplint :cpplint if not defined cpplint goto jslint -echo running cpplint +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 +call :run-cpplint %chakra_cpplint% +call :run-python tools/check-imports.py +goto jslint + +:run-cpplint +if "%*"=="" goto exit +echo running cpplint '%*' set cppfilelist= setlocal enabledelayedexpansion -for /f "tokens=*" %%G in ('dir /b /s /a 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 %chakra_cpplint%') do ( +for /f "tokens=*" %%G in ('dir /b /s /a %*') do ( set relpath=%%G set relpath=!relpath:*%~dp0=! call :add-to-list !relpath! @@ -479,8 +484,7 @@ test\gc\binding.cc tools\icu\*.cc tools\icu\*.h %chakra_cpplint%') do ( set cppfilelist=%localcppfilelist% ) call :run-python tools/cpplint.py %cppfilelist% -call :run-python tools/check-imports.py -goto jslint +goto exit :add-to-list echo %1 | findstr /b /c:"src\node_root_certs.h" > nul 2>&1