Showing 80 of 167 total issues
Method update_project!
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def update_project!(project: nil)
unless project.nil?
raise "project must be configured with an instance of #{Project.name}" unless project.class <= Project
end
- 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 fastfile_from_repo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def fastfile_from_repo(repo_config: nil, branch: nil, sha: nil)
git_repo = FastlaneCI::GitRepo.new(
git_config: repo_config,
local_folder: Dir.mktmpdir,
provider_credential: @provider_credential,
- 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 reload_settings
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def reload_settings
JSONSettingDataSource.file_semaphore.synchronize do
@settings = AvailableSettings.available_settings
unless File.exist?(setting_file_path)
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
def run
# send logs that get put on the output queue.
# this needs to be on a separate thread since Queue is a threadsafe blocking queue.
Thread.new do
while state == "running"
- 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 update_all_open_prs_without_status_to_pending_status!
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def update_all_open_prs_without_status_to_pending_status!(repo_full_name: nil, status_context: nil)
open_pr_commits = open_pull_requests(repo_full_name: repo_full_name)
updated_commits = []
open_pr_commits.each do |open_pull_request|
- 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 reload_notifications
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def reload_notifications
JSONNotificationDataSource.file_semaphore.synchronize do
@notifications =
if !File.exist?(notifications_file_path)
notifications_dirname = File.dirname(notifications_file_path)
- 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 ensure_proper_setup
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def ensure_proper_setup(route = nil)
route = "#{self::HOME}*" if route.nil?
before(route) do
if !route.start_with?("/onboarding_erb") && !Services.onboarding_service.correct_setup?
- 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 call
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def call(env)
unless Faye::WebSocket.websocket?(env)
# This is a regular HTTP call (no socket connection)
# so just redirect to the user's app
return @app.call(env)
- 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 checkout_commit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def checkout_commit(sha: nil, repo_auth: self.repo_auth, use_global_git_mutex: true, completion_block: nil)
perform_block(use_global_git_mutex: use_global_git_mutex) do
repo_url = git_config.git_url
logger.info("Checking out sha: #{sha} from #{repo_url}")
setup_auth(repo_auth: repo_auth)
- 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
Avoid too many return
statements within this method. Open
return false
Method setup_build_specific_environment_variables
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def setup_build_specific_environment_variables
@environment_variables_set = []
# Set the CI specific Environment variables first
build_url = File.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 validate_initialization_params!
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def validate_initialization_params!(
git_config: nil,
local_folder: nil,
provider_credential: nil,
async_start: nil,
- 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 retrieve!
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def retrieve!(artifact:)
raise "Artifact to store was not provided or wrong type provided" unless artifact&.is_a?(Artifact)
if File.exist?(artifact.reference)
artifact_reference = artifact.reference
- 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 open_pull_requests
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def open_pull_requests(repo_full_name: nil, branches: nil)
all_open_pull_requests = []
github_action(client) do |c|
all_open_pull_requests = c.pull_requests(repo_full_name, state: "open").map do |pr|
# This can happen, not sure why, seems to do with other people's forks, maybe they don't exist?
- 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 user_has_valid_github_token?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def user_has_valid_github_token?(provider_credentials: [])
provider_credentials.each do |provider_credential|
if provider_credential.type == FastlaneCI::ProviderCredential::PROVIDER_CREDENTIAL_TYPES[:github]
if provider_credential.api_token.nil?
return false
- 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 setup_tooling_environment?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def setup_tooling_environment?
xcode_version_file_path = File.join(repo.local_folder, ".xcode-version")
unless File.exist?(xcode_version_file_path)
logger.debug("No `.xcode-version` file found for repo '#{project.project_name}', " \
"not managing Xcode for this one...")
- 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 environment_variables_for_worker
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def environment_variables_for_worker
# Set the CI specific Environment variables first
# We try to follow the existing formats
# https://wiki.jenkins.io/display/JENKINS/Building+a+software+project
- 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 required_keys_and_proper_remote_configuration_repo?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def required_keys_and_proper_remote_configuration_repo?
return @setup_correctly unless @setup_correctly.nil?
unless no_missing_keys?
logger.debug("Missing environment variables.")
- 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 viewmodel_from!
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def viewmodel_from!(object:)
raise "Override base_model(model) in order to use the ViewModel mixin." if @base_model.nil?
raise "Incorrect object type. Expected #{@base_model}, got #{object.class}" unless object.kind_of?(@base_model)
if object.respond_to?(:to_object_dictionary)
instance_variables = @base_model.instance_variables
- 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 pre_run_action
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def pre_run_action(&completion_block)
logger.debug("Running pre_run_action in checkout_sha")
checkout_sha do |checkout_success|
if checkout_success
- 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"