Idean / sonar-swift

Open source Swift plugin for SonarQube (also supports Objective-C)
Other
896 stars 276 forks source link

No rules enforcing complexity thresholds exist #95

Closed tobilarscheid closed 7 years ago

tobilarscheid commented 7 years ago

Hi guys,

nice plugin, we like it! One thing I don't quite get: Are there any rules enforcing a certain complexity threshold? We do run lizard reports and we get them to show in the sonar project, but we did not find any rules that picks up these measures. It looks like swift lint does measure some cyclomatic complexity, but what's the role of lizard then?

Any feedback would be appreciated!

Regards,

Tobi

zippy1978 commented 7 years ago

Hi @tobilarscheid,

SwiftLint is only reporting issues and Lizard is only computing and reporting complexity. If you want to raise an issue when complexity is above a specific threshold, do it why a quality gate.

tobilarscheid commented 7 years ago

But this then only works for overall complexity, right? Wouldn't it be helpful to have this as specific issues on e.g. method/file/class/... level? This way you would be able to identify and fix "complexity hotspots".