Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5a7154e

Browse filesBrowse files
refackBridgeAR
authored andcommitted
build,win: delegate lint-cpp to make
* look for GNU Make in the Path or use wsl PR-URL: #28102 Fixes: #28086 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
1 parent 48d7d7c commit 5a7154e
Copy full SHA for 5a7154e

File tree

Expand file treeCollapse file tree

1 file changed

+9
-43
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-43
lines changed
Open diff view settings
Collapse file

‎vcbuild.bat‎

Copy file name to clipboardExpand all lines: vcbuild.bat
+9-43Lines changed: 9 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -593,51 +593,17 @@ goto lint-cpp
593593

594594
:lint-cpp
595595
if not defined lint_cpp goto lint-js
596-
call :run-lint-cpp src\*.c src\*.cc src\*.h test\addons\*.cc test\addons\*.h test\js-native-api\*.cc test\js-native-api\*.cc test\js-native-api\*.h test\node-api\*.cc test\node-api\*.cc test\node-api\*.h test\cctest\*.cc test\cctest\*.h tools\icu\*.cc tools\icu\*.h
597-
python tools/check-imports.py
596+
if defined NODEJS_MAKE goto run-make-lint
597+
where make > NUL 2>&1 && make -v | findstr /C:"GNU Make" 1> NUL
598+
if "%ERRORLEVEL%"=="0" set "NODEJS_MAKE=make PYTHON=python" & goto run-make-lint
599+
where wsl > NUL 2>1
600+
if "%ERRORLEVEL%"=="0" set "NODEJS_MAKE=wsl make" & goto run-make-lint
601+
echo Could not find GNU Make, needed for linting C/C++
598602
goto lint-js
599603

600-
:run-lint-cpp
601-
if "%*"=="" goto exit
602-
echo running lint-cpp '%*'
603-
set cppfilelist=
604-
setlocal enabledelayedexpansion
605-
for /f "tokens=*" %%G in ('dir /b /s /a %*') do (
606-
set relpath=%%G
607-
set relpath=!relpath:*%~dp0=!
608-
call :add-to-list !relpath! > nul
609-
)
610-
( endlocal
611-
set cppfilelist=%localcppfilelist%
612-
)
613-
python tools/cpplint.py %cppfilelist% > nul
614-
goto exit
615-
616-
:add-to-list
617-
@rem Subroutine used to filter items from the cpplint file list
618-
echo %1 | findstr /c:"src\node_root_certs.h" > nul 2>&1
619-
if %errorlevel% equ 0 goto exit
620-
621-
echo %1 | findstr /c:"src\tracing\trace_event.h" > nul 2>&1
622-
if %errorlevel% equ 0 goto exit
623-
624-
echo %1 | findstr /c:"src\tracing\trace_event_common.h" > nul 2>&1
625-
if %errorlevel% equ 0 goto exit
626-
627-
echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.h" > nul 2>&1
628-
if %errorlevel% equ 0 goto exit
629-
630-
echo %1 | findstr /r /c:"test\\addons\\[0-9].*_.*\.cc" > nul 2>&1
631-
if %errorlevel% equ 0 goto exit
632-
633-
echo %1 | findstr /c:"test\js-native-api\common.h" > nul 2>&1
634-
if %errorlevel% equ 0 goto exit
635-
636-
echo %1 | findstr /c:"test\node-api\common.h" > nul 2>&1
637-
if %errorlevel% equ 0 goto exit
638-
639-
set "localcppfilelist=%localcppfilelist% %1"
640-
goto exit
604+
:run-make-lint
605+
%NODEJS_MAKE% lint-cpp
606+
goto lint-js
641607

642608
:lint-js
643609
if defined lint_js_ci goto lint-js-ci

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.