Showing 359 of 407 total issues
File project.rb
has 1684 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'csv'
require 'zip'
require 'fileutils'
require 'multi_json'
require 'pmap'
Class Project
has 158 methods (exceeds 20 allowed). Consider refactoring. Open
class Project < Rest::Resource
USER_ACCOUNT_PATH = '/gdc/account/profile/'
USERSPROJECTS_PATH = USER_ACCOUNT_PATH + '%s/projects'
PROJECTS_PATH = '/gdc/projects'
PROJECT_PATH = '/gdc/projects/%s'
Method call
has a Cognitive Complexity of 94 (exceeds 5 allowed). Consider refactoring. Open
def call(params)
client = params.gdc_gd_client
data_product = params.data_product
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 80 (exceeds 5 allowed). Consider refactoring. Open
def call(params)
client = params.gdc_gd_client
domain_name = params.organization || params.domain
fail "Either organisation or domain has to be specified in params" unless domain_name
project = client.projects(params.gdc_project) || client.projects(params.gdc_project_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 transfer_schedules
has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring. Open
def transfer_schedules(from_project, to_project, has_cycle_trigger = false)
to_project_processes = to_project.processes.sort_by(&:name)
from_project_processes = from_project.processes.sort_by(&:name)
from_project_processes.reject!(&:add_v2_component?)
- 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 67 (exceeds 5 allowed). Consider refactoring. Open
def call(params)
client = params.gdc_gd_client
domain_name = params.organization || params.domain
fail "Either organisation or domain has to be specified in params" unless domain_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 call
has a Cognitive Complexity of 64 (exceeds 5 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)
- 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 connection.rb
has 551 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'terminal-table'
require 'securerandom'
require 'monitor'
require 'thread_safe'
require 'rest-client'
Class ProjectBlueprint
has 60 methods (exceeds 20 allowed). Consider refactoring. Open
class ProjectBlueprint
attr_accessor :data
# Instantiates a project blueprint either from a file or from a string containing
# json. Also eats Hash for convenience.
File data_source.rb
has 502 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative '../rest/resource'
module GoodData
class DataSource < Rest::Resource
attr_accessor :connection_info
File user_filter_builder.rb
has 499 lines of code (exceeds 250 allowed). Consider refactoring. Open
require_relative '../project_log_formatter'
require 'active_support/core_ext/hash/indifferent_access'
require 'gooddata/extensions/true'
Class Schedule
has 55 methods (exceeds 20 allowed). Consider refactoring. Open
class Schedule < Rest::Resource
attr_reader :dirty, :json
SCHEDULE_TEMPLATE = {
:schedule => {
Method execute_mufs
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
def self.execute_mufs(user_filters, options = {})
client = options[:client]
project = options[:project]
ignore_missing_values = options[:ignore_missing_values]
users_must_exist = options[:users_must_exist] == false ? false : true
- 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
Class Profile
has 51 methods (exceeds 20 allowed). Consider refactoring. Open
class Profile < Rest::Resource
attr_reader :user, :json
EMPTY_OBJECT = {
'accountSetting' => {
Method upload_multiple_data
has a Cognitive Complexity of 46 (exceeds 5 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 = {
- 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 project_blueprint.rb
has 459 lines of code (exceeds 250 allowed). Consider refactoring. Open
module GoodData
module Model
class ProjectBlueprint
attr_accessor :data
Class DatasetBlueprint
has 50 methods (exceeds 20 allowed). Consider refactoring. Open
class DatasetBlueprint < SchemaBlueprint
# Checks if a dataset has an anchor.
#
# @param dataset [Hash] Dataset blueprint
# @return [Boolean] returns true if dataset has an anchor
Method import_users
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
def import_users(new_users, options = {})
role_list = roles
users_list = users
GoodData.logger.warn("Importing users to project (#{pid})")
- 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 sync_segment_ldm
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
def sync_segment_ldm(params, segment_info)
collect_synced_status = collect_synced_status(params)
failed_projects = ThreadSafe::Array.new
results = ThreadSafe::Array.new
client = params.gdc_gd_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
Class Membership
has 47 methods (exceeds 20 allowed). Consider refactoring. Open
class Membership < Rest::Resource
attr_reader :json
ASSIGNABLE_MEMBERS = [
:email,