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

Allow for config file path to be passed to rubocop #266

Merged

Conversation

mtraina8
Copy link

@mtraina8 mtraina8 commented Aug 4, 2022

#262 (comment) for context

Briefly, I'd like to be able to run erblint in our CI that has restrictions on writing to its current directory. Since Rubocop lacks an api to read in a config that is not a file, we must give it a path. This PR adds support for passing a config path to rubocop instead of the gem writing to the current directory and passing that file to rubocop.

Thanks to @etiennebarrie for your proposal

Usage

--- # .erb-lint.yml
EnableDefaultLinters: true
linters:
  Rubocop:
    enabled: true
    config_file_path: .rubocop.erb-lint.yml

--- # .rubocop.erb-lint.yml
inherit_from:
  - .rubocop.yml
  # more here

@rafaelfranca
Copy link
Member

Can you please document how to use this new config?

@mtraina8 mtraina8 force-pushed the provide-rubocop-config-path-directly branch from 7b6d996 to d8d28e1 Compare August 8, 2022 13:40
@rafaelfranca rafaelfranca merged commit bbfed93 into Shopify:main Aug 16, 2022
@shopify-shipit shopify-shipit bot temporarily deployed to production August 18, 2022 22:15 Inactive
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