We use sonar maven plugin to check yaml files, but files with same syntax error doesn’t get same error report.
for example:
Two files, both have same indentation error, but we only get sonar issue for one file.
Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube 8.9.6, Yaml Analyzer 1.6.0, sonar-maven-plugin:3.9.0.2155. - what are you trying to achieve
run sonar check by maven plugin. “mvn sonar:sonar -Dsonar.analysis.mode=publish -Dsonar.pullrequest.base=master” - what have you tried so far to achieve this
Try maven command with option “-X”, and check the log.
The yaml analyzer has find the error in files, but it doesn’t show in sonar server.
Try yaml analayzer project, run UT with files, and it could find the indentation issue.
So I guess sonar-maven-plugin ignore some issue for files. But I don’t know why and how to check the logs.
maven logs snippet:
[WARNING] Syntax error in file: values240.yaml
[WARNING] Cause: syntax error: expected <block end>, but found ‘<block mapping start>’ at line 26, column 12
[WARNING] Syntax error in file: values241.yaml
[WARNING] Cause: syntax error: expected <block end>, but found ‘<block mapping start>’ at line 26, column 12
But we could only get sonar issue for values241.yaml.
- Gerrit review for values240.yaml
- Gerrit review for values241.yaml
Could you help to check why it happens, how could we get debug log to maven sonar plugin to reposrt sonar issue?
Thank you!