Class Url
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class Url < Base
class << self
# Enable downloading release notes
#
# This method is intended to be used during testing.
Method curl_proxy_args
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def curl_proxy_args
# Import the module when it is needed to avoid building projects (bsc#1079045)
Yast.import "Proxy"
return @curl_proxy_args if @curl_proxy_args
- 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 download_release_notes_index
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def download_release_notes_index(url_base)
url_index = url_base + "/directory.yast"
log.info("Index with available files: #{url_index}")
tmpfile = Tempfile.new("directory.yast-")
- 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 release_notes_content_for_lang_and_format
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def release_notes_content_for_lang_and_format(lang, format)
# If there is an index and the language is not indexed
return nil unless release_notes_index.empty? || indexed_release_notes_for?(lang, format)
# Where we want to store the downloaded release notes
- 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"