Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
build: split up cpplint to avoid long cmd lines
Browse files Browse the repository at this point in the history
PR-URL: #330
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
kfarnung committed Jul 6, 2017
1 parent fbc9efa commit fa7db0b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,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%
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!
Expand All @@ -476,8 +481,7 @@ test\gc\binding.cc tools\icu\*.cc tools\icu\*.h %chakra_cpplint%') do (
set cppfilelist=%localcppfilelist%
)
python tools/cpplint.py %cppfilelist%
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
Expand Down

0 comments on commit fa7db0b

Please sign in to comment.