Showing 16 of 22 total issues
Method extract
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def extract(args = {})
buffer = [block(@name)]
buffer << "CREATE#{" #{@temporary}" if @temporary} TABLE #{@name}"
buffer << "("
- 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 handle_table_data
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def handle_table_data(args)
Log.info("Handling table data...")
@exclude_data = args[:exclude_data] if args[:exclude_data]
@include_data = args[:include_data] if args[:include_data]
- 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 extract
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def extract(args = {})
buffer = [block(@name)]
buffer << "CREATE#{" #{@temporary}" if @temporary} TABLE #{@name}"
buffer << "("
Method fetch
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def fetch(args = {})
@include_pattern = args[:include]
@exclude_pattern = args[:exclude]
Objects.all.each do |object|
- 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 convert_type
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def convert_type
case @type
when "FLOAT"
buffer = @type.to_s
buffer << "(#{@data_precision})" unless @data_precision == 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 fetch
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def fetch
@comment = Comment.find(type: "TABLE", name: @name)
@columns = Column.all(object_name: @name)
connection = Connection.instance.get
- 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 extract_summary
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def extract_summary
Log.info("Summarizing...")
buffer = [block("Summary of #{@username}"), nil]
Method format_values
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def format_values(name_type_map, item)
buffer = []
item.each_pair do |key, value|
if value.nil?
Method default_each
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def default_each
@data.keys.sort_by { |type| type_sequence(type) }.each do |type|
@data[type].keys.sort.each do |name|
object = @data[type][name]
next if object.system_object?
- 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 reverse_default_each
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def reverse_default_each
@data.keys.sort_by { |type| type_sequence(type) }.reverse_each do |type|
@data[type].keys.sort.each do |name|
object = @data[type][name]
next if object.system_object?
- 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 detect_system_objects
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def detect_system_objects
Log.info("Detecting system objects...")
# detect materialized view tables
@data["MATERIALZIED VIEW"].values.each do |object|
- 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 extract_summary
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def extract_summary
Log.info("Summarizing...")
buffer = [block("Summary of #{@username}"), nil]
- 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 fetch
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def fetch(args = {})
# fetch details in parallel
# number of threads = physical connections / 2 to prevent application locking
worker = (1..Connection.instance.worker / 2).map {
Thread.new do
- 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 extract
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def extract(args = {})
buffer = [block(@name)]
buffer << "CREATE OR REPLACE VIEW #{@name}"
buffer << "("
- 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 all
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.all(args = {})
columns = []
connection = Connection.instance.get
cursor = connection.exec("select column_name, data_type, data_length, data_precision, data_scale, nullable, data_default from user_tab_columns where table_name = '#{args[:object_name]}' order by column_id")
while (row = cursor.fetch)
- 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 extract
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def extract(args = {})
buffer = [block(@name)]
buffer << "CREATE SEQUENCE #{@name}"
buffer << " START WITH #{@last_number}"
buffer << " MAXVALUE #{@max_value}"
- 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"