SonarQube Pull Request Decoration with GitLab

TL; TR — Preview

SonarQube Pull Request Decoration — Source Code Analysis failed.
Screen #1: SonarQube Pull Request Decoration. Quality Gate failed because there is too much code duplication.
Screen #2: SonarQube Pull Request Decoration. Quality Gate passed.
Screen #3: SonarQube Pull Request Decoration in GitLab. Quality Gate passed — but there are some code smells.
Screen #4: Details on the Code Smells in Screen #3 on the SonarQube page.

What SonarQube can do for you

Requirements

Setup sonar-scanner

brew install sonar-scanner
sonar-scanner -Dsonar.login=your_login_token

Setup GitLab

Example for sonarqube section in .gitlab-ci.yml

So long, and thanks for all the fish

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Wooder

Wooder

Experienced senior software engineer with a proven track record in the computer software industry. Passionated with focus on the iOS universe.