class Fastlane::Helper::XcodebuildAnalyzeHelper

Public Class Methods

parse_configuration(params) click to toggle source
# File lib/fastlane/plugin/xcodebuild_analyze/helper/xcodebuild_analyze_helper.rb, line 28
def self.parse_configuration(params)
  XcodebuildAnalyzeConfiguration.new(params.values)
end
run_analyzer(configuration, other_action) click to toggle source
# File lib/fastlane/plugin/xcodebuild_analyze/helper/xcodebuild_analyze_helper.rb, line 32
def self.run_analyzer(configuration, other_action)
  workspace_path = "../#{configuration.workspace}" unless configuration.workspace.nil?
  project_path = "../#{configuration.project}" unless configuration.project.nil?

  xcargs = []
  output = configuration.output
  output_dir = configuration.output_dir
  static_analyzer = configuration.static_analyzer
  xcargs << "CLANG_ANALYZER_OTHER_FLAGS=" unless output.nil? && output_dir.nil? && static_analyzer.nil?
  xcargs << "CLANG_ANALYZER_OUTPUT=#{output}" unless output.nil?
  xcargs << "CLANG_ANALYZER_OUTPUT_DIR=#{output_dir}" unless output_dir.nil?
  xcargs << "RUN_CLANG_STATIC_ANALYZER=#{static_analyzer ? 'YES' : 'NO'}" unless static_analyzer.nil?

  other_action.xcodebuild(
    workspace: workspace_path,
    project: project_path,
    scheme: configuration.scheme,
    sdk: configuration.sdk,
    analyze: true,
    xcargs: xcargs.join(' ')
  )
end