[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Add CodeAnalysis switch to build.ps1



Add option to enable code analysis on builds, so that developers can
get code analysis feedback quicker than relying on SDV builds.

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx>
---
 build.ps1   | 6 ++++--
 msbuild.ps1 | 7 ++++---
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/build.ps1 b/build.ps1
index 4ff02c1..42bbdde 100644
--- a/build.ps1
+++ b/build.ps1
@@ -8,7 +8,8 @@ param(
        [string]$Arch,
        [string]$SignMode = "TestSign",
        [switch]$CodeQL,
-       [switch]$Sdv
+       [switch]$Sdv,
+       [switch]$CodeAnalysis
 )
 
 #
@@ -30,7 +31,8 @@ Function Build {
                ConfigurationBase = $configurationbase[$visualstudioversion];
                Arch = $Arch;
                Type = $Type;
-               SignMode = $SignMode
+               SignMode = $SignMode;
+               CodeAnalysis = $CodeAnalysis
                }
        & ".\msbuild.ps1" @params
        if ($LASTEXITCODE -ne 0) {
diff --git a/msbuild.ps1 b/msbuild.ps1
index 51092ca..7228f42 100644
--- a/msbuild.ps1
+++ b/msbuild.ps1
@@ -8,7 +8,8 @@ param(
        [string]$Arch,
        [Parameter(Mandatory = $true)]
        [string]$Type,
-       [string]$SignMode = "TestSign"
+       [string]$SignMode = "TestSign",
+       [switch]$CodeAnalysis
 )
 
 Function Run-MSBuild {
@@ -154,10 +155,10 @@ $projectlist = @( "xenvkbd" )
 Set-ExecutionPolicy -Scope CurrentUser -Force Bypass
 
 if ($Type -eq "free") {
-       Run-MSBuild $solutionpath "xenvkbd.sln" $configuration["free"] 
$platform[$Arch]
+       Run-MSBuild $solutionpath "xenvkbd.sln" $configuration["free"] 
$platform[$Arch] -CodeAnalysis:$CodeAnalysis
 }
 elseif ($Type -eq "checked") {
-       Run-MSBuild $solutionpath "xenvkbd.sln" $configuration["checked"] 
$platform[$Arch]
+       Run-MSBuild $solutionpath "xenvkbd.sln" $configuration["checked"] 
$platform[$Arch] -CodeAnalysis:$CodeAnalysis
 }
 elseif ($Type -eq "codeql") {
        if (-Not (Test-Path -Path $archivepath)) {
-- 
2.50.1.windows.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.