Generate Report out of FxCop Code Analyzer(Roslyn) in Azure Build Pipeline
Asked Answered
S

1

6

I want to generate code analysis report from the Build Pipeline. I have recently moved from Fxcopcmd.exe to Roslyn based analyzers. I am able to see warnings in the build log, but I am not able to get a seperate report that can be shared with comeplete team.

I have already added the Nuget packages for running the code analysis Step used during build is shown below

- task: VSBuild@1
  displayName: 'Build solution **\MySolution.sln'
  inputs:
    solution: '$(Parameters.solution)'
    vsVersion: 15.0
    msbuildArgs: '/t:rebuild'
    platform: '$(BuildPlatform)'
    configuration: '$(BuildConfiguration)'
Steffi answered 30/3, 2020 at 11:51 Comment(0)
A
0

Did you mean that you don't see code analyzers results in the build Summary? FxCop Analyzer just run and report their results to the build report.

enter image description here

Here is a document you can refer to.

Awful answered 31/3, 2020 at 5:56 Comment(3)
if I set /p:RunCodeAnalysis=true it will run the Legacy FxCopCmd.exe not the FxCop Analyzer which I have migrated into. As mentioned in the link you provided, RunCodeAnalysis is being deprecated and the newer roslyn based FXCop analyzers are the way to go moving forward. FXCop analyzers will run without any arguments (if required nugets are already installed)Steffi
I see analyzer report in summary, But it has a limit of displaying only 10 Warnings or erros. Rest of the warnings are not listed. I need a report out of the build, which can be shared across the team.Steffi
I have the same question. I would love to see the results in a report the same way Code Coverage results are shown, so we can control whether or not the metrics are getting better or worse.Decemvirate

© 2022 - 2024 — McMap. All rights reserved.