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

SC-85878 Set-up SonarQube #68

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Conversation

ksza
Copy link

@ksza ksza commented May 24, 2023

Description

We want to keep better track of quality metrics in our projects. SonarQube gives us continuous inspection of code quality & test coverage.

Implementation Details

Updates to the git workflow

  • Store relevant artifacts (code coverage, credo analysis) as artifacts
  • Download the artifacts in the sonar.yml job
  • Report to the sonar server & remove the artifacts
  • The reporting step only runs in production builds and does not fail the workflow in case something goes wrong

We don't run reporting in other branches than master as we don't have multi-branch support in SonarQube using the free version.

How to review/test this change

Testing

  • The Sonar Analysis job passes and results are available in SonarQube
Screenshot 2023-05-24 at 12 23 05

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #85878: SonarQube for Opticks.

@changeset-bot
Copy link

changeset-bot bot commented May 24, 2023

⚠️ No Changeset found

Latest commit: 636e2a2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ksza ksza changed the title Sc 85878 sonarqube for opticks SC-85878 Set-up SonarQube May 24, 2023
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

sonar.exclusions=**/*.test.*
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to exclude mocks as well to correctly reflect the code coverage.

Maybe smth like

Suggested change
sonar.exclusions=**/*.test.*
sonar.exclusions=**/*.test.*,src/mocks/*,

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.

1 participant