Showing 27 of 31 total issues
Class Language
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
class Language
attr_reader :name
attr_reader :path
attr_reader :attributeState
Class OutputFormat
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class OutputFormat
attr_accessor :outputEngine
attr_accessor :parserPath
attr_accessor :extension
attr_reader :optimizationLevel
Method method_missing
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def method_missing(pTagName, *pTagParameters, &pBlock)
@tag << "\n" unless @tag.strip == ''
name = @optimizationLevel != 1 ? pTagName.to_s : optimize_size(pTagName)
currentTagName = "#{@ident}<#{name}"
@tag << currentTagName
- 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 class_generate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def class_generate(pClass)
# We use it because of the block below.
wrapper = self
pClass.each do |singleClass|
@outputEngine.classData name: singleClass.name,
- 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 analyse_second_step
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def analyse_second_step
sort_all_classes
sort_all_aggregations
allActualAggregations = []
- 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_line
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handle_line(pLine)
# TODO: This line is complex, maybe it can be simple. However, notice
# that line_inspect method is expensive, and should be called once.
structures = {
CONDITIONAL_ID => method(:conditional_capture),
- 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_attribute_with_attr
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handle_attribute_with_attr(pAttributeCandidates)
attributes = []
pAttributeCandidates.each do |variable, _value|
if variable =~ /^\s*(?:(?:attr_(?:accessor|reader|writer))\s+:\w+)/
var = variable.split(' ').last
- 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 handling_default_parameter
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handling_default_parameter(pLine)
return pLine unless pLine =~ /=/
partialParameters = if pLine =~ /,/
pLine.split(',')
- 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_equals
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def handle_equals(pStringWithVariables, pStrings)
variables = {}
partialVariable = pStringWithVariables.split(TMP_TOKEN_EQUAL)
value = partialVariable.pop
value = process_value(value, pStrings)
- 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
Avoid too many return
statements within this method. Open
when Languages::IF_LABEL then return true
Avoid too many return
statements within this method. Open
when Languages::CASE_LABEL then return true
Avoid too many return
statements within this method. Open
return build_data(ELSE_REGEX, Languages::ELSE_LABEL, false, false)
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return build_data(UNLESS_REGEX, Languages::UNLESS_LABEL)
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return build_data(ELSIF_REGEX, Languages::ELSIF_LABEL)
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
return build_data(UNLESS_INLINE_REGEX, Languages::UNLESS_LABEL, true)
Avoid too many return
statements within this method. Open
return nil
Avoid too many return
statements within this method. Open
when Languages::LAMBDA_BLOCK_LABEL then return true