summaryrefslogtreecommitdiff
path: root/vcbuild.bat
diff options
context:
space:
mode:
authorKyle Farnung <kfarnung@microsoft.com>2017-07-06 16:03:27 -0700
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2017-07-19 15:02:20 -0400
commit23a66b289fcd4e79099348895debe4f84dc86fb1 (patch)
treed7cdfde931bc77c5a294fab77d0095479aa281fb /vcbuild.bat
parent9675734bf306f7b612e9555b7364a7723dbde550 (diff)
downloadnode-new-23a66b289fcd4e79099348895debe4f84dc86fb1.tar.gz
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: https://github.com/nodejs/node/pull/14116 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Kunal Pathak <kunal.pathak@microsoft.com> Reviewed-By: João Reis <reis@janeasystems.com>
Diffstat (limited to 'vcbuild.bat')
-rw-r--r--vcbuild.bat15
1 files changed, 9 insertions, 6 deletions
diff --git a/vcbuild.bat b/vcbuild.bat
index 0af8047e4a..03cf82565d 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -435,12 +435,16 @@ 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-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') do (
+for /f "tokens=*" %%G in ('dir /b /s /a %*') do (
set relpath=%%G
set relpath=!relpath:*%~dp0=!
call :add-to-list !relpath!
@@ -449,8 +453,7 @@ test\gc\binding.cc tools\icu\*.cc tools\icu\*.h') 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 /c:"src\node_root_certs.h"