leoniv/ass_launcher

View on GitHub

Showing 33 of 44 total issues

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

        def num(name, desc, *clients, **options, &block)
Severity: Minor
Found in lib/ass_launcher/enterprise/cli/spec_dsl.rb - About 35 mins to fix

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

            def path_twice(name, desc, *clients, **options, &block)
    Severity: Minor
    Found in lib/ass_launcher/enterprise/cli/spec_dsl.rb - About 35 mins to fix

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

              def path(name, desc, *clients, **options, &block)
      Severity: Minor
      Found in lib/ass_launcher/enterprise/cli/spec_dsl.rb - About 35 mins to fix

        Method dry_run has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

                def dry_run(cmd)
                  r = "#{cmd.cmd.gsub(' ', '\\ ')} "
                  if mode == :createinfobase
                    r << cmd.args.join(' ')
                  else
        Severity: Minor
        Found in lib/ass_launcher/cmd.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 args has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

                    def args
                      r = {}
                      r[:name] = name
                      r[:subparameters] = subparameters if subparameters
                      r[:group] = group if group
        Severity: Minor
        Found in bin/lib/dev_helper/cli_def_snippets.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 to_cmd has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

              def to_cmd
                r = ''
                args = to_args
                args.each_with_index do |v, i|
                  next unless i.even?
        Severity: Minor
        Found in lib/ass_launcher/support/connection_string.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 dsl_method_args has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

                def dsl_method_args(i)
                  r = "'#{name}'"
                  r << ", '#{desc}'" if desc
                  r << ", #{clients.map(&:to_s).map(&:downcase)
                    .to_s.gsub(/(\[|\]|")/,'')}" if clients
        Severity: Minor
        Found in bin/lib/dev_helper/cli_def_snippets.rb - About 25 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 to_args_private_proxy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

                def to_args_private_proxy(r)
                  return r unless !wspauto && wspsrv
                  r += ['/Proxy', '', '-Psrv', wspsrv]
                  r += ['-PPort', wspport.to_s] if wspport
                  r += ['-PUser', wspuser] if wspuser
        Severity: Minor
        Found in lib/ass_launcher/support/connection_string.rb - About 25 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 uri_query has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

                def uri_query
                  r = ''
                  r << "N=#{usr}&" if usr
                  r << "P=#{pwd}&" if pwd
                  r << "L=#{locale}&" if locale
        Severity: Minor
        Found in lib/ass_launcher/support/connection_string.rb - About 25 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 make_command has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

                def make_command
                  usr = user
                  pass = password
                  uc_ = uc
                  cs = connection_string
        Severity: Minor
        Found in lib/ass_launcher/cmd.rb - About 25 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 to_query has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

              def to_query(args)
                r = ''
                args.each_with_index do |v, i|
                  next if (i + 1).even?
                  r << "#{v.gsub(CLI_TO_WEB_PARAM_NAME, '')}"
        Severity: Minor
        Found in lib/ass_launcher/enterprise/web_client.rb - About 25 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 included has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

              def self.included(base)
                base.fields.each do |f|
                  base.send(:attr_reader, f.downcase.to_sym) unless\
                    base.instance_methods.include? f.downcase.to_sym
                  base.send(:attr_writer, f.downcase.to_sym) unless\
        Severity: Minor
        Found in lib/ass_launcher/support/connection_string.rb - About 25 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 select_parameters has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

                  def select_parameters
                    r = []
                    AssLauncher::Enterprise::Cli::CliSpec
                      .cli_def.parameters.parameters.each do |p|
                      if match?(p) && not_filtred?(p)
        Severity: Minor
        Found in lib/ass_launcher/cmd.rb - About 25 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