Reference = https://docs.sonarqube.org/display/PLUG/SonarCFamily+for+Objective-C

사전준비

빌드 서버 환경

빌드  및 분석

  1. Build Wrapper를 통해 빌드

    build-wrapper-macosx-x86-64 --out-dir bw_output xcodebuild clean build
    sonar-scanner
  2. SonarQube Scanner 환경 구성

    sonar-project.properties
    sonar.projectKey=myFirstSonarQubeProject
    sonar.projectName=My First SonarQube Project
    sonar.projectVersion=1.0
    sonar.sources=.
    sonar.cfamily.build-wrapper-output=bw_output
    sonar.sourceEncoding=UTF-8
  3. SonarQube Scanner 실행

    sonar-scanner

부가 정보

Mac OS X 실행 경로 추가하기

  • Add Permanent Entry to Mac OS X PATH Variable – Current User Only
    • ~/.bash_profile 에 추가

      PATH=$PATH:/Applications/sonar-scanner/bin
  • Add Permanent Entry to Mac OS X PATH Variable – All Users on the System
    • /etc/paths 에 추가

      /usr/local/bin
      /usr/bin
      /Applications/sonar-scanner/bin
  • 레이블 없음