Showing 102 of 102 total issues

Class Device has 49 methods (exceeds 20 allowed). Consider refactoring.
Open

  class Device < AbstractDevice
    attr_accessor :usb_ssh_port, :mode, :tool_port, :ios_version
    attr_reader :data_dir

    def initialize(username, password, hostname, port)
Severity: Minor
Found in lib/lib/device.rb - About 6 hrs to fix

    Method initialize has 93 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def initialize *args
          super *args
    
          @icons = Qt::FileIconProvider.new
    
    
    Severity: Major
    Found in lib/gui/fs_viewer_tab_widget.rb - About 3 hrs to fix

      Method initialize has 90 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def initialize *args
            super *args
            @layout = Qt::GridLayout.new
            setLayout(@layout)
      
      
      Severity: Major
      Found in lib/gui/keychain_widget.rb - About 3 hrs to fix

        Method menu has 88 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              def menu
        
                ##########################################
                # MENU
                ##########################################
        Severity: Major
        Found in lib/idb.rb - About 3 hrs to fix

          Class App has 29 methods (exceeds 20 allowed). Consider refactoring.
          Open

            class App
              attr_accessor :uuid, :app_dir, :binary, :cache_dir, :services_map
              attr_reader :data_dir
          
              def initialize(uuid)
          Severity: Minor
          Found in lib/lib/app.rb - About 3 hrs to fix

            File device.rb has 302 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            require_relative 'abstract_device'
            require_relative 'ssh_port_forwarder'
            require_relative 'device_ca_interface'
            require_relative 'usb_muxd_wrapper'
            require 'json'
            Severity: Minor
            Found in lib/lib/device.rb - About 3 hrs to fix

              Method initialize has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  def initialize(username, password, hostname, port)
                    @username = username
                    @password = password
                    @hostname = hostname
                    @port = port
              Severity: Major
              Found in lib/lib/device.rb - About 2 hrs to fix

                Method initialize has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    def initialize *args
                      super *args
                
                      @fuzz_config_layout = Qt::GridLayout.new
                      setLayout @fuzz_config_layout
                Severity: Major
                Found in lib/gui/url_scheme_fuzz_widget.rb - About 2 hrs to fix

                  Method initialize has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def initialize(*args)
                        super(*args)
                        @layout = Qt::GridLayout.new
                        setLayout(@layout)
                        setWindowTitle("CA Certificate Management")
                  Severity: Major
                  Found in lib/gui/ca_manager_dialog.rb - About 2 hrs to fix

                    File fs_viewer_tab_widget.rb has 272 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    require_relative '../lib/rsync_git_manager'
                    module Idb
                    
                      class FSViewerControlGroupBox < Qt::GroupBox
                        def initialize *args
                    Severity: Minor
                    Found in lib/gui/fs_viewer_tab_widget.rb - About 2 hrs to fix

                      Method initialize has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          def initialize *args
                            super *args
                      
                            @pbs_to_watch = Hash.new
                            @pbs_to_watch["general"] = ""
                      Severity: Major
                      Found in lib/gui/pasteboard_monitor_widget.rb - About 2 hrs to fix

                        Method menu has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                        Open

                              def menu
                        
                                ##########################################
                                # MENU
                                ##########################################
                        Severity: Minor
                        Found in lib/idb.rb - About 2 hrs 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

                        File app.rb has 266 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        require_relative 'plist_util'
                        require_relative 'app_binary'
                        require_relative 'CgBI'
                        require_relative 'ios8_last_launch_services_map_wrapper'
                        require_relative 'ios10_application_state_db_wrapper'
                        Severity: Minor
                        Found in lib/lib/app.rb - About 2 hrs to fix

                          Method initialize has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def initialize *args
                                super *args
                                @layout = Qt::GridLayout.new
                                setLayout(@layout)
                          
                          
                          Severity: Minor
                          Found in lib/gui/keychain_widget.rb - About 2 hrs 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_local_port_forward has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def setup_local_port_forward
                                @local_forward_tab = Qt::Widget.new self
                                forward_config_layout = Qt::GridLayout.new
                                @local_forward_tab.setLayout forward_config_layout
                                addTab(@local_forward_tab,"Local")
                          Severity: Major
                          Found in lib/gui/ssh_port_forward_tab_widget.rb - About 2 hrs to fix

                            Method setup_remote_port_forward has 56 lines of code (exceeds 25 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: Major
                            Found in lib/gui/ssh_port_forward_tab_widget.rb - About 2 hrs to fix

                              Method initialize has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def initialize *args
                                    super *args
                              
                                    layout = Qt::VBoxLayout.new
                                    setLayout(layout)
                              Severity: Major
                              Found in lib/gui/tool_widget.rb - About 2 hrs to fix

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

                                    def refresh
                                      @list.clear
                                      @list.setEnabled true
                                      @default_protection.update
                                      plist_files = $selected_app.find_plist_files
                                Severity: Major
                                Found in lib/gui/plist_file_widget.rb and 1 other location - About 2 hrs to fix
                                lib/gui/sqlite_widget.rb on lines 65..84

                                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 79.

                                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 2 locations. Consider refactoring.
                                Open

                                    def refresh
                                      @list.clear
                                      @list.setEnabled true
                                      @default_protection.update
                                      sqlite_dbs = $selected_app.find_sqlite_dbs
                                Severity: Major
                                Found in lib/gui/sqlite_widget.rb and 1 other location - About 2 hrs to fix
                                lib/gui/plist_file_widget.rb on lines 59..77

                                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 79.

                                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

                                Method initialize has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    def initialize *args
                                      super *args
                                
                                      @model = Qt::StandardItemModel.new
                                
                                
                                Severity: Minor
                                Found in lib/gui/snoop_it_keychain_widget.rb - About 2 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language