HIVE-26196: Integrate Sonar analysis for the master branch and PRs
What changes were proposed in this pull request?
Adding Sonar analysis (no test coverage) for the master branch and PRs only at the moment, to track code quality metrics over time.
Why are the changes needed?
By running Sonar analysis regularly, we can catch critical bugs and issues more easily.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Sonar has been run locally and via CI (https://sonarcloud.io/summary/overall?id=apache_hive).
@kgyrtkirk can you have another look? At the moment we are analyzing PRs and the master branch, I don't think we need to support labels or anything, because whatever change we want to make has to pass through a PR, we will spot eventual issues before merging, so I think we can stick with just analyzing the master branch (and not other branches, unless part of a PR). WDYT?
PS: I have updated the title of the Jira ticket, the message of the first commit is outdated, I am not amending it because otherwise it will trigger CI again for nothing.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reach out on the [email protected] list if the patch is in need of reviews.
Dear bot, please keep the PR open!
Kudos, SonarCloud Quality Gate passed! 
103 Bugs
0 Vulnerabilities
33 Security Hotspots
1764 Code Smells
The test failures are due to flakyness and not related at all to the present PR, I am not going to run tests again to avoid wasting resources, I hope that's OK with you @zabetak

