A scalable solution that manages public complaints as well as investigative case files for multiple Compliance and Enforcement divisions across the natural resource sector.
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.
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
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
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:
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: