Method user_settings
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def user_settings
@_jars_maven_user_settings_ = nil unless instance_variable_defined?(:@_jars_maven_user_settings_)
if @_jars_maven_user_settings_.nil?
if (settings = Jars.absolute(Jars.to_prop(MAVEN_SETTINGS)))
unless File.exist?(settings)
- 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 global_settings
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def global_settings
@_jars_maven_global_settings_ = nil unless instance_variable_defined?(:@_jars_maven_global_settings_)
if @_jars_maven_global_settings_.nil?
if (mvn_home = ENV['M2_HOME'] || ENV['MAVEN_HOME'])
settings = File.join(mvn_home, 'conf/settings.xml')
- 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 effective_settings
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def effective_settings
@_jars_effective_maven_settings_ = nil unless instance_variable_defined?(:@_jars_effective_maven_settings_)
if @_jars_effective_maven_settings_.nil?
begin
require 'rubygems/request'
- 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"