Add support for a Swift Quality Profile
Closed this issue · 2 comments
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
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 ?
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.