You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that files within the packs directory are not being targeted by some of the rubocop-rails Cops. This issue arises because the default configurations for these Cops specifically include paths like app/models/**/*.rb and potentially app/controllers/**/*.rb, but do not consider the packs directory.
For instance, if similar rules are applied to the controllers, this might cause oversight in code standards for files within packs. It may be beneficial to either adjust the default Include paths or provide guidance on how to ensure that packs directory files are also checked, as they are crucial parts of Rails applications.
Could you consider updating the configuration or documentation to address this coverage gap?
Thank you for looking into this issue.
The text was updated successfully, but these errors were encountered:
I noticed the method described in the README of the library seems quite effective as well. I opted for a slightly different approach by placing a rubocop.yml in each packs directory like this:
inherit_from: ../../.rubocop.yml
With this setup, we can calculate relative paths from the packs directory, eliminating the need to adjust the Include for each Cop. It's great to share beneficial methods like these. I'm looking forward to continuing to support this project!
Hello,
I've noticed that files within the packs directory are not being targeted by some of the
rubocop-rails
Cops. This issue arises because the default configurations for these Cops specifically include paths likeapp/models/**/*.rb
and potentiallyapp/controllers/**/*.rb
, but do not consider the packs directory.ref. https://github.com/rubocop/rubocop-rails/blob/891de2254af9f4d4120b0fc5b5e127209851189f/config/default.yml#L139
For instance, if similar rules are applied to the controllers, this might cause oversight in code standards for files within packs. It may be beneficial to either adjust the default Include paths or provide guidance on how to ensure that packs directory files are also checked, as they are crucial parts of Rails applications.
Could you consider updating the configuration or documentation to address this coverage gap?
Thank you for looking into this issue.
The text was updated successfully, but these errors were encountered: