Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rubocop rule for multiline blocks #3738

Merged
merged 4 commits into from
Oct 5, 2019
Merged

Add rubocop rule for multiline blocks #3738

merged 4 commits into from
Oct 5, 2019

Conversation

javierm
Copy link
Member

@javierm javierm commented Sep 30, 2019

Objectives

  • Make the code more consistent
  • Fix remaining rubocop warnings

@javierm javierm added the Linters Rubocop, ERB Lint, ESLint, SCSS-Lint, ... label Sep 30, 2019
@javierm javierm self-assigned this Sep 30, 2019
@javierm javierm added this to Reviewing in Roadmap via automation Sep 30, 2019
@javierm javierm changed the base branch from rspec_instance_variables to master September 30, 2019 15:27
It could be argued that the following lines use single quotes to escape
double quotes, but on the other hand, using a single quote isn't a
great benefit.
Some of our team members don't like using `do...end` for scopes, and
some other team members don't like using `{ ... }` for multi-line
blocks, so we've agreed to use class methods instead.
This way we remove duplication and we avoid a multi-line block in a
validation rule, which made the code hard to read.
@javierm javierm force-pushed the rubocop_fixes branch 5 times, most recently from 50290d9 to 545f161 Compare October 5, 2019 12:42
We were already using it most of the time, but there were a few places
were we used brackets for multiline blocks.
@javierm javierm moved this from Reviewing to Testing in Roadmap Oct 5, 2019
@javierm
Copy link
Member Author

javierm commented Oct 5, 2019

Travis failure is not related to this pull request.

@javierm javierm merged commit fb2476a into master Oct 5, 2019
Roadmap automation moved this from Testing to Release 1.1.0 Oct 5, 2019
@javierm javierm deleted the rubocop_fixes branch October 5, 2019 13:41
smarques pushed a commit to venetochevogliamo/consul that referenced this pull request Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linters Rubocop, ERB Lint, ESLint, SCSS-Lint, ...
Projects
No open projects
Roadmap
  
Release 1.1.0
Development

Successfully merging this pull request may close these issues.

None yet

1 participant