Analyzing with SonarQube in OS X


Qube](http://www.sonarqube.org/)를 별도의 서버에 설치하지 않고도 사용하는 방법이다.

Abstract

Installing SonarQube via Homebrew

Homebrew를 이용하여 sonarsonar-runner를 설치하자.

$ brew install sonar sonar-runner
...ass...ignorant...
$

Starting SonarQube

SonarQube를 실행하자.

$ sonar start
Starting SonarQube...
Started SonarQube.
$

http://localhost:9000 에서 SonarQube가 동작하는 것을 확인할 수 있다.

Analyzing Project with SonarQube

Apache Maven 프로젝트를 분석해보자.

$ ls -F
pom.xml     src/        target/
$ mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.426 s
[INFO] Finished at: 2016-03-16T14:18:42+09:00
[INFO] Final Memory: 16M/382M
[INFO] ------------------------------------------------------------------------
$

다시 http://localhost:9000 에 가 보면 분석된 결과를 확인할 수 있다.

Stopping SonarQube

분석작업이 끝나면 SonarQube를 종료하자.

$ sonar stop
Stopping SonarQube...
Stopped SonarQube.
$
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s