Phil Pirozhkov
Phil Pirozhkov
This is quite interesting. @ydah are you able to reproduce? ``` spec/factories/masks.rb:5:5: C: [Correctable] FactoryBot/AttributeDefinedStatically: Use a block to declare attribute values. association :blocklist, strategy: :build ^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` This shouldn't...
I can't reproduce locally. @ydakuka can you please set a breakpoint in [`on_block` of lib/rubocop/cop/factory_bot/attribute_defined_statically.rb here](https://github.com/rubocop/rubocop-factory_bot/blob/81d95db1836be1f4a6726100e131cd53fe2f9008/lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#L49) and see what `RuboCop::FactoryBot.reserved_methods` and `node` are?
Good question! @rubocop/rubocop-core To me, it doesn’t make much sense, and I would expect all cops to inspect the original code.
Can you please create a reproduction repo, @ydah ?
I'm on the fence regarding ordering, sometimes it's interleaved for better visibility: ```ruby role { :generic } # attribute trait(:admin) do role { :admin } end tweaked_at { Time.current }...
Can you please elaborate? Do you mean that the cop in omit_parentheses mode should add a backslash in its autocorrection instead of just raising an offence and skipping autocorrection? would...
[This](https://github.com/thoughtbot/factory_bot/blob/master/GETTING_STARTED.md#defining-traits) says: > Traits allow you to group attributes together and then apply them to any factory. And the reason for the very existence suggests that global traits have a...
> Thoughts on a "global traits shouldn't be defined in the same file as factories" type of cop? Makes sense to me 👍
I doubt we want to introduce new Ruby versions to the build. For JRuby, there’s always the “are you using the latest?” question when there’s a bug. And we would...
As from my rather limited experience, it's not too hard to address issues in RSpec, but I've only scratched the surface and haven't faced anything that would need several repositories...