rosa-abf/rosa-build

View on GitHub

Showing 210 of 210 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

respond_to do |format|
if @label.save
format.json { render partial: 'labels', locals: {project: @project} }
else
format.json { render text: @label.errors.full_messages, status: 422 }
Severity: Minor
Found in app/controllers/projects/issues_controller.rb and 1 other location - About 20 mins to fix
app/controllers/projects/issues_controller.rb on lines 148..152

Similar blocks of code found in 2 locations. Consider refactoring.
Open

def remline(line)
set_line_number
"<tr class='changes'>
#{td_line_link "#{@diff_prefix}-F#{@diff_counter}L#{line.old_number}", line.old_number}
<td class='line_numbers'></td>
Severity: Minor
Found in app/helpers/diff_helper.rb and 1 other location - About 20 mins to fix
app/helpers/diff_helper.rb on lines 119..129

Similar blocks of code found in 2 locations. Consider refactoring.
Open

respond_to do |format|
if @label.destroy
format.json { render partial: 'labels', locals: {project: @project} }
else
format.json { render json: @label.errors.full_messages, status: 422 }
Severity: Minor
Found in app/controllers/projects/issues_controller.rb and 1 other location - About 20 mins to fix
app/controllers/projects/issues_controller.rb on lines 128..132

Similar blocks of code found in 2 locations. Consider refactoring.
Open

def addline(line)
set_line_number
"<tr class='changes'>
<td class='line_numbers'></td>
#{td_line_link "#{@diff_prefix}-F#{@diff_counter}R#{line.new_number}", line.new_number}
Severity: Minor
Found in app/helpers/diff_helper.rb and 1 other location - About 20 mins to fix
app/helpers/diff_helper.rb on lines 132..142

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if request.patch?
if @user.notifier.update_attributes(settings_notifier_params)
flash[:notice] = I18n.t("flash.settings.saved")
redirect_to notifiers_settings_path and return
end
Severity: Minor
Found in app/controllers/users/settings_controller.rb and 1 other location - About 15 mins to fix
app/controllers/users/settings_controller.rb on lines 74..79

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if request.patch?
if @user.builds_setting.update_attributes(user_builds_setting_params)
flash[:notice] = I18n.t("flash.settings.saved")
redirect_to builds_settings_settings_path and return
end
Severity: Minor
Found in app/controllers/users/settings_controller.rb and 1 other location - About 15 mins to fix
app/controllers/users/settings_controller.rb on lines 63..68

Similar blocks of code found in 2 locations. Consider refactoring.
Open

issues: {
open: prepare_collection(issues_open),
reopen: prepare_collection(issues_reopen),
closed: prepare_collection(issues_closed),
 
 
Severity: Minor
Found in app/presenters/statistic_presenter.rb and 1 other location - About 15 mins to fix
app/presenters/statistic_presenter.rb on lines 38..46

Similar blocks of code found in 2 locations. Consider refactoring.
Open

pull_requests: {
open: prepare_collection(pull_requests_open),
merged: prepare_collection(pull_requests_merged),
closed: prepare_collection(pull_requests_closed),
 
 
Severity: Minor
Found in app/presenters/statistic_presenter.rb and 1 other location - About 15 mins to fix
app/presenters/statistic_presenter.rb on lines 29..37

Similar blocks of code found in 2 locations. Consider refactoring.
Open

def fa_visibility_icon(project)
return nil unless project
image, color = project.public? ? ['unlock-alt', 'text-success fa-fw'] : ['lock', 'text-danger fa-fw']
fa_icon(image, class: color)
Severity: Minor
Found in app/helpers/projects_helper.rb and 1 other location - About 15 mins to fix
app/helpers/platforms_helper.rb on lines 41..44

Similar blocks of code found in 2 locations. Consider refactoring.
Open

def fa_platform_visibility_icon(platform)
return nil unless platform
image, color = platform.hidden? ? ['lock', 'text-danger fa-fw']: ['unlock-alt', 'text-success fa-fw']
fa_icon(image, class: color)
Severity: Minor
Found in app/helpers/platforms_helper.rb and 1 other location - About 15 mins to fix
app/helpers/projects_helper.rb on lines 82..85
Severity
Category
Status
Source
Language