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

Fix RuboCop offenses in rails_helper.rb template #2663

Merged
merged 2 commits into from Apr 13, 2023
Merged

Fix RuboCop offenses in rails_helper.rb template #2663

merged 2 commits into from Apr 13, 2023

Conversation

kengallego
Copy link
Contributor

@kengallego kengallego commented Apr 3, 2023

Rubocop:

Rails/FilePath: Prefer Rails.root.join('path/to').
Lint/RedundantDirGlobSort: Remove redundant sort.

@pirj
Copy link
Member

pirj commented Apr 3, 2023

For the reference of join: rubocop/rubocop-rails#128

Regarding redundant sort, are you confident about this?

  #   This cop is unsafe, in case of having a file and a directory with
  #   identical names, since directory will be loaded before the file, which
  #   will break `exe/files.rb` that rely on `exe.rb` file.

@kengallego
Copy link
Contributor Author

kengallego commented Apr 4, 2023

@pirj Good point about the sort, I already added it again. And thank you for the reference.

Copy link
Member

@pirj pirj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@pirj pirj requested review from JonRowe and benoittgt April 4, 2023 14:24
@pirj pirj changed the title Fix rubocop offenses Fix RuboCop offenses in rails_helper.rb template Apr 4, 2023
@JonRowe JonRowe merged commit 70984c1 into rspec:main Apr 13, 2023
6 of 15 checks passed
@kengallego kengallego deleted the fix-rubocop-offenses branch April 14, 2023 06:08
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.

None yet

3 participants