Merge branch 'rubocop/EmptyLinesAroundModuleBody' into 'master'

Enable Style/EmptyLinesAround Module/Class Body cop

## What does this MR do?
Enable a new rubocop cops as discussed here: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/1877/diffs#note_13021078

## Are there points in the code the reviewer needs to double check?
May be a good idea to send a message to people to prevent `master` red because of the new cop.

## Why was this MR needed?
We want to improve code style and not waste endbosses time checking style manually

## What are the relevant issue numbers?

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5692
This commit is contained in:
Douwe Maan 2016-08-08 17:50:22 +00:00
commit a77394a7e5
4 changed files with 2 additions and 8 deletions

View file

@ -153,11 +153,11 @@ Style/EmptyLinesAroundBlockBody:
# Keeps track of empty lines around class bodies.
Style/EmptyLinesAroundClassBody:
Enabled: false
Enabled: true
# Keeps track of empty lines around module bodies.
Style/EmptyLinesAroundModuleBody:
Enabled: false
Enabled: true
# Keeps track of empty lines around method bodies.
Style/EmptyLinesAroundMethodBody:

View file

@ -1,5 +1,4 @@
module AvatarsHelper
def author_avatar(commit_or_event, options = {})
user_avatar(options.merge({
user: commit_or_event.author,
@ -26,5 +25,4 @@ module AvatarsHelper
mail_to(options[:user_email], avatar)
end
end
end

View file

@ -1,11 +1,9 @@
module Banzai
module Filter
# Find every image that isn't already wrapped in an `a` tag, and that has
# a `src` attribute ending with a video extension, add a new video node and
# a "Download" link in the case the video cannot be played.
class VideoLinkFilter < HTML::Pipeline::Filter
def call
doc.xpath(query).each do |el|
el.replace(video_node(doc, el))
@ -54,6 +52,5 @@ module Banzai
container
end
end
end
end

View file

@ -1,7 +1,6 @@
module Gitlab
module ImportExport
class AvatarRestorer
def initialize(project:, shared:)
@project = project
@shared = shared