Showing 76 of 102 total issues

Method initialize has 45 lines of code (exceeds 25 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 1 hr to fix

    Method populate_files has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        def populate_files path
          @model.clear
          @model.setHorizontalHeaderItem(0, Qt::StandardItem.new("filename"))
          @model.setHorizontalHeaderItem(1, Qt::StandardItem.new("size"))
          @model.setHorizontalHeaderItem(2, Qt::StandardItem.new("permissions"))
    Severity: Minor
    Found in lib/gui/fs_viewer_tab_widget.rb - About 1 hr 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_device_config has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def setup_device_config
          @device_config_tab = Qt::Widget.new self
          device_config_layout = Qt::GridLayout.new
          @device_config_tab.setLayout device_config_layout
    
    
    Severity: Minor
    Found in lib/gui/settings_tab_widget.rb - About 1 hr to fix

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

          def initialize *args
            super *args
      
            @fuzz_config_layout = Qt::GridLayout.new
            setLayout @fuzz_config_layout
      Severity: Minor
      Found in lib/gui/url_scheme_fuzz_widget.rb - About 1 hr 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 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def initialize *args
            super *args
            @tabs = Hash.new
      
      
      
      Severity: Minor
      Found in lib/gui/main_tab_widget.rb - About 1 hr to fix

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

            def initialize *args
              super  *args
        
        
        
        
        Severity: Minor
        Found in lib/gui/weak_class_dump_widget.rb - About 1 hr to fix

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

              def initialize(args)
                super(*args)
          
                # details on selected app
                @layout = Qt::GridLayout.new
          Severity: Minor
          Found in lib/gui/app_details_group_box.rb - About 1 hr to fix

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

                def initialize *args
                  super *args
            
                  @layout = Qt::GridLayout.new
                  setLayout(@layout)
            Severity: Minor
            Found in lib/gui/settings_dialog.rb - About 1 hr to fix

              Method init_ui has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    def init_ui
                      # setup central widget and grid layout
                      @central_widget = Qt::Widget.new self
                      self.setCentralWidget @central_widget
                      @grid = Qt::GridLayout.new @central_widget
              Severity: Minor
              Found in lib/idb.rb - About 1 hr to fix

                Method parse_event has 34 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_sensitive_api_widget.rb - About 1 hr to fix

                  Method refresh_app_list has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      def refresh_app_list
                        if $device.ios_version >= 8 && $device.ios_version != 10
                          refresh_msg = "Refreshing uicache to ensure app information is" \
                                        "up-to-date. This may take a few seconds."
                          box = Qt::MessageBox.new 1, "Refreshing...", refresh_msg
                  Severity: Minor
                  Found in lib/gui/app_list_dialog.rb - About 1 hr to fix

                    Method update_device has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        def update_device
                          if $device.device?
                            @connect.hide
                            if $device.mode == "usb"
                              usb_mode_text = "<b>USB device:</b> Manually connect via SSH as " \
                    Severity: Minor
                    Found in lib/gui/device_info_group_box.rb - About 1 hr to fix

                      Method sync_dir has 33 lines of code (exceeds 25 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 1 hr to fix

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

                            def initialize *args
                              super *args
                        
                              @refresh = Qt::PushButton.new "Refresh"
                              @refresh.connect(SIGNAL :released) {
                        Severity: Minor
                        Found in lib/gui/sqlite_widget.rb - About 1 hr to fix

                          Method populate_files has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def populate_files path
                                @model.clear
                                @model.setHorizontalHeaderItem(0, Qt::StandardItem.new("filename"))
                                @model.setHorizontalHeaderItem(1, Qt::StandardItem.new("size"))
                                @model.setHorizontalHeaderItem(2, Qt::StandardItem.new("permissions"))
                          Severity: Minor
                          Found in lib/gui/fs_viewer_tab_widget.rb - About 1 hr to fix

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

                                def initialize *args
                                  super *args
                            
                                  @url_handler_list = Qt::GroupBox.new self
                                  @url_handler_list.setTitle "List of registered URL Handlers"
                            Severity: Minor
                            Found in lib/gui/url_scheme_widget.rb - About 1 hr to fix

                              Method stream has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def stream function
                                    puts "Starting"
                                    @id = 0
                              
                              
                              
                              Severity: Minor
                              Found in lib/gui/snoop_it_update_thread.rb - About 1 hr 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 11 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def initialize *args
                                    super *args
                              
                                    @pbs_to_watch = Hash.new
                                    @pbs_to_watch["general"] = ""
                              Severity: Minor
                              Found in lib/gui/pasteboard_monitor_widget.rb - About 1 hr 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 decrypt_binary! has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  def decrypt_binary!
                                    $log.info "Running '#{binary_path}'"
                                    full_remote_path = binary_path
                                    $log.error "Decryption failed. Trying using dumpdecrypted..."
                              
                              
                              Severity: Minor
                              Found in lib/lib/app.rb - About 1 hr to fix

                                Method run has 31 lines of code (exceeds 25 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 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language