theforeman / foreman_rh_cloud

a plugin to Foreman that generates and uploads reports to the Red Hat cloud
GNU General Public License v3.0
6 stars 30 forks source link

Update RuboCop configuration to inherit from theforeman-rubocop #886

Closed archanaserver closed 1 month ago

archanaserver commented 3 months ago

default.yml: https://github.com/theforeman/theforeman-rubocop/?tab=readme-ov-file#basic-style---default-performance-and-rails-cops

This is part of Rubocop standerdization, link for the reference: https://community.theforeman.org/t/standardizing-rubocop-with-theforeman-rubocop/37239

archanaserver commented 2 months ago

I expanded on this below but I don't think we can call .update on an ActiveRecord::Relation.

Yes you are right, I had similar conversation few weeks back in one of my another PR on update and update_all, I misunderstood few things here in the code, but I was following the RuboCop doc: https://docs.rubocop.org/rubocop-rails/cops_rails.html#railsskipsmodelvalidations So I did this to few other places as well that is disabling this cop because it is not safe to use.

archanaserver commented 1 month ago

Thanks @chris1984 and @qcjames53 :)