Skip to content
14 changes: 14 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,17 @@ jobs:
parameters:
jobName: Correctness_Rebuild
configuration: Release

- job: Correctness_Analyzers
pool:
name: NetCore1ESPool-Public
demands: ImageOverride -equals Build.Windows.Amd64.VS2022.Pre.Open
timeoutInMinutes: 30
steps:
- template: eng/pipelines/checkout-task.yml

- task: PowerShell@2
displayName: Build with analyzers
inputs:
filePath: eng/build.ps1
arguments: -restore -build -configuration Debug -prepareMachine -ci -binaryLog -runAnalyzers:$true -warnAsError:$true -properties "/p:RoslynEnforceCodeStyle=true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So getting all analyzer diagnostics in the solution on the command line requires emitting, etc.? is that correct? Just wondered if there was an msbuild target or something equivalent to "run code analysis on solution."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

someday when we are allowed to used github actions we could use: https://github.com/dotnet/code-analysis but for now I think this is the simplest approach.