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

Setup with Sonar #17

Closed
bitvale opened this issue Jun 11, 2021 · 1 comment
Closed

Setup with Sonar #17

bitvale opened this issue Jun 11, 2021 · 1 comment

Comments

@bitvale
Copy link

bitvale commented Jun 11, 2021

Question

Can you please explain how to setup plugin with Sonar?

After the sonar finishes, I have a json report file. How to set up violations-gradle-plugin for parsing results from this file? And is it possible to diff this json report file with the same report file from the target branch?

I have a Sonar report file with errors after running this command:

gradle sonarqube -Dsonar.analysis.mode=preview -Dsonar.report.export.path=sonar-report.json

But violations plugin shows there are no errors with this setup (report file path is app/build/sonar/sonar-report.json):

    violations = [
        ["SONAR", buildDir.path, "sonar/.*\\.json\$", "Sonar"]
    ]

Thank you!

@bitvale
Copy link
Author

bitvale commented Jun 20, 2021

Fixed with this setup:

    violations = [
        ["SONAR", buildDir.path, ".*/sonar/.*\\.json\$", "Sonar"]
    ]

@bitvale bitvale closed this as completed Jun 20, 2021
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

1 participant