Showing 76 of 102 total issues

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

    def add_dirs parent, cur_dir
      if parent.text(2) == "true"
        # we added children for this already
        return
      end
Severity: Minor
Found in lib/gui/fs_viewer_tab_widget.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 initialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def initialize(username, password, hostname, port)
      @username = username
      @password = password
      @hostname = hostname
      @port = port
Severity: Minor
Found in lib/lib/device.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_in_main_thread has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def self.execute_in_main_thread(blocking = false, sleep_period = 0.001)
    if Thread.current != Thread.main
      complete = false
      QtThreadFix.ruby_thread_queue << lambda {|| yield; complete = true}
      if blocking
Severity: Minor
Found in lib/idb.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 refresh has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def refresh
      @list.clear
      @list.setEnabled true
      @default_protection.update
      cache_dbs = $selected_app.find_cache_dbs
Severity: Minor
Found in lib/gui/cache_db_widget.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 refresh has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def refresh
      @list.clear
      @list.setEnabled true
      @default_protection.update
      sqlite_dbs = $selected_app.find_sqlite_dbs
Severity: Minor
Found in lib/gui/sqlite_widget.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 refresh has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def refresh
      @list.clear
      @list.setEnabled true
      @default_protection.update
      plist_files = $selected_app.find_plist_files
Severity: Minor
Found in lib/gui/plist_file_widget.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 initialize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def initialize *args
      super *args

      # details on selected app
      @layout = Qt::GridLayout.new
Severity: Minor
Found in lib/gui/global_app_details_group_box.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_subdirs? has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def has_subdirs? dir
      files = $device.ops.list_dir_full dir
      if files.length == 2
        # only "." and ".."
        return false
Severity: Minor
Found in lib/gui/fs_viewer_tab_widget.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 rsync_section has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def rsync_section
      @rsync_label = Qt::Label.new "<b>rsync</b><br>(folder synchronization)"
      @layout.addWidget @rsync_label, 7, 0

      if $device.rsync_installed?
Severity: Minor
Found in lib/gui/device_status_dialog.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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def self.run

      # initialize log
      $log = Log4r::Logger.new 'port_forward'
      outputter = Log4r::Outputter.stdout
Severity: Minor
Found in lib/helper/ssh_port_forwarder.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 cycript_section has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def cycript_section
      @cycript_label = Qt::Label.new "<b>cycript</b><br>(explore and modify running applications using a hybrid of Objective-C++ and JavaScript. http://www.cycript.org/ )"
      @layout.addWidget @cycript_label, 8, 0

      if $device.cycript_installed?
Severity: Minor
Found in lib/gui/device_status_dialog.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 open_section has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def open_section
      @open_label = Qt::Label.new "<b>open</b><br>(Open apps on the device)"
      @layout.addWidget @open_label, 1, 0

      if $device.open_installed?
Severity: Minor
Found in lib/gui/device_status_dialog.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 setup_remote_port_forward has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def setup_remote_port_forward
      @remote_forward_tab = Qt::Widget.new self
      forward_config_layout = Qt::GridLayout.new
      @remote_forward_tab.setLayout forward_config_layout
      addTab(@remote_forward_tab,"Remote")
Severity: Minor
Found in lib/gui/ssh_port_forward_tab_widget.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 dumpdecrypted_section has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def dumpdecrypted_section
      @dumpdecrypted_label = Qt::Label.new "<b>dumpdecrypted</b><br>(Decrypt app binaries on the device).<br>Developed and maintained by Stefan Esser https://github.com/stefanesser/dumpdecrypted"
      @layout.addWidget @dumpdecrypted_label, 3, 0

      if $device.dumpdecrypted_installed?
Severity: Minor
Found in lib/gui/device_status_dialog.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 sync_dir has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def sync_dir(remote, local_relative)
      local = @local_path + "/" + local_relative
      if $settings['device_connection_mode'] == "ssh"
        cmd = "rsync -avz -e 'ssh -oStrictHostKeyChecking=no  -p #{$settings.ssh_port}'" \
              "  #{$settings.ssh_username}@#{$settings.ssh_host}:#{Shellwords.escape(remote)}/" \
Severity: Minor
Found in lib/lib/rsync_git_manager.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 process_symbol_table has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def process_symbol_table
      if @otool_path.nil?
        @canaries = "Error"
        @arc = "Error"
        return
Severity: Minor
Found in lib/lib/otool_wrapper.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