Showing 342 of 432 total issues
Method update_patchinfo
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
def update_patchinfo(project, patchinfo, opts = {})
project.check_write_access!
@patchinfo = patchinfo
opts[:enfore_issue_update] ||= false
- 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 clone_repository_from
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
def clone_repository_from(source_repository)
source_repository.repository_architectures.each do |ra|
repository_architectures.create(architecture: ra.architecture, position: ra.position)
end
- 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 deeply nested control flow statements. Confirmed
if action[:forward]
action[:forward].each do |forward|
if forward[:project] == lprj && forward[:package] == lpkg
link_is_already_devel = true
break
Avoid deeply nested control flow statements. Confirmed
p[:target_package] += ".#{p[:link_target_project].name}" if @extend_names
Avoid deeply nested control flow statements. Open
if prj.is_a?(Project) && prj.find_attribute('OBS', 'BranchTarget')
@copy_from_devel = true
elsif pkg
prj = pkg.project
tpkg_name ||= pkg.releasename
Method parse_single_bugzilla_issue
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
def parse_single_bugzilla_issue(bugzilla_response)
issue = Issue.find_by_name_and_tracker(bugzilla_response['id'].to_s, name)
return unless issue
issue.state = if bugzilla_response['is_open']
- 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 deeply nested control flow statements. Confirmed
options[:methods] << :attrib_namespace_name unless options[:methods].include?(:attrib_namespace_name)
Method check_everbuilt
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
def check_everbuilt(srep, arch)
@everbuilt = false
@eversucceeded = false
@buildcode = nil
- 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 deeply nested control flow statements. Open
if forward[:project] == lprj && forward[:package] == lpkg
link_is_already_devel = true
break
end
Method write_to_backend
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
def write_to_backend
reset_cache
raise ArgumentError, 'no commit_user set' unless commit_user
raise InvalidParameterError, 'Project meta file can not be written via package model' if name == '_project'
- 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 copy_binaries_to_repository
has 7 arguments (exceeds 5 allowed). Consider refactoring. Open
def copy_binaries_to_repository(source_repository, filter_architecture, source_package, target_repo, target_package_name,
multibuild_container, setrelease)
Avoid deeply nested control flow statements. Confirmed
raise IllegalRequest, 'Maintenance requests accept only projects as target' if target_package
Avoid deeply nested control flow statements. Confirmed
raise 'We should have expanded a target_project' unless target_project
Method update_file
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
def update_file
check_permissions_for_file
raise PutFileNoPermission, "Insufficient permissions to store file in package #{@package_name}, project #{@project_name}" unless @allowed
- 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 deeply nested control flow statements. Confirmed
self.makeoriginolder = true if tprj.attribs.find_by(attrib_type: at)
Method parse_status
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
def parse_status(project_name, package)
comments_to_clear = []
outs = []
sortkey = "9-ok-#{package['name']}"
age = age_from_devel(package['develmtime'].to_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 deeply nested control flow statements. Confirmed
next if reviews.any? { |a| a.by_project == r.name && a.by_package.nil? }
Avoid deeply nested control flow statements. Confirmed
unless link_is_already_devel
action[:forward] ||= []
action[:forward] << { project: linkinfo['project'], package: linkinfo['package'], type: 'link' }
end
Method check_action_permission_source!
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
def check_action_permission_source!
return unless source_project
sprj = Project.get_by_name(source_project)
raise UnknownProject, "Unknown source project #{source_project}" unless sprj
- 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 add_channels
has a Cognitive Complexity of 11 (exceeds 8 allowed). Consider refactoring. Open
def add_channels(mode = :add_disabled)
raise InvalidParameterError unless %i[add_disabled skip_disabled enable_all].include?(mode)
return if is_channel?
opkg = origin_container(local: false)
- 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"