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>
This commit is contained in:
parent
8206a01c99
commit
d48472c20f
15
vcbuild.bat
15
vcbuild.bat
@ -435,12 +435,16 @@ goto cpplint
|
|||||||
|
|
||||||
:cpplint
|
:cpplint
|
||||||
if not defined cpplint goto jslint
|
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=
|
set cppfilelist=
|
||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
for /f "tokens=*" %%G in ('dir /b /s /a src\*.c src\*.cc src\*.h ^
|
for /f "tokens=*" %%G in ('dir /b /s /a %*') do (
|
||||||
test\addons\*.cc test\addons\*.h test\cctest\*.cc test\cctest\*.h ^
|
|
||||||
test\gc\binding.cc tools\icu\*.cc tools\icu\*.h') do (
|
|
||||||
set relpath=%%G
|
set relpath=%%G
|
||||||
set relpath=!relpath:*%~dp0=!
|
set relpath=!relpath:*%~dp0=!
|
||||||
call :add-to-list !relpath!
|
call :add-to-list !relpath!
|
||||||
@ -449,8 +453,7 @@ test\gc\binding.cc tools\icu\*.cc tools\icu\*.h') do (
|
|||||||
set cppfilelist=%localcppfilelist%
|
set cppfilelist=%localcppfilelist%
|
||||||
)
|
)
|
||||||
call :run-python tools/cpplint.py %cppfilelist%
|
call :run-python tools/cpplint.py %cppfilelist%
|
||||||
call :run-python tools/check-imports.py
|
goto exit
|
||||||
goto jslint
|
|
||||||
|
|
||||||
:add-to-list
|
:add-to-list
|
||||||
echo %1 | findstr /c:"src\node_root_certs.h"
|
echo %1 | findstr /c:"src\node_root_certs.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user