build: use generic names for linting tasks · nodejs/node@252d08a

@@ -26,8 +26,8 @@ set package=

2626

set msi=

2727

set upload=

2828

set licensertf=

29-

set jslint=

30-

set cpplint=

29+

set lint_js=

30+

set lint_cpp=

3131

set buildnodeweak=

3232

set noetw=

3333

set noetw_msi_arg=

@@ -58,7 +58,7 @@ if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok

5858

if /i "%1"=="noetw" set noetw=1&goto arg-ok

5959

if /i "%1"=="noperfctr" set noperfctr=1&goto arg-ok

6060

if /i "%1"=="licensertf" set licensertf=1&goto arg-ok

61-

if /i "%1"=="test" set test_args=%test_args% doctool known_issues message parallel sequential addons -J&set cpplint=1&set jslint=1&set build_addons=1&goto arg-ok

61+

if /i "%1"=="test" set test_args=%test_args% doctool known_issues message parallel sequential addons -J&set lint_cpp=1&set lint_js=1&set build_addons=1&goto arg-ok

6262

if /i "%1"=="test-ci" set test_args=%test_args% %test_ci_args% -p tap --logfile test.tap doctool inspector known_issues message sequential parallel addons&set cctest_args=%cctest_args% --gtest_output=tap:cctest.tap&set build_addons=1&goto arg-ok

6363

if /i "%1"=="test-addons" set test_args=%test_args% addons&set build_addons=1&goto arg-ok

6464

if /i "%1"=="test-simple" set test_args=%test_args% sequential parallel -J&goto arg-ok

@@ -68,13 +68,16 @@ if /i "%1"=="test-inspector" set test_args=%test_args% inspector&goto arg-ok

6868

if /i "%1"=="test-tick-processor" set test_args=%test_args% tick-processor&goto arg-ok

6969

if /i "%1"=="test-internet" set test_args=%test_args% internet&goto arg-ok

7070

if /i "%1"=="test-pummel" set test_args=%test_args% pummel&goto arg-ok

71-

if /i "%1"=="test-all" set test_args=%test_args% sequential parallel message gc inspector internet pummel&set buildnodeweak=1&set cpplint=1&set jslint=1&goto arg-ok

71+

if /i "%1"=="test-all" set test_args=%test_args% sequential parallel message gc inspector internet pummel&set buildnodeweak=1&set lint_cpp=1&set lint_js=1&goto arg-ok

7272

if /i "%1"=="test-known-issues" set test_args=%test_args% known_issues&goto arg-ok

73-

if /i "%1"=="jslint" set jslint=1&goto arg-ok

74-

if /i "%1"=="jslint-ci" set jslint_ci=1&goto arg-ok

75-

if /i "%1"=="cpplint" set cpplint=1&goto arg-ok

76-

if /i "%1"=="lint" set cpplint=1&set jslint=1&goto arg-ok

77-

if /i "%1"=="lint-ci" set cpplint=1&set jslint_ci=1&goto arg-ok

73+

if /i "%1"=="lint-js" set lint_js=1&goto arg-ok

74+

if /i "%1"=="jslint" set lint_js=1&goto arg-ok

75+

if /i "%1"=="lint-js-ci" set lint_js_ci=1&goto arg-ok

76+

if /i "%1"=="jslint-ci" set lint_js_ci=1&goto arg-ok

77+

if /i "%1"=="lint-cpp" set lint_cpp=1&goto arg-ok

78+

if /i "%1"=="cpplint" set lint_cpp=1&goto arg-ok

79+

if /i "%1"=="lint" set lint_cpp=1&set lint_js=1&goto arg-ok

80+

if /i "%1"=="lint-ci" set lint_cpp=1&set lint_js_ci=1&goto arg-ok

7881

if /i "%1"=="package" set package=1&goto arg-ok

7982

if /i "%1"=="msi" set msi=1&set licensertf=1&set download_arg="--download=all"&set i18n_arg=small-icu&goto arg-ok

8083

if /i "%1"=="build-release" set build_release=1&goto arg-ok

@@ -340,23 +343,23 @@ endlocal

340343

goto run-tests

341344342345

:run-tests

343-

if "%test_args%"=="" goto cpplint

346+

if "%test_args%"=="" goto lint-cpp

344347

if "%config%"=="Debug" set test_args=--mode=debug %test_args%

345348

if "%config%"=="Release" set test_args=--mode=release %test_args%

346349

echo running 'cctest %cctest_args%'

347350

"%config%\cctest" %cctest_args%

348351

call :run-python tools\test.py %test_args%

349-

goto cpplint

352+

goto lint-cpp

350353351-

:cpplint

352-

if not defined cpplint goto jslint

353-

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

354+

:lint-cpp

355+

if not defined lint_cpp goto lint-js

356+

call :run-lint-cpp src\*.c src\*.cc src\*.h test\addons\*.cc test\addons\*.h test\cctest\*.cc test\cctest\*.h tools\icu\*.cc tools\icu\*.h

354357

call :run-python tools/check-imports.py

355-

goto jslint

358+

goto lint-js

356359357-

:run-cpplint

360+

:run-lint-cpp

358361

if "%*"=="" goto exit

359-

echo running cpplint '%*'

362+

echo running lint-cpp '%*'

360363

set cppfilelist=

361364

setlocal enabledelayedexpansion

362365

for /f "tokens=*" %%G in ('dir /b /s /a %*') do (

@@ -393,17 +396,17 @@ if %errorlevel% equ 0 goto exit

393396

set "localcppfilelist=%localcppfilelist% %1"

394397

goto exit

395398396-

:jslint

397-

if defined jslint_ci goto jslint-ci

398-

if not defined jslint goto exit

399+

:lint-js

400+

if defined lint_js_ci goto lint-js-ci

401+

if not defined lint_js goto exit

399402

if not exist tools\eslint goto no-lint

400-

echo running jslint

403+

echo running lint-js

401404

%config%\node tools\eslint\bin\eslint.js --cache --rule "linebreak-style: 0" --rulesdir=tools\eslint-rules --ext=.js,.md benchmark doc lib test tools

402405

goto exit

403406404-

:jslint-ci

405-

echo running jslint-ci

406-

%config%\node tools\jslint.js -J -f tap -o test-eslint.tap benchmark doc lib test tools

407+

:lint-js-ci

408+

echo running lint-js-ci

409+

%config%\node tools\lint-js.js -J -f tap -o test-eslint.tap benchmark doc lib test tools

407410

goto exit

408411409412

:no-lint