@@ -72,6 +72,7 @@ if /i "%1"=="test-all" set test_args=%test_args% sequential parallel messag
|
72 | 72 | if /i "%1"=="test-known-issues" set test_args=%test_args% known_issues&goto arg-ok |
73 | 73 | if /i "%1"=="jslint" set jslint=1&goto arg-ok |
74 | 74 | if /i "%1"=="jslint-ci" set jslint_ci=1&goto arg-ok |
| 75 | +if /i "%1"=="cpplint" set cpplint=1&goto arg-ok |
75 | 76 | if /i "%1"=="lint" set cpplint=1&set jslint=1&goto arg-ok |
76 | 77 | if /i "%1"=="lint-ci" set cpplint=1&set jslint_ci=1&goto arg-ok |
77 | 78 | if /i "%1"=="package" set package=1&goto arg-ok |
@@ -347,22 +348,25 @@ goto cpplint
|
347 | 348 | |
348 | 349 | :cpplint |
349 | 350 | if not defined cpplint goto jslint |
350 | | -echo running cpplint |
| 351 | +call :run-cpplint src\*.c src\*.cc src\*.h test\addons\*.cc test\addons\*.h test\cctest\*.cc test\cctest\*.h tools\icu\*.cc tools\icu\*.h |
| 352 | +call :run-python tools/check-imports.py |
| 353 | +goto jslint |
| 354 | + |
| 355 | +:run-cpplint |
| 356 | +if "%*"=="" goto exit |
| 357 | +echo running cpplint '%*' |
351 | 358 | set cppfilelist= |
352 | 359 | setlocal enabledelayedexpansion |
353 | | -for /f "tokens=*" %%G in ('dir /b /s /a src\*.c src\*.cc src\*.h ^ |
354 | | -test\addons\*.cc test\addons\*.h test\cctest\*.cc test\cctest\*.h ^ |
355 | | -test\gc\binding.cc tools\icu\*.cc tools\icu\*.h') do ( |
| 360 | +for /f "tokens=*" %%G in ('dir /b /s /a %*') do ( |
356 | 361 | set relpath=%%G |
357 | 362 | set relpath=!relpath:*%~dp0=! |
358 | 363 | call :add-to-list !relpath! |
359 | 364 | ) |
360 | 365 | ( endlocal |
361 | 366 | set cppfilelist=%localcppfilelist% |
362 | 367 | ) |
363 | | -python tools/cpplint.py %cppfilelist% |
364 | | -python tools/check-imports.py |
365 | | -goto jslint |
| 368 | +call :run-python tools/cpplint.py %cppfilelist% |
| 369 | +goto exit |
366 | 370 | |
367 | 371 | :add-to-list |
368 | 372 | echo %1 | findstr /c:"src\node_root_certs.h" |
|