Class: Fastlane::Actions::PeripheryAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/periphery/actions/periphery_action.rb

Defined Under Namespace

Classes: Result, Results, Runner

Class Method Summary collapse

Class Method Details

.authorsObject



167
168
169
# File 'lib/fastlane/plugin/periphery/actions/periphery_action.rb', line 167

def self.authors
  ["Liam Nichols"]
end

.available_optionsObject



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/fastlane/plugin/periphery/actions/periphery_action.rb', line 175

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :executable,
                                 env_name: "PERIPHERY_EXECUTABLE",
                                 description: "Path to the `periphery` executable on your machine",
                                 optional: true),
    FastlaneCore::ConfigItem.new(key: :config,
                                 env_name: "PERIPHERY_CONFIG",
                                 description: "Path to configuration file",
                                 optional: true,
                                 type: String),
    FastlaneCore::ConfigItem.new(key: :skip_build,
                                 env_name: "PERIPHERY_SKIP_BUILD",
                                 description: "Skip the project build step",
                                 optional: true,
                                 default_value: false,
                                 type: Boolean),
    FastlaneCore::ConfigItem.new(key: :index_store_path,
                                 env_name: "PERIPHERY_INDEX_STORE_PATH",
                                 description: "Path to index store to use",
                                 optional: true,
                                 type: String)
  ]
end

.descriptionObject



163
164
165
# File 'lib/fastlane/plugin/periphery/actions/periphery_action.rb', line 163

def self.description
  "Identifies unused code in Swift projects using Periphery"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


206
207
208
# File 'lib/fastlane/plugin/periphery/actions/periphery_action.rb', line 206

def self.is_supported?(platform)
  [:ios, :mac].include?(platform)
end

.outputObject



200
201
202
203
204
# File 'lib/fastlane/plugin/periphery/actions/periphery_action.rb', line 200

def self.output
  [
    ["PERIPHERY_RESULTS", "The output of periphery decoded into an array of Result objects."]
  ]
end

.return_valueObject



171
172
173
# File 'lib/fastlane/plugin/periphery/actions/periphery_action.rb', line 171

def self.return_value
  "Output of the command parsed from JSON into an array of Result objects"
end

.run(params) ⇒ Object



157
158
159
160
161
# File 'lib/fastlane/plugin/periphery/actions/periphery_action.rb', line 157

def self.run(params)
  require 'json'

  Runner.new(params).run
end