diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2878fa4a84802..d375f17bce720 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -409,7 +409,6 @@ stages: - pwsh: | ./eng/generate-compiler-code.ps1 -test -configuration Release displayName: Generate Syntax Files - condition: or(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['compilerChange'], 'true')) - pwsh: | ./eng/validate-code-formatting.ps1 -ci -rootDirectory $(Build.SourcesDirectory)\src -includeDirectories Compilers\CSharp\Portable\Generated\, Compilers\VisualBasic\Portable\Generated\, ExpressionEvaluator\VisualBasic\Source\ResultProvider\Generated\ diff --git a/eng/validate-rules-missing-documentation.ps1 b/eng/validate-rules-missing-documentation.ps1 index 99775839c7efe..b38dfb2cedeee 100644 --- a/eng/validate-rules-missing-documentation.ps1 +++ b/eng/validate-rules-missing-documentation.ps1 @@ -1,30 +1,26 @@ [CmdletBinding(PositionalBinding=$false)] param ( - [switch]$ci + [switch]$ci = $false ) Set-StrictMode -version 2.0 $ErrorActionPreference="Stop" - Write-Host "Building Microsoft.CodeAnalysis.Features" try { . (Join-Path $PSScriptRoot "build-utils.ps1") Push-Location $RepoRoot + $prepareMachine = $ci $projectFilePath = Join-Path $RepoRoot "src\Features\Core\Portable\Microsoft.CodeAnalysis.Features.csproj" Exec-DotNet "build $projectFilePath -t:GenerateRulesMissingDocumentation -p:RoslynEnforceCodeStyle=false -p:RunAnalyzersDuringBuild=false -p:ContinuousIntegrationBuild=$ci -c Release" - - if ($LASTEXITCODE -ne 0) { - Write-Host "Failed with exit code $LASTEXITCODE." - exit $LASTEXITCODE - } } catch { - Write-Host "Error verifying rules missing documentation!" Write-Host $_ Write-Host $_.Exception Write-Host $_.ScriptStackTrace - $host.SetShouldExit(1) - exit 1 + ExitWithExitCode 1 +} +finally { + Pop-Location }