Open schinery opened 1 year ago
RuboCop's static analysis cannot know that MyEngine::Engine.root.join
is an object with the same behavior as Rails.root.path
. So I understand the use case, but I'm wondering if it's better to detect that AnyModel.root.path
case, because the cop can't be kept safe by default. If will be provided, it is an alternative configuration option.
Expected behavior
MyEngine::Engine.root.join("spec", "fixtures", "images", "small_image.jpg")
should be raised as a linting issue by the Rails/FilePath cop when using EnforcedStyle: slashes (default) in the same wayRails.root.join
is.Actual behavior
MyEngine::Engine.root.join("spec", "fixtures", "images", "small_image.jpg")
is not raised as linting issue.Steps to reproduce the problem
Put the following in a Ruby file and see what gets flagged as a linting issue:
RuboCop version