Method initialize
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize *args
super *args
@icons = Qt::FileIconProvider.new
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
Method initialize
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize *args
@layout = Qt::GridLayout.new
super *args
setLayout @layout
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 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 a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def initialize *args
super *args
@icons = Qt::FileIconProvider.new
- 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 add_dirs
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add_dirs parent, cur_dir
if parent.text(2) == "true"
# we added children for this already
return
end
- 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 has_subdirs?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def has_subdirs? dir
files = $device.ops.list_dir_full dir
if files.length == 2
# only "." and ".."
return false
- 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"