You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that this behavior may be intentional because auto correction of this cop is unsafe.
root@8e2c142c74c8:/tmp# cat f.rb
FactoryBot.define do
factory :alias do
end
factory :comment do
association :alias
end
end
root@8e2c142c74c8:/tmp# cp f.rb spec/factories.rb
root@8e2c142c74c8:/tmp# rubocop -r rubocop-factory_bot --only FactoryBot/AssociationStyle -A spec/factories.rb
Inspecting 1 file
F
Offenses:
spec/factories.rb:6:5: C: [Corrected] FactoryBot/AssociationStyle: Use implicit style to define associations.
association :alias
^^^^^^^^^^^^^^^^^^
spec/factories.rb:9:1: F: Lint/Syntax: unexpected token $end
(Using Ruby 2.7 parser; configure using TargetRubyVersion parameter, under AllCops)
1 file inspected, 2 offenses detected, 1 offense corrected
root@8e2c142c74c8:/tmp# cat spec/factories.rb
FactoryBot.define do
factory :alias do
end
factory :comment do
alias
end
end
The text was updated successfully, but these errors were encountered:
I think that this behavior may be intentional because auto correction of this cop is unsafe.
The text was updated successfully, but these errors were encountered: