diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2017-10-12 17:09:23 -0700 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2017-10-17 07:37:01 +0200 |
commit | d78086bd8a434d45d0a01e0c04faf89d47c3b4a2 (patch) | |
tree | 1c0add2ad2d61b18e27bcba5d68951208462fe5e /vcbuild.bat | |
parent | 212de3c5ec429a580d2e79ce3c2516b93b52b8f5 (diff) | |
download | node-new-d78086bd8a434d45d0a01e0c04faf89d47c3b4a2.tar.gz |
build,win: enable lint option to run "standalone"
This commit adds support to run the linter without running any other
targets. This commit also makes the lint task a little more quite and
more inline with the output on other operating systems.
Below is an example of running (with a lint error to show that it is not
so quite that errors are hidden):
C:\Users\danbev\working\node>vcbuild.bat lint
running lint-cpp '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'
src\env.h:24: Should have a space between // and comment
[whitespace/comments] [4]
Total errors found: 1
"C:\Python27\python.exe" tools/check-imports.py
running lint-js
The help message now looks like:
C:\Users\danbev\working\node>vcbuild.bat /?
vcbuild.bat [debug/release] [msi] [test/test-ci/test-all/test-uv/
test-inspector/test-internet/test-pummel/test-simple/test-message/
test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/
test-v8-all] [clean] [noprojgen] [small-icu/full-icu/without-intl]
[nobuild] [sign] [x86/x64] [vs2015/vs2017] [download-all]
[enable-vtune] [lint/lint-ci] [no-NODE-OPTIONS]
[link-module path-to-module]
Examples:
vcbuild.bat : builds release build
vcbuild.bat debug : builds debug build
vcbuild.bat release msi : builds release build and MSI installer package
vcbuild.bat test : builds debug build and runs tests
vcbuild.bat build-release : builds the release distribution as used by nodejs.org
vcbuild.bat enable-vtune : builds nodejs with Intel VTune profiling support to profile JavaScript
vcbuild.bat link-module my_module.js : bundles my_module as built-in module
vcbuild.bat lint : runs the C++ and JavaScript linter
PR-URL: https://github.com/nodejs/node/pull/16176
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'vcbuild.bat')
-rw-r--r-- | vcbuild.bat | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vcbuild.bat b/vcbuild.bat index 002fa8ecfc..ab9f40de03 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -129,6 +129,10 @@ goto next-arg :args-done +if "%*"=="lint" ( + goto lint-cpp +) + if defined build_release ( set config=Release set package=1 @@ -480,12 +484,12 @@ setlocal enabledelayedexpansion for /f "tokens=*" %%G in ('dir /b /s /a %*') do ( set relpath=%%G set relpath=!relpath:*%~dp0=! - call :add-to-list !relpath! + call :add-to-list !relpath! > nul ) ( endlocal set cppfilelist=%localcppfilelist% ) -call :run-python tools/cpplint.py %cppfilelist% +call :run-python tools/cpplint.py %cppfilelist% > nul goto exit :add-to-list @@ -541,6 +545,7 @@ echo vcbuild.bat test : builds debug build and runs tests echo vcbuild.bat build-release : builds the release distribution as used by nodejs.org echo vcbuild.bat enable-vtune : builds nodejs with Intel VTune profiling support to profile JavaScript echo vcbuild.bat link-module my_module.js : bundles my_module as built-in module +echo vcbuild.bat lint : runs the C++ and JavaScript linter goto exit :run-python |