chore: CE-859 add sonar properties file #776
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a .sonar.properties file to allow custom Sonar settings.
Description
With Sonarcloud scans set up by PS to run automatically, the configuration in the workflow is not getting applied, our Sonar passes and fails are simply running against the default configuration on the Sonar instance. In order to overwrite the defaults a .sonar.properties file is needed. This PR creates that file and moves the settings in the workflow to the properties. They will likely need more fine tuning, however this will now be possible.
Fixes # https://env-ceds.atlassian.net/jira/software/c/projects/CE/boards/4?selectedIssue=CE-859
How Has This Been Tested?
This was tested in a separate branch by running various scenarios with changes to the workflow, and adding the properties file. With the properties file, the duplication was failed when a significant amount of (fake) duplication was added to a file. Adding the directory that housed the file to the exclusions list in the properties file caused the duplication to be correctly ignored resulting in a passing Sonar test. The same test was run without the properties file, and the equivalent changes made to the workflow code, without success; both scenarios hit the default > 3% duplication error.
Checklist
Further comments
Now that we have control of the Sonar settings, we can consider fine tuning them to behave the way that we want, and run on the code we intended it to be run on. We can also consider removing the job from the workflow, as it does not seem to be running as intended.
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: