Method does_it_fit_stability?
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def self.does_it_fit_stability?( version_number, stability )
patch = self.patch?( version_number )
return true if (stability.casecmp( A_STABILITY_PATCH ) == 0) && patch
stable = self.stable?( version_number )
- 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 stability_tag_for
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def self.stability_tag_for( version )
if version.to_s.match(/@.*$/)
spliti = version.split("@")
return spliti[1]
else
- 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 stable?
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def self.stable? value
return true if value.to_s.empty?
return false if value.to_s.match(/\Adev-/i) || value.to_s.match(/-dev\z/i)
return false if self.preview?( 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"
Further reading
Method value_for
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.value_for( value )
return 0 if self.dev? value
return 2 if self.snapshot? value
return 3 if self.alpha? value
return 4 if self.beta? 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"
Further reading
Method value_for_key
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.value_for_key( value )
return 0 if A_STABILITY_DEV.eql? value
return 2 if A_STABILITY_SNAPSHOT.eql? value
return 3 if A_STABILITY_ALPHA.eql? value
return 4 if A_STABILITY_BETA.eql? 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"
Further reading
Method tagged?
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.tagged? value
return true if self.patch?(value)
return true if self.alpha?(value)
return true if self.beta?(value)
return true if self.dev?(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"
Further reading
Method remove_tag
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.remove_tag value
if self.patch? value
return value.gsub(/\.patch.*$/i, "")
elsif self.alpha? value
new_value = value.gsub(/\.[\w-]*alpha.*$/i, "")
- 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
return 11 if self.patch? value
Avoid too many return
statements within this method. Open
return 5 if A_STABILITY_RC.eql? value
Avoid too many return
statements within this method. Open
return true if value.to_s.match(/.*patch.*/i)
Avoid too many return
statements within this method. Open
return true if self.rc?(value)
Avoid too many return
statements within this method. Open
return value.gsub(/\.jbossorg.*$/i, "")
Avoid too many return
statements within this method. Open
return A_STABILITY_SNAPSHOT
Avoid too many return
statements within this method. Open
return true if value.to_s.match(/.+FINAL.*/i)
Avoid too many return
statements within this method. Open
return 6 if self.pre? value
Avoid too many return
statements within this method. Open
return 1
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return 5 if self.rc? value
Avoid too many return
statements within this method. Open
return true if value.to_s.match(/.+GA.*/i)
Avoid too many return
statements within this method. Open
return 6 if A_STABILITY_PRE.eql? value
Avoid too many return
statements within this method. Open
return 10 if A_STABILITY_STABLE.eql? value
Avoid too many return
statements within this method. Open
return 1
Avoid too many return
statements within this method. Open
return true if self.pre?(value)
Avoid too many return
statements within this method. Open
return value.gsub(/\.snapshot.*$/i, "")
Avoid too many return
statements within this method. Open
return false
Avoid too many return
statements within this method. Open
return A_STABILITY_RC
Avoid too many return
statements within this method. Open
return A_STABILITY_BETA
Avoid too many return
statements within this method. Open
return value.gsub(/\.[\w-]*pre.*$/i, "")
Avoid too many return
statements within this method. Open
return A_STABILITY_PRE
Avoid too many return
statements within this method. Open
return A_STABILITY_ALPHA
Avoid too many return
statements within this method. Open
return value
Avoid too many return
statements within this method. Open
return true if (stability.casecmp( A_STABILITY_BETA ) == 0) && beta
Avoid too many return
statements within this method. Open
return true if value.to_s.match(/.+SP.*/i)
Avoid too many return
statements within this method. Open
return true if (stability.casecmp( A_STABILITY_DEV ) == 0)
Avoid too many return
statements within this method. Open
return 11 if A_STABILITY_PATCH.eql? value
Avoid too many return
statements within this method. Open
return 10 if self.stable? value
Avoid too many return
statements within this method. Open
return true if self.snapshot?(value)
Avoid too many return
statements within this method. Open
return true if self.jbossorg?(value)
Avoid too many return
statements within this method. Open
return true if (stability.casecmp( A_STABILITY_ALPHA ) == 0) && alpha
Avoid too many return
statements within this method. Open
return true if (stability.casecmp( A_STABILITY_SNAPSHOT ) == 0) && snapshot
Avoid too many return
statements within this method. Open
return A_STABILITY_DEV