16:37:12.885 INFO [2724/2724] Finished analyzing: C:\b02_w\1--------.cpp (1172ms)
16:37:13.026 WARN
The analyzer was not able to find file
stdio.h
included from file C:\b02_w_temp.conan2\p\libxm8a43ca2534f86\p\include\libxml2\libxml/tree.h
included from file C:\b02_w_temp.conan2\p\libxm8a43ca2534f86\p\include\libxml2\libxml/parser.h
...
Only once. I doubt this is the full problem
How can I see all of them?
How can I make these warnings (and others) fail the pipeline?
Environment info: Using ADO Task SonarQubeAnalyze@8
==============================================================================
Task : Run Code Analysis
Description : Run scanner and upload the results to the SonarQube Server.
Version : 8.2.4
Author : sonarsource
Help : This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
More Information
[Host] Selected Node version: Node20 (Strategy: Node20Strategy)
C:\Windows\system32\cmd.exe /D /S /C "C:\b02_w_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\8.2.4\sonar-scanner\bin\sonar-scanner.bat"
16:35:47.339 INFO Scanner configuration file: C:\b02_w_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\8.2.4\sonar-scanner\bin..\conf\sonar-scanner.properties
16:35:47.355 INFO Project root configuration file: C:\b02_w\1---\sonar-project.properties
16:35:47.402 INFO SonarScanner CLI 8.1.0.6389
16:35:47.417 INFO Windows Server 2019 10.0 amd64
16:35:52.224 INFO Communicating with SonarQube Server 2025.4.4.119049
16:35:52.224 INFO JRE provisioning: os[windows], arch[amd64]
16:35:56.755 INFO Starting SonarScanner Engine...
16:35:56.755 INFO Java 17.0.13 Eclipse Adoptium (64-bit)
Hey @KUGA2, this warning normally means during analysis, the engine could not locate stdio.h through the include paths it sees. This usually happens when the analysis environment (toolchain / include paths / machine) doesn’t exactly match the one used for the build – e.g. different VS toolset or headers not present/mounted at analysis time. Are you perhaps building and analyzing in different containers?
Normally, you can see all of them in the logs. If you think the info-level logs aren’t showing you the full story, you could try enabling debug-level logs: add sonar.verbose=true in your prepare step’s extraProperties.
I don’t think it’s possible to fail the pipeline when warnings happen in the analysis. If you really want to fail specifically on this warning, you could try some custom CI step that scans the logs for these/other warnings and fails when it appears.
Oh, okay, I understand now. We don’t expose this analysis quality score as a proper metric, so you cannot configure a quality gate condition on it. Meaning, there’s not native way to fail the pipeline, and you might have to resort to a customized CI step.
I’m not sure if we want to support this, because this is not an analysis metric in the strict sense, it’s more of a meta-analysis metric. I’ll flag it for the PMs in case they have some interesting angle on it.
As I understand this, if this value decreases, SQ can not be sure if it correctly found all / the right files to analyse. Therefore issues might go unseen. Therefore I think we should track it.
I understand, but the distinction I was trying to convey is that this is not a code quality metric, it’s an analysis quality metric. From my humble perspective (I’m no PM!) such a metric doesn’t belong in a quality gate. A quality gate is based on cold, hard facts about the code itself, not about the scanner/environment setup. We’ll see if a PM has any idea regarding this, as I said, this is flagged for them to consider.
I do not care whether its in a quality gate or it just aborts the build. If some compiler / file issue influences the files searched for I must be informed. And no one will look at the 1 hidden line in a green pipeline step if it does not break something.
Just like regular gcc warnings. If you do not set -Werror, you might as well not enable warnings at all…