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

Silence rubocop warning about unnecessay splat expansion #429

Merged
merged 2 commits into from
Sep 21, 2016
Merged

Silence rubocop warning about unnecessay splat expansion #429

merged 2 commits into from
Sep 21, 2016

Conversation

msievers
Copy link
Contributor

Currently, running rubocop results in

lib/chewy/config.rb:129:34: W: Unnecessary splat expansion.
          file = Rails.root.join(*%w(config chewy.yml))
  • the expansion is needed here, unless one would change the code
  • because rubocop does not recognize that this is needed, it should be
    ok to disable this cop for this line using an end-of-line comment

@pyromaniac I would like to request to merge this or an equivalent fix soon, so that I can rebase #428 with this. Currently all tests on travis seem to fail only because of this single rubocop warning.

- the expansion is needed here, unless one would change the code
- because rubocop does not recognize that this is needed, it should be
  ok to disable this cop for this line using an end-of-line comment
@pyromaniac
Copy link
Contributor

I was going to ask you to do it, but can you use Rails.root.join('config', 'chewy.yml') please?

@msievers
Copy link
Contributor Author

@pyromaniac done

@pyromaniac
Copy link
Contributor

Perfect, will merge as soon as specs will pass, thanks, at least one build :)

@pyromaniac pyromaniac merged commit 2be25a3 into toptal:master Sep 21, 2016
@msievers msievers deleted the rubocop/fix_wrong_unneeded_splat_expansion_warning branch September 22, 2016 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants