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
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"))
- Read upRead up
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
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
- Read upRead up
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
Method initialize
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize *args
super *args
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
Method initialize
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize *args
super *args
@layout = Qt::GridLayout.new
setLayout(@layout)
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
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)
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
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 " \
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)}/" \
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) {
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"))
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"
Method stream
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def stream function
puts "Starting"
@id = 0
- Read upRead up
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"] = ""
- Read upRead up
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..."
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