rubocop-factory_bot
rubocop-factory_bot copied to clipboard
Autocorrect for FactoryBot/IdSequence is NOT SAFE when ids are not generated automatically
- Related
- https://github.com/rubocop/rubocop-factory_bot/pull/52#issuecomment-1774662427
- https://github.com/thoughtbot/factory_bot_rails/issues/438
Removing sequence(:id) automatically breaks the factory, not only for non-database POROs, but also DB models with id is not generated. According to the issue https://github.com/thoughtbot/factory_bot_rails/issues/438, such models exist on some applications. Thus, I think FactoryBot/IdSequence should not be marked as SAFE.