Skip to content

Commit

Permalink
[ci] Fix EmptyLinesAroundExceptionHandlingKeywords
Browse files Browse the repository at this point in the history
We fix the Layou/EmptyLinesAroundExceptionHandlingKeywords cop
complains.
  • Loading branch information
David Kang committed Dec 12, 2017
1 parent f0a335a commit 24134a6
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 18 deletions.
10 changes: 0 additions & 10 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@
Layout/DotPosition:
Enabled: false

# Offense count: 8
# Cop supports --auto-correct.
Layout/EmptyLinesAroundExceptionHandlingKeywords:
Exclude:
- 'src/api/app/controllers/webui/package_controller.rb'
- 'src/api/app/controllers/webui/project_controller.rb'
- 'src/api/app/controllers/webui/request_controller.rb'
- 'src/api/app/controllers/webui/subscriptions_controller.rb'
- 'src/api/app/controllers/webui/users/subscriptions_controller.rb'

# Offense count: 13
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Expand Down
4 changes: 0 additions & 4 deletions src/api/app/controllers/webui/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@ def branch
flash[:notice] = 'Successfully branched package'
redirect_to(package_show_path(project: created_project_name, package: created_package_name))
end

rescue BranchPackage::DoubleBranchPackageError => exception
flash[:notice] = 'You have already branched this package'
redirect_to(package_show_path(project: exception.project, package: exception.package))
Expand Down Expand Up @@ -840,10 +839,8 @@ def update_build_log
@log_chunk = chunk
@offset += ActiveXML.backend.last_body_length
end

rescue Timeout::Error, IOError
@log_chunk = ''

rescue ActiveXML::Transport::Error => e
if e.summary =~ %r{Logfile is not that big}
@log_chunk = ''
Expand Down Expand Up @@ -1001,7 +998,6 @@ def save_meta
else
errors << "Package doesn't exists in that project."
end

rescue Suse::ValidationError => e
errors << e.message
end
Expand Down
1 change: 0 additions & 1 deletion src/api/app/controllers/webui/project_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,6 @@ def save_meta
@project.store if errors.empty?
end
end

rescue Suse::ValidationError => exception
errors << exception.message
end
Expand Down
1 change: 0 additions & 1 deletion src/api/app/controllers/webui/request_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ def delete_request

request_link = ActionController::Base.helpers.link_to("repository delete request #{req.number}", request_show_path(req.number))
flash[:success] = "Created #{request_link}"

rescue APIException => e
flash[:error] = e.message
if params[:package]
Expand Down
1 change: 0 additions & 1 deletion src/api/app/controllers/webui/subscriptions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ def index
def update
subscriptions_form.update!(params[:subscriptions])
flash[:notice] = 'Notifications settings updated'

rescue ActiveRecord::RecordInvalid
flash[:error] = 'Notifications settings could not be updated due to an error'
ensure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def update

subscriptions_form.update!(params[:subscriptions])
flash[:notice] = 'Notifications settings updated'

rescue ActiveRecord::RecordInvalid
flash[:error] = 'Notifications settings could not be updated due to an error'
ensure
Expand Down

0 comments on commit 24134a6

Please sign in to comment.