gooddata/gooddata-ruby

View on GitHub

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)
Severity: Minor
Found in bin/run_brick.rb - About 35 mins to fix

    Method handle_error has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def handle_error(params, log, brick_type, error, error_message)
    Severity: Minor
    Found in bin/run_brick.rb - About 35 mins to fix

      Method join has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

            def join(master, slave, on, on2, options = {})
      Severity: Minor
      Found in lib/gooddata/helpers/global_helpers.rb - About 35 mins to fix

        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)
        Severity: Minor
        Found in lib/gooddata/lcm/helpers/release_table_helper.rb - About 35 mins to fix

          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)
          Severity: Minor
          Found in lib/gooddata/lcm/actions/collect_dynamic_schedule_params.rb - About 35 mins to fix

            Method profile has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                  def profile(method, path, request_id, stats_on, &block)
            Severity: Minor
            Found in lib/gooddata/rest/connection.rb - About 35 mins to fix

              Method invite has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      def invite(project_id, email, role, msg = GoodData::Project::DEFAULT_INVITE_MESSAGE, options = {})
              Severity: Minor
              Found in lib/gooddata/commands/project.rb - About 35 mins to fix

                Method request has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                      def request(method, uri, data, options = {}, &user_block)
                Severity: Minor
                Found in lib/gooddata/rest/connection.rb - About 35 mins to fix

                  Method add_stat_record has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                        def add_stat_record(method, path, delta, time_stamp, request_id)
                  Severity: Minor
                  Found in lib/gooddata/rest/connection.rb - About 35 mins to fix

                    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))
                              }
                    Severity: Minor
                    Found in lib/gooddata/models/metadata/scheduled_mail.rb - About 35 mins to fix

                    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|
                    Severity: Minor
                    Found in lib/gooddata/models/metadata/report.rb - About 35 mins to fix

                    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
                    Severity: Minor
                    Found in lib/gooddata/models/project.rb - About 35 mins to fix

                    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)
                    Severity: Minor
                    Found in lib/gooddata/models/metadata.rb - About 35 mins to fix

                    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)
                    Severity: Minor
                    Found in lib/gooddata/models/user_group.rb - About 35 mins to fix

                    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)
                    Severity: Minor
                    Found in lib/gooddata/models/metadata/metric.rb - About 35 mins to fix

                    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)
                    Severity: Minor
                    Found in lib/gooddata/models/from_wire.rb - About 35 mins to fix

                    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.'
                    Severity: Minor
                    Found in lib/gooddata/models/project.rb - About 35 mins to fix

                    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?
                    Severity: Minor
                    Found in lib/gooddata/models/project.rb - About 35 mins to fix

                    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
                    
                    
                    Severity: Minor
                    Found in lib/gooddata/models/process.rb - About 35 mins to fix

                    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]
                    Severity: Minor
                    Found in lib/gooddata/models/user_filters/user_filter_builder.rb - About 35 mins to fix

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language