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.yml showing warnings in VSCode. #38

Closed
aarona opened this issue Nov 9, 2019 · 4 comments
Closed

.rubocop.yml showing warnings in VSCode. #38

aarona opened this issue Nov 9, 2019 · 4 comments

Comments

@aarona
Copy link
Contributor

aarona commented Nov 9, 2019

Question

Not sure what IDE you guys are using. I've been using VSCode because its great for JS dev.
Anyway, VSCode alerted me of some warnings in our .rubocop.yml file:

.rubocop.yml:1: `require` is concealed by line 2
.rubocop.yml:46: `Style/MethodCalledOnDoEndBlock` is concealed by line 58
.rubocop.yml: Lint/EndAlignment has the wrong namespace - should be Layout
Warning: unrecognized cop RSpec/MultipleExpectations found in .rubocop.yml
Warning: unrecognized cop RSpec/ExampleLength found in .rubocop.yml
Warning: unrecognized cop RSpec/RepeatedDescription found in .rubocop.yml
Warning: unrecognized cop RSpec/MessageSpies found in .rubocop.yml
Warning: unrecognized cop RSpec/NestedGroups found in .rubocop.yml
Warning: unrecognized cop RSpec/ContextWording found in .rubocop.yml

Should I ignore this or do I need to install an extra extension or do some extra configuration?

@mcelicalderon
Copy link
Member

As this gem still supports ruby 2.2, you need to use rubocop v0.68.1, you are probably using a newer version and that is why you are getting errors. Closing this one as it is not related to the functionality of the gem.

@aarona
Copy link
Contributor Author

aarona commented Nov 25, 2019

I was just about to address this actually. It looks like you're setting Style/MethodCalledOnDoEndBlock to Enabled: true which is hiding the same rule on line 58 which sets it to Enabled: false. Which would you like?

@mcelicalderon
Copy link
Member

You are right about that one. We haven't really gone through the style file yet, just copied it from another project which I new has most things we usually use. Don't worry about this one, I'll take care of it with @00dav00 as we have been discussing style conventions for a while. For now it should work if you use the correct version, and also your editor loads the other gem rubocop-rspec which seems to be the problem for many of those warnings you are getting

@aarona
Copy link
Contributor Author

aarona commented Nov 25, 2019

Hey while you were mentioning Styling fixes in my latest PR, I decided to run rubocop with the version you requested:

prompt> gem list rubo

*** LOCAL GEMS ***

rubocop (0.68.1)
rubocop-performance (1.3.0)
rubocop-rspec (1.36.0)

but I'm still getting those errors. I'm wondering what version of rubocop-rspec you're using?

prompt> rubocop | grep Warn
.rubocop.yml:1: `require` is concealed by line 2
.rubocop.yml:46: `Style/MethodCalledOnDoEndBlock` is concealed by line 58
.rubocop.yml: Lint/EndAlignment has the wrong namespace - should be Layout
Warning: unrecognized cop RSpec/MultipleExpectations found in .rubocop.yml
Warning: unrecognized cop RSpec/ExampleLength found in .rubocop.yml
Warning: unrecognized cop RSpec/RepeatedDescription found in .rubocop.yml
Warning: unrecognized cop RSpec/MessageSpies found in .rubocop.yml
Warning: unrecognized cop RSpec/NestedGroups found in .rubocop.yml
Warning: unrecognized cop RSpec/ContextWording found in .rubocop.yml

I'm getting a little over 300 offenses when I run rubocop from the terminal. Most of them are double quote styling fixes but a few are Metrics related. Just an FYI.

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

2 participants