Showing 359 of 407 total issues
Method call
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def call(params)
results = []
disable_pp_dashboard_permission = GoodData::Helpers.to_boolean(params.disable_pp_dashboard_permission)
collect_synced_status = collect_synced_status(params)
failed_projects = ThreadSafe::Array.new
- 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 26 (exceeds 5 allowed). Consider refactoring. Open
def call(params)
results = []
client = params.gdc_gd_client
development_client = params.development_client
- 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 26 (exceeds 5 allowed). Consider refactoring. Open
def call(params)
return [] unless params.dynamic_params
schedule_title_column = params.schedule_title_column&.downcase || 'schedule_title'
client_id_column = params.client_id_column&.downcase || 'client_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 replace_from_mapping
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
def replace_from_mapping(mapping, opts = {})
default = {
:purge => false,
:dry_run => false
}
Class DataSource
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
class DataSource < Rest::Resource
attr_accessor :connection_info
DATA_SOURCES_URL = '/gdc/dataload/dataSources'
SNOWFLAKE = 'snowflake'
Method transfer_processes
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def transfer_processes(from_project, to_project, options = {})
options = GoodData::Helpers.symbolize_keys(options)
aliases = {}
to_project_processes = to_project.processes
additional_hidden_params = options[:additional_hidden_params] || {}
- 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 load_data
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def load_data(params, data_source)
first_name_column = params.first_name_column&.downcase || 'first_name'
last_name_column = params.last_name_column&.downcase || 'last_name'
login_column = params.login_column&.downcase || 'login'
password_column = params.password_column&.downcase || 'password'
- 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 check_params
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def check_params(specification, params)
specification.keys.each do |param_name|
value = params.send(param_name)
type = specification[param_name][:type]
if value.nil? || (value.is_a?(String) && value.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 transfer_attribute_drillpaths
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def transfer_attribute_drillpaths(source_project, targets)
semaphore = Mutex.new
# Convert to array
targets = [targets] unless targets.is_a?(Array)
- 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 resolve_reference_params
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def resolve_reference_params(data_params, params)
reference_values = []
regexps = Regexp.union(/\\\\/, /\\\$/, /\$\{([^\n\{\}]+)\}/)
resolve_reference = lambda do |v|
if v.is_a? Hash
- 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 25 (exceeds 5 allowed). Consider refactoring. Open
def call(params)
# set default value for include_computed_attributes
# (we won't have to do this after TMA-690)
include_ca = params.include_computed_attributes
include_ca = true if include_ca.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
File domain.rb
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'cgi'
require_relative 'profile'
require_relative '../extensions/enumerable'
require_relative '../rest/object'
Class Domain
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
class Domain < Rest::Resource
attr_reader :name
USER_LANGUAGES = {
'en-US' => 'English',
Class MdObject
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
class MdObject < Rest::Resource
MD_OBJ_CTG = 'obj'
IDENTIFIERS_CFG = 'instance-identifiers'
extend Mixin::MdIdToUri
Method call
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def call(params)
results = []
collect_synced_status = collect_synced_status(params)
failed_projects = ThreadSafe::Array.new
- 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 24 (exceeds 5 allowed). Consider refactoring. Open
def call(params)
params = params.to_hash
if params['GDC_LOGGING_OFF']
logger = NilLogger.new
elsif params['GDC_LOG_DIRECTORY'] && params['GDC_EXECUTION_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 perform
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
def perform(mode, params = {})
params = convert_params(params)
GoodData.gd_logger.brick = mode
Method upload_multiple_data
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
def upload_multiple_data(data, project_blueprint, options = { :client => GoodData.connection, :project => GoodData.project })
client, project = GoodData.get_client_and_project(options)
project ||= GoodData.project
manifest = {
Method attribute_to_wire
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def self.attribute_to_wire(dataset, attribute)
ls = DatasetBlueprint.labels_for_attribute(dataset, attribute)
labels = ls.map do |l|
{
label: {
- 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 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
def call(params)
synchronize_projects = []
data_product = params.data_product
client = params.gdc_gd_client
collect_synced_status = collect_synced_status(params)