1
0
Форкнуть 0

Merge pull request #359 from XhmikosR/coverity

Add a script to run Coverity.
This commit is contained in:
J Wyman 2017-02-07 22:29:50 +01:00 коммит произвёл GitHub
Родитель 8e3be7a35b a496ec3902
Коммит 90f8fe40e1
3 изменённых файлов: 82 добавлений и 1 удалений

6
.gitignore поставляемый
Просмотреть файл

@ -19,3 +19,9 @@
*.suo
*.user
*.sln.docstates
# Coverity files
/cov-int/
/gcw.tar
/gcw.tgz
/gcw.lzma

Просмотреть файл

@ -1,4 +1,4 @@
# Git Credential Manager for Windows [![Build status](https://ci.appveyor.com/api/projects/status/jl6oe1thiwv5s52o/branch/master?svg=true)](https://ci.appveyor.com/project/whoisj/git-credential-manager-for-windows/branch/master)
# Git Credential Manager for Windows [![Build status](https://ci.appveyor.com/api/projects/status/jl6oe1thiwv5s52o/branch/master?svg=true)](https://ci.appveyor.com/project/whoisj/git-credential-manager-for-windows/branch/master) [![Coverity Scan Build Status](https://scan.coverity.com/projects/11371/badge.svg)](https://scan.coverity.com/projects/git-credential-manager-for-windows)
The [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows) (GCM) provides secure Git credential storage for Windows. It's the successor to the [Windows Credential Store for Git](https://gitcredentialstore.codeplex.com/) (git-credential-winstore), which is no longer maintained. Compared to Git's built-in credential storage for Windows ([wincred](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage)), which provides single-factor authentication support working on any HTTP enabled Git repository, GCM provides multi-factor authentication support for [Visual Studio Team Services](https://www.visualstudio.com/), [Team Foundation Server](Docs/Faq.md#q-i-thought-microsoft-was-maintaining-this-why-does-the-gcm-not-work-as-expected-with-tfs), and GitHub.

75
coverity.bat Normal file
Просмотреть файл

@ -0,0 +1,75 @@
@ECHO OFF
SETLOCAL
PUSHD %~dp0
SET PATH=C:\MSYS\bin;%PATH%
IF NOT DEFINED COVDIR SET "COVDIR=C:\cov-analysis"
IF DEFINED COVDIR IF NOT EXIST "%COVDIR%" (
ECHO.
ECHO ERROR: Coverity not found in "%COVDIR%"
GOTO End
)
CALL "%VS140COMNTOOLS%\vsvars32.bat"
IF %ERRORLEVEL% NEQ 0 (
ECHO vsvars32.bat call failed.
GOTO End
)
:Cleanup
IF EXIST "cov-int" RD /q /s "cov-int"
IF EXIST "gcw.lzma" DEL "gcw.lzma"
IF EXIST "gcw.tar" DEL "gcw.tar"
IF EXIST "gcw.tgz" DEL "gcw.tgz"
:Main
SET MSBUILD_SWITCHES=/nologo /t:Rebuild /p:Configuration=Release /p:Platform="Any CPU"^
/maxcpucount /consoleloggerparameters:DisableMPLogging;Summary;Verbosity=minimal
"%COVDIR%\bin\cov-build.exe" --dir cov-int MSBuild.exe Microsoft.Alm.sln %MSBUILD_SWITCHES%
:tar
tar --version 1>&2 2>NUL || (ECHO. & ECHO ERROR: tar not found & GOTO SevenZip)
tar caf "gcw.lzma" "cov-int"
GOTO End
:SevenZip
CALL :SubDetectSevenzipPath
rem Coverity is totally bogus with lzma...
rem And since I cannot replicate the arguments with 7-Zip, just use tar/gzip.
IF EXIST "%SEVENZIP%" (
"%SEVENZIP%" a -ttar "gcw.tar" "cov-int"
"%SEVENZIP%" a -tgzip "gcw.tgz" "gcw.tar"
IF EXIST "gcw.tar" DEL "gcw.tar"
GOTO End
)
:SubDetectSevenzipPath
FOR %%G IN (7z.exe) DO (SET "SEVENZIP_PATH=%%~$PATH:G")
IF EXIST "%SEVENZIP_PATH%" (SET "SEVENZIP=%SEVENZIP_PATH%" & EXIT /B)
FOR %%G IN (7za.exe) DO (SET "SEVENZIP_PATH=%%~$PATH:G")
IF EXIST "%SEVENZIP_PATH%" (SET "SEVENZIP=%SEVENZIP_PATH%" & EXIT /B)
FOR /F "tokens=2*" %%A IN (
'REG QUERY "HKLM\SOFTWARE\7-Zip" /v "Path" 2^>NUL ^| FIND "REG_SZ" ^|^|
REG QUERY "HKLM\SOFTWARE\Wow6432Node\7-Zip" /v "Path" 2^>NUL ^| FIND "REG_SZ"') DO SET "SEVENZIP=%%B\7z.exe"
EXIT /B
:End
POPD
ECHO. & ECHO Press any key to close this window...
PAUSE >NUL
ENDLOCAL
EXIT /B