Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
evoToBetter opened this issue Oct 8, 2022 · 1 comment

Comments

@evoToBetter
Copy link

evoToBetter commented Oct 8, 2022

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants