Issue with YAML and Ansible Plugins in SonarQube: Only One YAML File is Scanned and Uploaded

We are experiencing an issue with the YAML and Ansible plugins in SonarQube where not all YAML files are transferred and scanned. Here are the details:

Version YAML Plugin: 1.9.1
Version Ansible Plugin: 2.5.1
Version SonarQube: 9.9.6 / 9.9.5
Ansible-lint: 24.7

Problem Description

When scanning our project, which includes several YAML files, only one file (e.g., roles/role1/tasks/main.yaml) is visible and scanned in SonarQube. The other YAML files are missing from the analysis results.
Example Folder Structure:

bash

Playbooks/file1.yaml
Playbooks/file2.yaml

roles/role1/tasks/main.yaml
roles/role2/tasks/main.yaml

Despite having the latest versions of the plugins and tools, only one YAML file is uploaded and analyzed by SonarQube.
Steps Taken

We have checked for conflicts between the YAML and Ansible plugins.
Updated to the latest versions of both plugins and SonarQube.
Configured exclusions and inclusions to ensure only relevant files are scanned.

Seeking Assistance

Has anyone else encountered this issue? What configurations or steps did you take to resolve it? Any insights or solutions would be greatly appreciated.

Hey there.

I suggest raising an issue with the maintainer of the community-supported YAML plugin: GitHub - sbaudoin/sonar-yaml: SonarQube plugin to analyze YAML files

I did, last week as well, but this plugin is integrated in sonarqube. it is not external anymore.

I also got no answer. I just wait, no answer

It’s still external. While SonarQube natively supports scanning some YAML files in certain contexts (like Helm charts), the only all-purpose YAML analyzer is the community-supported plugin you’re using.