sbaudoin / sonar-yaml

SonarQube plugin to analyze YAML files
Apache License 2.0
59 stars 29 forks source link

Yaml file with same syntax issue doesn’t get same sonar error report #71

Open evoToBetter opened 2 years ago

evoToBetter commented 2 years ago

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 (values240.yaml and values241.yaml), 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.

logs 3.zip files: tmp.zip

maven logs snippet: [WARNING] Syntax error in file: values240.yaml [WARNING] Cause: syntax error: expected , but found ‘’ at line 26, column 12 [WARNING] Syntax error in file: values241.yaml [WARNING] Cause: syntax error: expected , but found ‘’ at line 26, column 12

But we could only get sonar issue for values241.yaml.

  1. Gerrit review for values240.yaml image
  2. Gerrit review for values241.yaml image

Could you help to check why it happens?

sbaudoin commented 1 year ago

Hi. Thanks for reporting. Unfortunately I cannot reproduce the issue with your files. Version 1.6.0 is not the latest version: have you tried with 1.7.x and a version of SQ that is also more recent? The best would be to give me a complete bundle of files and configuration set that I can use to reproduce the issue.