Showing 76 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

                                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

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

                                      def parse_event e
                                        row = Array.new
                                        row <<   Qt::StandardItem.new(e.value["id"].value.to_s)
                                  
                                        row <<   Qt::StandardItem.new(Time.at(e.value["timestamp"].value).to_s)
                                  Severity: Minor
                                  Found in lib/gui/snoop_it_keychain_widget.rb - About 2 hrs to fix

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

                                        def initialize *args
                                          @layout = Qt::GridLayout.new
                                          super *args
                                          setLayout @layout
                                    
                                    
                                    Severity: Minor
                                    Found in lib/gui/fs_viewer_tab_widget.rb - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language