Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Configure Sonarcloud #1207

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

Closed
JoerivanEngelen opened this issue Sep 10, 2024 · 2 comments · Fixed by #1432
Closed

Configure Sonarcloud #1207

JoerivanEngelen opened this issue Sep 10, 2024 · 2 comments · Fixed by #1432
Assignees

Comments

@JoerivanEngelen
Copy link
Contributor

Right now, the Sonarcloud check is so strict it always raises an error. Most frustrating are its complaints about duplicate code in tests, where duplicate code quite often is a necessity or not worth the hassle to avoid; for example testcase strings for projectfiles.

I noticed myself just flat out ignoring it and just merging straightaway. This now gives the false impression to users viewing Github that we are merging broken branches. Sonarcloud therefore needs to be configured in some way. This cannot be done in the UI, but it should be possible with some settings files.

For example we could reduce the scope to ignore the tests folder, and the Kotlin scripts with parameters:
https://docs.sonarsource.com/sonarcloud/advanced-setup/analysis-scope/

Parameters cannot be set in the UI. Documentation on how to set parameters:
https://docs.sonarsource.com/sonarcloud/advanced-setup/analysis-parameters/

@github-project-automation github-project-automation bot moved this to 📯 New in iMOD Suite Sep 10, 2024
@JoerivanEngelen JoerivanEngelen moved this from 📯 New to 🤝 Accepted in iMOD Suite Sep 10, 2024
@JoerivanEngelen JoerivanEngelen moved this from 🤝 Accepted to 📝Refined in iMOD Suite Sep 10, 2024
JoerivanEngelen added a commit that referenced this issue Feb 18, 2025
Fixes #1207 

# Description
Exclude tests and examples from analysis

# Checklist

- [x] Links to correct issue
- [ ] Update changelog, if changes affect users
- [x] PR title starts with ``Issue #nr``, e.g. ``Issue #737``
- [ ] Unit tests were added
- [ ] **If feature added**: Added/extended example
@github-project-automation github-project-automation bot moved this from 📝Refined to ✅ Done in iMOD Suite Feb 18, 2025
@JoerivanEngelen
Copy link
Contributor Author

My attempt was ignored by sonarcloud

@JoerivanEngelen JoerivanEngelen moved this from ✅ Done to 📝Refined in iMOD Suite Feb 18, 2025
@JoerivanEngelen
Copy link
Contributor Author

Fixed in #1440

@github-project-automation github-project-automation bot moved this from 📝Refined to ✅ Done in iMOD Suite Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants