Showing 76 of 102 total issues

Method start_pbwatcher_thread has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def start_pbwatcher_thread pbs
      @pbwatcher_thread = Thread.new do
        channel = $device.ssh.open_channel do |ch|
          ch.request_pty do |ch, success|
          cmd = "/var/root/pbwatcher 1 #{pbs}"
Severity: Minor
Found in lib/gui/pb_watcher_thread.rb - About 1 hr to fix

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

      Method populate_table has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def populate_table
            @keychain = KeychainWrapper.new
            @keychain.parse
            @keychain_tab_widget.clear
            @model.clear
      Severity: Minor
      Found in lib/gui/keychain_widget.rb - About 1 hr to fix

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

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

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

              def initialize
                super
          
                # initialize log
                $log = Log4r::Logger.new 'idb'
          Severity: Minor
          Found in lib/idb.rb - About 1 hr to fix

            Method initialize has 28 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_fs_events_widget.rb - About 1 hr to fix

              Method start_pbwatcher_thread has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  def start_pbwatcher_thread pbs
                    @pbwatcher_thread = Thread.new do
                      channel = $device.ssh.open_channel do |ch|
                        ch.request_pty do |ch, success|
                        cmd = "/var/root/pbwatcher 1 #{pbs}"
              Severity: Minor
              Found in lib/gui/pb_watcher_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 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  def initialize *args
                    super *args
              
                    @icons = Qt::FileIconProvider.new
              
              
              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 initialize has a Cognitive Complexity of 9 (exceeds 5 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 55 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 9 (exceeds 5 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 55 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 parse_load_commands has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def parse_load_commands
                    if @otool_path.nil?
                      @load_commands = nil
                      return
                    end
              Severity: Minor
              Found in lib/lib/otool_wrapper.rb - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  def initialize(*args)
                    super(*args)
                    @layout = Qt::GridLayout.new
                    setLayout(@layout)
                    setWindowTitle("CA Certificate Management")
              Severity: Minor
              Found in lib/gui/ca_manager_dialog.rb - About 55 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 update_device has a Cognitive Complexity of 9 (exceeds 5 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 55 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 start_log has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                def start_log
                  h = HTMLEntities.new
                  @log_window.append_message "Please wait.. Streaming device syslog..."
                  @log_thread = IDeviceSyslogThread.new
                  @log_thread.connect(SIGNAL('new_entry(QString)')) {|line|
              Severity: Minor
              Found in lib/gui/log_widget.rb - About 45 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 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  def initialize(uuid)
                    @uuid = uuid
                    @cache_dir = "#{$tmp_path}/#{uuid}"
                    FileUtils.mkdir_p @cache_dir  unless Dir.exist? @cache_dir
              
              
              Severity: Minor
              Found in lib/lib/app.rb - About 45 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 extract_url_handlers has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  def extract_url_handlers
                    @schemas = Array.new
              
                    if @plist_data['CFBundleURLTypes'] != nil
                      for type in @plist_data['CFBundleURLTypes']
              Severity: Minor
              Found in lib/lib/plist_util.rb - About 45 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 find_icon has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  def find_icon
                    # lets try the easy way first...
                    icon_name = get_raw_plist_value('CFBundleIconFile')
                    return icon_name unless icon_name.nil?
              
              
              Severity: Minor
              Found in lib/lib/app.rb - About 45 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 decrypt_binary! has a Cognitive Complexity of 8 (exceeds 5 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 45 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 check has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  def check
                    # there should really be only one directory in here which is named
                    # based on the bundle id of the app. lets go through all, just in case.
              
                    snap_dirs = @ops.list_dir("#{@snapshot_path}/").reject { |e| e =~ /^\.\.?$/ }
              Severity: Minor
              Found in lib/lib/screen_shot_util.rb - About 45 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_local_port_forward has a Cognitive Complexity of 7 (exceeds 5 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: Minor
              Found in lib/gui/ssh_port_forward_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

              Severity
              Category
              Status
              Source
              Language