Skip to content
This repository has been archived by the owner on May 10, 2019. It is now read-only.

Prefer blank lines around access modifiers #83

Merged
merged 1 commit into from Jan 20, 2016
Merged

Conversation

h-lame
Copy link
Contributor

@h-lame h-lame commented Jan 20, 2016

There's no cop available to enforce our current "blank line before, nothing after" rule so we can only enforce this using humans. To reduce the burden we should change our guide to something that is enforcable by a cop (Style/EmptyLinesAroundAccessModifier) and is more in line with the global ruby community reckons expressed in https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected.

Assuming we're happy with this, I'll raise a PR to enable the relevant cop in https://github.com/alphagov/govuk-lint

There's no cop available to enforce our current "blank line before, nothing after" rule so we can only enforce this using humans.  To reduce the burden we should change our guide to something that is enforcable by a cop (Style/EmptyLinesAroundAccessModifier) and is more in line with the global ruby community reckons expressed in https://github.com/bbatsov/ruby-style-guide#indent-public-private-protected.
@benlovell
Copy link
Contributor

Edit: Whoops, I seem to have restated everything you have said. In which case I'm 💯 on this.

@bradwright
Copy link
Contributor

The removed words don't indicate why we prefer nothing after the modifier, so it seems like it's a no-brainer to follow the idiom instead.

bradwright added a commit that referenced this pull request Jan 20, 2016
Prefer blank lines around access modifiers
@bradwright bradwright merged commit 412bce0 into master Jan 20, 2016
@bradwright bradwright deleted the h-lame-patch-1 branch January 20, 2016 12:32
h-lame added a commit to alphagov/govuk-lint that referenced this pull request Jan 20, 2016
Now that alphagov/styleguides#83 is merged we should enforce this cop to keep blank line buffers around access modifiers.
h-lame added a commit to alphagov/govuk-lint that referenced this pull request Jan 20, 2016
Now that alphagov/styleguides#83 is merged we should enforce this cop to keep blank line buffers around access modifiers.

Update transgression in diff.rb to comply.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants