File build_lists_helper.rb
has 292 lines of code (exceeds 250 allowed). Consider refactoring.
module BuildListsHelper
def build_list_status_color(status)
case status
Method build_list_version_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def build_list_version_name(bl)
hash_size=5
if bl.commit_hash.present?
if bl.last_published_commit_hash.present? && bl.last_published_commit_hash != bl.commit_hash
"#{shortest_hash_id bl.last_published_commit_hash, hash_size}...#{shortest_hash_id bl.commit_hash, hash_size}"
Method build_list_version_link
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def build_list_version_link(bl)
hash_size=5
if bl.commit_hash.present?
if bl.last_published_commit_hash.present? && bl.last_published_commit_hash != bl.commit_hash
link_to "#{shortest_hash_id bl.last_published_commit_hash, hash_size}...#{shortest_hash_id bl.commit_hash, hash_size}",
Method get_build_list_version_path
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def get_build_list_version_path(bl)
if bl.commit_hash.present?
if bl.last_published_commit_hash.present? && bl.last_published_commit_hash != bl.commit_hash
diff_path(bl.project, bl.last_published_commit_hash) + "...#{bl.commit_hash}"
else
Method build_list_item_version_link
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def build_list_item_version_link(item, str_version = false)
hash_size=5
if item.version =~ /^[\da-z]+$/ && item.name == item.build_list.project.name
bl = item.build_list
{
Method save_to_repositories
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def save_to_repositories(project, params)
project.repositories.map do |r|
next if r.platform.main? && current_user_platforms.present? && current_user_platforms.exclude?(r.platform.id)
{
There are no issues that match your filters.