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

chore: CE-859 add sonar properties file #776

Merged
merged 4 commits into from
Nov 27, 2024

Conversation

mikevespi
Copy link
Contributor

@mikevespi mikevespi commented Nov 26, 2024

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

  • 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:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@afwilcox afwilcox merged commit 7109083 into release/yellow-boring-sponge Nov 27, 2024
15 checks passed
@afwilcox afwilcox deleted the CE-859-sonar-properties branch November 27, 2024 03:41
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

Successfully merging this pull request may close these issues.

2 participants