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

Rubocop upset about BlockDelimiters change to config/base.yml #271

Closed
mepatterson opened this issue Mar 5, 2021 · 5 comments
Closed

Rubocop upset about BlockDelimiters change to config/base.yml #271

mepatterson opened this issue Mar 5, 2021 · 5 comments

Comments

@mepatterson
Copy link

I had everything working great with Standard + Rubocop + Rails. In my .rubocop.yml, I have this:

inherit_gem:
  standard: config/base.yml

Now, after updating versions, rubocop is blowing up with:

...gems/standard-1.0.2/config/base.yml: Standard/BlockDelimiters has the wrong namespace - should be Style

I use overcommit, so this is suddenly preventing me from committing due to the pre-commit hook failure. I don't really know how to proceed. Any ideas?

@searls
Copy link
Contributor

searls commented Mar 6, 2021

Hmm… sounds like it may be a bug in RuboCop. I suspect that RuboCop moved Style/BlockDelimiters from another section (Layout, maybe?) and as a result has migration warnings in there such that if a configuration contains a cop named BlockDelimiters in any other section, it'll blow up and tell you to rename it

@searls searls closed this as completed in d7e3586 Mar 6, 2021
@searls
Copy link
Contributor

searls commented Mar 6, 2021

Should be worked-around in 1.0.4

@swrobel
Copy link

swrobel commented Apr 2, 2021

Unfortunately I'm getting Error: unrecognized cop Standard/BlockSingleLineBraces found in vendor/bundle/ruby/2.7.0/gems/standard-1.0.4/config/base.yml

Edit: just needed to update my rubocop.yml to include:

require:
  - standard/cop/block_single_line_braces

@searls
Copy link
Contributor

searls commented Apr 10, 2021

@swrobel could you please explain how you're using Standard such that this error is being raised?

@swrobel
Copy link

swrobel commented Apr 10, 2021

Same way as the OP

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

No branches or pull requests

3 participants