Showing 359 of 407 total issues
Method handle_warning
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def handle_warning(params, log, brick_type, error, summary_error)
Method handle_error
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def handle_error(params, log, brick_type, error, error_message)
Method join
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def join(master, slave, on, on2, options = {})
Method update_latest_master_to_nfs
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def update_latest_master_to_nfs(domain_id, data_product_id, segment_id, master_pid, version)
Method add_dynamic_param
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_dynamic_param(params, client_id, schedule_name, param_name, param_value)
Method profile
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def profile(method, path, request_id, stats_on, &block)
Method invite
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def invite(project_id, email, role, msg = GoodData::Project::DEFAULT_INVITE_MESSAGE, options = {})
Method request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def request(method, uri, data, options = {}, &user_block)
Method add_stat_record
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_stat_record(method, path, delta, time_stamp, request_id)
Method convert_attachment
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def convert_attachment(item, opts)
if item.is_a?(GoodData::Dashboard)
{
dashboardAttachment: GoodData::DashboardAttachment::DEFAULT_OPTS.merge(opts.merge(:uri => item.uri))
}
- 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 data_result
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def data_result(result, options = {})
client = options[:client]
data_result_uri = result['execResult']['dataResult']
begin
result = client.poll_on_response(data_result_uri, options) do |body|
- 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 fuzzy_get_user
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def fuzzy_get_user(name, user_list = users)
return name if name.instance_of?(GoodData::Membership)
return member(name) if name.instance_of?(GoodData::Profile)
name = name.is_a?(Hash) ? name[:login] || name[:uri] : name
return nil unless name
- 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 set_flag
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def set_flag(flag, value)
meta['flags'] = [] unless meta['flags']
if (value == '1' || value == 1 || value == true) && !has_flag?(flag)
meta['flags'].push(flag)
- 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 []
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def [](id, opts = {})
# TODO: Replace with GoodData.get_client_and_project(opts)
project = opts[:project]
fail 'Project has to be passed in options' unless project
fail 'Project has to be of type GoodData::Project' unless project.is_a?(GoodData::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 replace_value
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def replace_value(label, value, for_label, for_value = nil)
label = label.respond_to?(:primary_label) ? label.primary_label : label
if for_value
for_label = for_label.respond_to?(:primary_label) ? for_label.primary_label : for_label
value_uri = label.find_value_uri(value)
- 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 parse_facts
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.parse_facts(stuff)
facts = stuff['dataset']['facts'] || []
facts.map do |fact|
{}.tap do |f|
f[:type] = resolve_fact_type(fact)
- 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 objects_export
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def objects_export(objs, options = {})
fail 'Nothing to migrate. You have to pass list of objects, ids or uris that you would like to migrate' if objs.nil?
objs = Array(objs).map { |o| o.respond_to?(:uri) ? o.uri : o }
if objs.empty?
GoodData.logger.warn 'Nothing to migrate.'
- 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 create
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create(opts = { client: GoodData.connection }, &block)
GoodData.logger.info "Creating project #{opts[:title]}"
auth_token = opts[:auth_token] || opts[:token]
if auth_token.nil? || auth_token.empty?
- 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 deploy_simple_process
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def deploy_simple_process(path, options = { client: GoodData.client, project: GoodData.project })
client, project = GoodData.get_client_and_project(options)
fail 'Path is not specified' unless 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 execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.execute(user_filters, project_filters, klass, options = {})
client = options[:client]
project = options[:project]
ignore_missing_values = options[:ignore_missing_values]
- 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"