Showing 102 of 102 total issues

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

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        elsif RbConfig::CONFIG['host_os'] =~ /linux/
          Process.spawn "'#{$settings['sqlite_editor']}' '#{cache_name}'"
        else
          Process.spawn "open -a '#{$settings['sqlite_editor']}' '#{cache_name}'"
Severity: Minor
Found in lib/gui/cache_db_widget.rb and 1 other location - About 25 mins to fix
lib/gui/sqlite_widget.rb on lines 25..28

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            if RbConfig::CONFIG['host_os'] =~ /linux/
              Process.spawn "'#{$settings['sqlite_editor']}' '#{cache_name}'"
            else
              Process.spawn "open -a '#{$settings['sqlite_editor']}' '#{cache_name}'"
Severity: Minor
Found in lib/gui/sqlite_widget.rb and 1 other location - About 25 mins to fix
lib/gui/cache_db_widget.rb on lines 18..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      case e.value["action"].value
        when 1
          mode = "Added"
        when 2
          mode = "Modified"
Severity: Minor
Found in lib/gui/snoop_it_keychain_widget.rb and 2 other locations - About 15 mins to fix
lib/gui/snoop_it_fs_events_widget.rb on lines 113..121
lib/gui/snoop_it_fs_events_widget.rb on lines 129..137

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      case e.value["accessMode"].value
        when 0
          mode = "Error"
        when 1
          mode = "Read-Only"
Severity: Minor
Found in lib/gui/snoop_it_fs_events_widget.rb and 2 other locations - About 15 mins to fix
lib/gui/snoop_it_fs_events_widget.rb on lines 129..137
lib/gui/snoop_it_keychain_widget.rb on lines 117..125

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      case e.value["class"].value
        when 1
          dp_class = "NSFileProtectionNone"
        when 2
          dp_class = "NSFileProtectionComplete"
Severity: Minor
Found in lib/gui/snoop_it_fs_events_widget.rb and 2 other locations - About 15 mins to fix
lib/gui/snoop_it_fs_events_widget.rb on lines 113..121
lib/gui/snoop_it_keychain_widget.rb on lines 117..125

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    def reset
      @model.clear
      @model.setHorizontalHeaderItem(0, Qt::StandardItem.new("Subject"))
      @model.setHorizontalHeaderItem(1, Qt::StandardItem.new("Expiry"))
      @model.setHorizontalHeaderItem(2, Qt::StandardItem.new("Issuer"))
Severity: Minor
Found in lib/gui/snoop_it_sensitive_api_widget.rb and 1 other location - About 15 mins to fix
lib/gui/snoop_it_fs_events_widget.rb on lines 71..75

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

    def reset
      @model.clear
      @model.setHorizontalHeaderItem(0, Qt::StandardItem.new("Subject"))
      @model.setHorizontalHeaderItem(1, Qt::StandardItem.new("Expiry"))
      @model.setHorizontalHeaderItem(2, Qt::StandardItem.new("Issuer"))
Severity: Minor
Found in lib/gui/snoop_it_fs_events_widget.rb and 1 other location - About 15 mins to fix
lib/gui/snoop_it_sensitive_api_widget.rb on lines 51..55

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language