-
Notifications
You must be signed in to change notification settings - Fork 47
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
Include thread-safety rubocop #703
base: main
Are you sure you want to change the base?
Conversation
3999c6e
to
5ab601c
Compare
test/fixtures/full_config.yml
Outdated
ThreadSafety/NewThread: | ||
Description: Avoid starting new threads. Let a framework like Sidekiq handle the | ||
threads. | ||
Enabled: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, we are not enabling it on SFR too. I will disable it 👍
test/fixtures/full_config.yml
Outdated
Enabled: true | ||
ThreadSafety/MutableClassInstanceVariable: | ||
Description: Do not assign mutable objects to class instance variables. | ||
Enabled: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cop is disallowing:
class FooTest < ActiveSupport::TestCase
setup do
@something = { a: "A" }
end
end
Which doesn't have any thread safety issue.
We need to fix that in order to enable it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will not enable it yet. Good check, lets socialize how we can fix it 👍
3da3d00
to
4c2b934
Compare
4c2b934
to
3cd22cb
Compare
No description provided.