SonarQube doesnt copy/analyze xaml files

I am trying to create a build pipeline for a WPF solution .But .XAML files are ignored by sonarqube .I did add AdditionalAnalysisfiletypes parameter in build arguments as per other threads on this forum ,but it doesnt work .

I am using prepare analysis for Sonarqube extension on azure devops version 5 . I want to scan those xaml files too.what can i do ??

Hi,

Welcome to the community!

Did you set AdditionalAnalysisfiletypes or SQAdditionalAnalysisFileItemTypes, per this post? Spelling and capitalization matter.

 
Ann

Hi Ann,

Sorry for the typo .I did use the correct one . Attached the build arguments i am using .Is there anything i need to do ??

image

1 Like

Hi,

Thanks for the confirmation. I’ve flagged this for the experts.

 
Ann

Hello @AkhilRavula

We would need the verbose level logs to be able to investigate the problem further.

Could you please provide them?

    • “SonarQubePrepare” or “SonarCloudPrepare” task’s extraProperties argument if you are using Azure DevOps
      • For example:
- task: SonarCloudPrepare@1
    inputs:
      SonarCloud: 'sonarcloud'
      organization: 'foo'
      scannerMode: 'MSBuild'
      projectKey: 'foo_sonar-scanning-someconsoleapp'
      projectName: 'sonar-scanning-someconsoleapp'
      extraProperties: |
        sonar.verbose=true
  • The important logs are in the END step (i.e. SonarQubeAnalyze / SonarCloudAnalyze / “Run Code Analysis”)

All the best,
Čaba

Hi Caba

I cant share logs files as I am under corporate network .
I set the property verbose = true ,but I don’t see xaml files in the logs .Is there anything I can do or check something in the logs?

Hi there,

Which rules are you expecting to be run, and are there specific issues you are expecting to see?

By default, the Scanner for .NET will make .xaml files with the build action Page available for analysis.
However, by default the XML analyzer won’t consider .xaml files, so you would need to manually configure that on the server.

Even if the XAML files are analyzed, only the general-purpose XML rules would be run against them - see here.

Hi Duncan

“However, by default the XML analyzer won’t consider .xaml files, so you would need to manually configure that on the server.”

How do i configure ??

Hi @AkhilRavula,