From 8e610e2ebefbec6e301403b168000d7ed59a0422 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Tue, 22 Jun 2021 18:55:11 +0100 Subject: [PATCH 1/3] Add `SkipAnalyzers` parameter to `Start-PSBuild` --- build.psm1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index f5808cbba35..3449e1a69d5 100644 --- a/build.psm1 +++ b/build.psm1 @@ -307,7 +307,8 @@ function Start-PSBuild { [ValidateNotNullOrEmpty()] [string]$ReleaseTag, [switch]$Detailed, - [switch]$InteractiveAuth + [switch]$InteractiveAuth, + [switch]$SkipAnalyzers ) if ($ReleaseTag -and $ReleaseTag -notmatch "^v\d+\.\d+\.\d+(-(preview|rc)(\.\d{1,2})?)?$") { @@ -453,6 +454,13 @@ Fix steps: $Arguments += "/property:ReleaseTag=$ReleaseTagToUse" } + if (-not $SkipAnalyzers) { + $Arguments += "/property:RunAnalyzersDuringBuild=true" + } + else { + $Arguments += "/property:RunAnalyzersDuringBuild=false" + } + # handle Restore Restore-PSPackage -Options $Options -Force:$Restore -InteractiveAuth:$InteractiveAuth From 5220bfab31876f734f7745b89005cd2bda98e75d Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Mon, 5 Jul 2021 08:57:00 +0100 Subject: [PATCH 2/3] Change parameter name to `SkipRoslynAnalyzers` --- build.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.psm1 b/build.psm1 index 3449e1a69d5..e63e96914ff 100644 --- a/build.psm1 +++ b/build.psm1 @@ -308,7 +308,7 @@ function Start-PSBuild { [string]$ReleaseTag, [switch]$Detailed, [switch]$InteractiveAuth, - [switch]$SkipAnalyzers + [switch]$SkipRoslynAnalyzers ) if ($ReleaseTag -and $ReleaseTag -notmatch "^v\d+\.\d+\.\d+(-(preview|rc)(\.\d{1,2})?)?$") { @@ -454,7 +454,7 @@ Fix steps: $Arguments += "/property:ReleaseTag=$ReleaseTagToUse" } - if (-not $SkipAnalyzers) { + if (-not $SkipRoslynAnalyzers) { $Arguments += "/property:RunAnalyzersDuringBuild=true" } else { From 86a174f758edb25a1d5eda748bf383db720f4220 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Tue, 6 Jul 2021 22:35:50 +0100 Subject: [PATCH 3/3] Don't specify `RunAnalyzersDuringBuild=true` --- build.psm1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/build.psm1 b/build.psm1 index e63e96914ff..2ba1b6b45ff 100644 --- a/build.psm1 +++ b/build.psm1 @@ -454,10 +454,7 @@ Fix steps: $Arguments += "/property:ReleaseTag=$ReleaseTagToUse" } - if (-not $SkipRoslynAnalyzers) { - $Arguments += "/property:RunAnalyzersDuringBuild=true" - } - else { + if ($SkipRoslynAnalyzers) { $Arguments += "/property:RunAnalyzersDuringBuild=false" }