Showing 23 of 23 total issues
Method collect
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
def collect(base_dir)
report = {}
report['repo_token'] = repo_token if repo_token
report['service_name'] = service_name if service_name
report['service_job_id'] = service_job_id if service_job_id
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method run
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def run(cmd)
@before_action.call if @before_action
if @formatter
puts (cmd + ['|', @formatter]).join(" ")
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method form_data
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def form_data
{}.tap do |fields|
fields[:ipa] = "@#{file}" if file
fields[:dsym] = "@#{dsym}" if dsym
fields[:notes] = notes if notes
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File xcodebuild.rb
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'rake/tasklib'
require 'rake/clean'
require 'open3'
require 'shellwords'
require 'securerandom'
Method collect
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
def collect(base_dir)
report = {}
report['repo_token'] = repo_token if repo_token
report['service_name'] = service_name if service_name
report['service_job_id'] = service_job_id if service_job_id
Method options
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def options
[].tap do |opts|
opts.concat(['-project', project]) if project
opts.concat(['-target', target]) if target
opts.concat(['-workspace', workspace]) if workspace
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method define
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def define
raise 'archive action requires specifying a scheme' unless scheme
raise 'cannot specify both a scheme and targets' if scheme && target
if build_dir
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File distribute.rb
has 257 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'rake/tasklib'
require 'open3'
module XCJobs
module Distribute
Method options
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def options
[].tap do |opts|
opts.concat(['-exportOptionsPlist', options_plist]) if options_plist
opts.concat(['-archivePath', archive_path]) if archive_path
opts.concat(['-exportFormat', export_format]) if export_format
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method form_data
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def form_data
{}.tap do |fields|
fields[:file] = "@#{file}" if file
fields[:api_token] = api_token if api_token
fields[:team_token] = team_token if team_token
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method form_data
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def form_data
{}.tap do |fields|
fields[:token] = token if token
fields[:file] = "@#{file}" if file
fields[:message] = message if message
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method options
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def options
[].tap do |opts|
opts << api_key
opts << build_secret
opts.concat(['-ipaPath', file]) if file
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method run
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run(cmd)
@before_action.call if @before_action
if @formatter
puts (cmd + ['|', @formatter]).join(" ")
Method define
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def define
namespace :version do
desc 'Print the current version'
task :current do
puts InfoPlist.marketing_and_build_version
Method define
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def define
raise 'the scheme is required when specifying build_dir' if build_dir && !scheme
raise 'cannot specify both a scheme and targets' if scheme && target
CLEAN.include(build_dir) if build_dir
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method is_excluded_path
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def is_excluded_path(filepath)
if filepath.start_with?('..')
return true
end
@excludes.each do |exclude|
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method extract_provisioning_profile
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def self.extract_provisioning_profile(provisioning_profile)
if File.file?(provisioning_profile)
provisioning_profile_path = provisioning_profile
else
path = File.join("#{Dir.home}/Library/MobileDevice/Provisioning Profiles/", provisioning_profile)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method define
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def define
namespace :certificates do
desc 'install certificates'
task :install do
sh %[security create-keychain -p "" "#{keychain_name}"]
Method options
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def options
[].tap do |opts|
opts.concat(['-project', project]) if project
opts.concat(['-target', target]) if target
opts.concat(['-workspace', workspace]) if workspace
Method upload
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def upload(url, form_data = {}, header = {})
@before_action.call if @before_action
curl_options = ['curl', '-sSf', "#{url}"]
form_fields = form_data.flat_map { |k, v| ['-F', "#{k}=#{v}"] }
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"