1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Xcode Analyzeでの解析結果をhtmlファイルに出力する

Posted at

実行コマンド

xcodebuild analyze \
    -project MyProject.xcodeproj \
    -scheme MyScheme \
    -sdk iphonesimulator \
    -destination "name=iPhone 6s Plus,OS=9.2" \    
    -configuration Debug \
    CLANG_ANALYZER_OUTPUT=plist-html \
    CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang"

サンプル

私がMacOSアプリケーションに対して実行したコマンドは以下の通り。

xcodebuild analyze \
    -project Hoge.xcodeproj \
    -scheme Hoge \
    -configuration Debug \
    CLANG_ANALYZER_OUTPUT=plist-html \
    CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang"

clangフォルダ配下に結果が出力されます。

実行時のXcodeバージョンに注意する

複数のXcodeを導入している場合は、
実行するXcodeのバージョンに注意する。

Xcodeバージョンの切り替え
xcode-select --switch /Applications/[AppName].app

【例】
xcode-select --switch /Applications/Xcode6.1.app
xcode-select --switch /Applications/Xcode8.1.app

所感

エラーごとにhtmlファイルが出力されるので、
警告数によっては大変なファイル数となります。
※ 1警告で1htmlファイル となっているようです。

参考

Clang Static Analyzer

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?