Method registration_url
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def registration_url
url = ::Registration::UrlHelpers.boot_reg_url || registration_url_from_profile
return URI(url) if url
# do the SLP scan in AutoYast mode only when allowed in the profile
- 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 update_urls_from_connect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def update_urls_from_connect
begin
url = registration_url
rescue URI::InvalidURIError
raise RegistrationURLError
- 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 get_url_from
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_url_from(url)
return nil unless url.is_a?(::String)
real_url = url.gsub(/\$arch\b/, Yast::Pkg.GetArchitecture)
real_url = real_url.gsub(/\$os_release_name\b/,
- 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"