All Projects → Idean → Sonar Swift

Idean / Sonar Swift

Licence: other
Open source Swift plugin for SonarQube (also supports Objective-C)

Programming Languages

java
68154 projects - #9 most used programming language
swift
15916 projects

Projects that are alternatives of or similar to Sonar Swift

Nearbyweather
NearbyWeather is an open source weather app for iOS, which uses the OpenWeatherMap API. With this project developers are invited to learn advanced iOS concepts, as well as to contribute further advancements. Fork this repo to get started.
Stars: ✭ 146 (-80.14%)
Mutual labels:  fastlane, xcode
Apprepositorytemplate
The easiest way to start a new application project without any manual configuration
Stars: ✭ 24 (-96.73%)
Mutual labels:  fastlane, xcode
Fastlane Plugin Test center
🎯 The best fastlane plugin to understand and tame misbehaving iOS tests 🎉
Stars: ✭ 214 (-70.88%)
Mutual labels:  fastlane, xcode
Circleci Demo Ios
A sample iOS app that builds on CircleCI
Stars: ✭ 103 (-85.99%)
Mutual labels:  fastlane, xcode
Xcov
Nice code coverage reporting without hassle
Stars: ✭ 467 (-36.46%)
Mutual labels:  fastlane, xcode
Scxcodeswitchexpander
Xcode plugin that enables switch cases autocompletion
Stars: ✭ 662 (-9.93%)
Mutual labels:  xcode
Teaching App Dev Swift
DEPRECATED. Instructor lesson plans that accompany Xcode projects, for guiding in-class experiential learning.
Stars: ✭ 699 (-4.9%)
Mutual labels:  xcode
Sonarqube
Continuous Inspection
Stars: ✭ 6,365 (+765.99%)
Mutual labels:  sonarqube
Awesome Swift Korean Lecture
훌륭한 Swift 세션 동영상(강좌), 한글 자막있는 혹은 한국어 강의 정보 링크 모음 (Awesome Swift Korean lecture information)
Stars: ✭ 649 (-11.7%)
Mutual labels:  xcode
Rome
Carthage cache for S3, Minio, Ceph, Google Storage, Artifactory and many others
Stars: ✭ 724 (-1.5%)
Mutual labels:  fastlane
Lucario
The best flat theme for Vim, Atom, Sublime Text, Jetbrains Editors, Terminal.app, iTerm, Xcode and XTerm
Stars: ✭ 711 (-3.27%)
Mutual labels:  xcode
Sonarjs
SonarSource Static Analyzer for JavaScript and TypeScript
Stars: ✭ 696 (-5.31%)
Mutual labels:  sonarqube
Zebra
🦓 A Useful Package Manager for iOS
Stars: ✭ 667 (-9.25%)
Mutual labels:  xcode
Whats New In Swift 5 0
An Xcode playground that demonstrates the new features introduced in Swift 5.0.
Stars: ✭ 703 (-4.35%)
Mutual labels:  xcode
Kin
Simple PBXProj Verifier
Stars: ✭ 660 (-10.2%)
Mutual labels:  xcode
Peckham
Add #import-s from anywhere in the code.
Stars: ✭ 719 (-2.18%)
Mutual labels:  xcode
Xcodes
The best command-line tool to install and switch between multiple versions of Xcode.
Stars: ✭ 653 (-11.16%)
Mutual labels:  xcode
Genie
GENie - Project generator tool
Stars: ✭ 693 (-5.71%)
Mutual labels:  xcode
Flutter Architecture Blueprints
Flutter Architecture Blueprints is a project that introduces MVVM architecture and project structure approaches to developing Flutter apps.
Stars: ✭ 707 (-3.81%)
Mutual labels:  xcode
Struct
Xcode projects on steroids
Stars: ✭ 684 (-6.94%)
Mutual labels:  xcode

Branch Status
master Build Status
develop Build Status

SonarQube Plugin for Swift

This is an open source initiative for Apple Swift language support in SonarQube. The structure of the plugin is based on the sonar-objective-c plugin.

Example iOS SonarQube dashboard

In SonarQube under Quality Profiles the used Linter can be specified by selecting either the SwiftLint Profile or the Tailor Profile as Default profile for Swift Projects:

Set preferred profile (SwiftLint or Tailor) to default in SonarQube.

Features

Feature Supported MacOS Unix
Complexity YES Uses Lizard Uses Lizard
Design NO
Documentation YES
Duplications YES
Issues YES Uses SwiftLint and/or Tailor for Swift. OCLint and Faux Pas for Objective-C Uses Tailor
Size YES
Tests YES Uses xcodebuild + xcpretty xcpretty Not Supported
Code coverage YES Uses slather Not Supported

Faux Pas support

Faux Pas is a wonderful tool to analyse iOS or Mac applications Objective-C source code, however it is not free. A 30 trial version is available here.

The plugin runs fine even if Faux Pas is not installed (Faux Pas analysis will be skipped).

Download

Checkout the Releases page.

The full release history is also available in CHANGELOG.md.

Launching an analysis

If you use fastlane, please read our fastlane integration doc. Otherwise, run the run-sonar-swift.sh script from your Xcode project root folder

Prerequisites

  • a Mac with Xcode 7 or +
  • SonarQube and SonarQube Scanner
  • xcpretty (see instructions below)
  • SwiftLint (HomeBrew installed and brew install swiftlint). Version 0.3.0 or above.
  • Tailor (HomeBrew installed and brew install tailor). Version 0.11.1 or above.
  • slather (gem install slather). Version 2.1.0 or above (2.4 since Xcode 8.3).
  • lizard (PIP installed and sudo pip install lizard)
  • OCLint installed. Version 0.11.0 recommended (0.13.0 since Xcode 9).
  • Faux Pas command line tools installed (optional)

Installation of xcpretty with JUnit reports fix

At the time, xcpretty needs to be fixed to work with SonarQube.

To install the fixed version, follow those steps :

git clone https://github.com/Backelite/xcpretty.git
cd xcpretty
git checkout fix/duration_of_failed_tests_workaround
gem build xcpretty.gemspec
sudo gem install --both xcpretty-0.2.2.gem

Installation (once for all your Swift projects)

  • Download the plugin binary into the $SONARQUBE_HOME/extensions/plugins directory
  • Copy run-sonar-swift.sh somewhere in your PATH
  • Restart the SonarQube server.

Configuration (once per project)

  • Copy sonar-project.properties in your Xcode project root folder (along your .xcodeproj file)
  • Edit the sonar-project.properties file to match your Xcode iOS/MacOS project

The good news is that you don't have to modify your Xcode project to enable SonarQube!. Ok, there might be one needed modification if you don't have a specific scheme for your test target, but that's all.

Update (once per plugin update)

  • Install the lastest plugin version
  • Copy run-sonar-swift.sh somewhere in your PATH

If you still have run-sonar-swift.sh file in each of your project (not recommended), you will need to update all those files.

Contributing

Thank you for your interest in the project! Contributions are welcome and appreciated.

Make sure to read these guides before getting started:

License

SonarQube Plugin for Swift is released under the GNU LGPL v3 license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].