Upgrade rubocop from v1.84.0 to v1.84.2, update config, and correct offences#37795
Upgrade rubocop from v1.84.0 to v1.84.2, update config, and correct offences#37795larouxn wants to merge 1 commit intomastodon:mainfrom
rubocop from v1.84.0 to v1.84.2, update config, and correct offences#37795Conversation
8e6c23f to
db732e9
Compare
|
There are two cops involved:
|
|
Good catch and agreed with the cop config choices. That said, I think we'll need to wait for 1.84.2 as there are errors occurring with the cops above. Thankfully fixes have already been merged to RuboCop RuboCop 1.84.1 (errors)
RuboCop head (no more errors)
|
rubocop gem from v1.84.0 to v1.84.1 and correct offencesrubocop gem from v1.84.0 to v1.84.1 and correct offences
rubocop gem from v1.84.0 to v1.84.1 and correct offencesrubocop from v1.84.0 to v1.84.1, update config, and correct offences
db732e9 to
de2cd88
Compare
|
v1.84.2 is out, rebasing and updating this PR. |
de2cd88 to
01a585d
Compare
rubocop from v1.84.0 to v1.84.1, update config, and correct offencesrubocop from v1.84.0 to v1.84.2, update config, and correct offences
01a585d to
75d5f75
Compare
|
I don't feel strongly about this, but FWIW, the autocorrect changes here for that rule:
I have a small personal bias towards "indented" (which reduces overall PR alignment churn when you rename a var or method or something in the line above indentations) ... but mostly just wanted to show the file impact of each option there. |
|
For stylistic reference here are the three different options. I feel # app/controllers/api/v1/mutes_controller.rb#L19-L29
# aligned i.e. default
def paginated_mutes
@paginated_mutes ||= Mute.eager_load(target_account: [:account_stat, :user])
.joins(:target_account)
.merge(Account.without_suspended)
.where(account: current_account)
.paginate_by_max_id(
limit_param(DEFAULT_ACCOUNTS_LIMIT),
params[:max_id],
params[:since_id]
)
end
# indented
def paginated_mutes
@paginated_mutes ||= Mute.eager_load(target_account: [:account_stat, :user])
.joins(:target_account)
.merge(Account.without_suspended)
.where(account: current_account)
.paginate_by_max_id(
limit_param(DEFAULT_ACCOUNTS_LIMIT),
params[:max_id],
params[:since_id]
)
end
# indented_relative_to_receiver
def paginated_mutes
@paginated_mutes ||= Mute.eager_load(target_account: [:account_stat, :user])
.joins(:target_account)
.merge(Account.without_suspended)
.where(account: current_account)
.paginate_by_max_id(
limit_param(DEFAULT_ACCOUNTS_LIMIT),
params[:max_id],
params[:since_id]
)
endI think I prefer |
|
oof, that's a lot of changes in either cases, and I'm surprised that so many of the issues would flare up in a patch release 🤔 I'm definitely fine with the |
75d5f75 to
8f3e3e3
Compare
8f3e3e3 to
0297ef0
Compare
Yeah, I suppose the cops causing these changes were really quite busted/not running in prior releases. Looking at Suppose I'm also a bit of a fan of |


Upgrade
rubocopgem fromv1.84.0tov1.84.2, updateLayoutRuboCop config, and correct offences.References
Supersedes #37710