-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Rspec cop #1087
Rspec cop #1087
Conversation
This has already been proposed and rejected in the past. See #731. In hindsight, I regret adding even the existing Rails support and plan to move it to a separate gem at some point. RuboCop's core should be free of framework specific cops/code. |
I get your point, but I like this cop and I think its worth having it (as you can see in the second commit). Do you already have an idea how "plugins" like rails or rspec can be integrated in the future? I've seen that there is a rubocop-rspec - is this the way to go? |
That's the best way at the moment, yes. Not sure we need something much more complex than this. I'm not saying the cop is bad - it's certainly useful. But this doesn't change the fact it does not belong in RuboCop. Maybe you can work with @nevir on improving |
Ok - than I have two questions:
|
RSpec |
@bbatsov What do you think about creating an organization here in gihub, that can host the rubocop extensions (like rspec, or in the future rails). With this its bundled and has nice urls like |
I'm not opposed to the idea. There are other RuboCop related projects that might live there as well I guess ( |
I'm not sure if I grasp all implications but it sounds like a good idea to me. |
+1 for ruby core cops being separate from rails cops |
I'm on the fence about the RuboCop organization. Maybe we can introduce it when we will extract the Rails cops, but I don't see more advantages than disadvantages (requires users to update the URL in the repo or |
@yujinakayama repo transfers redirect now - it should be transparent to clients +1 for the rubocop org for me; I'd gladly donate rubocop-rspec to the cause :P |
Yeah, the URL should not be a problem. I've had a pretty good experience with migrating projects to |
@bbatsov since there are now several new cops in |
@geniou Great! |
I closed a this PR and opened a new one for the cleanup, and will open one as soon as |
I like the idea / convention not to use
should
at the beginning of a test description - as proposed here: http://betterspecs.org/#shouldThis cop is looking for
should
at the beginning of a test description. Maybe in the future this cop could do more rspec related tests.