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

Add support for a Swift Quality Profile #50

Closed
denniebouman opened this issue Jul 3, 2023 · 2 comments · Fixed by #56
Closed

Add support for a Swift Quality Profile #50

denniebouman opened this issue Jul 3, 2023 · 2 comments · Fixed by #56
Assignees

Comments

@denniebouman
Copy link
Member

denniebouman commented Jul 3, 2023

Add support for a Swift Quality Profile, based on the "Sonar way", with the following rules and configuration:

+types=SECURITY_HOTSPOT,VULNERABILITY  # Enable these types by default
+swift:S1541|Threshold=10              # Used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#complex-units-from-sonarqube)
+swift:S1067                           # Expression too complex; NOT used by Quality-time
+swift:S138|max=20                     # Methods with too many lines; used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#long-units-from-sonarqube)
+swift:S107|functionMax=5              # Too many parameters; used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#many-parameters-from-sonarqube)
+swift:S125                            # Used by Quality-time (https://github.com/ICTU/quality-time/blob/master/docs/METRICS_AND_SOURCES.md#commented-out-code-from-sonarqube)
#end please ensure every rule ends with a new line character

@wkoot
Copy link
Collaborator

wkoot commented Sep 5, 2023

It seems that there is support in Developer edition: https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/languages/swift/
Should we instead install the open source version from https://github.com/Idean/sonar-swift ?

@denniebouman
Copy link
Member Author

It seems that there is support in Developer edition: https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/languages/swift/ Should we instead install the open source version from https://github.com/Idean/sonar-swift ?

No, don't use this open source version, use the plugin from the developer edition. We have to test if both the community and developer edition work with this profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants