-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layout/BlockAlignment Cop breaks in Ruby 3.1.2 #10664
Comments
Can you provide a reproduction code for the issue? |
Sure, here's some of the files that the cop seems to have issues with:
# frozen_string_literal: true
json.technologies do
json.array!(@technologies, partial: 'model', as: :technology)
end
# frozen_string_literal: true
# This initializer configures the is_it_working gem, and specifies what checks need to pass in order to
# consider the application to be "working"
::Rails.configuration.middleware.use(::IsItWorking::Handler) do |handler|
# Check the ActiveRecord database connection without spawning a new thread
handler.check(:active_record, async: true)
end
# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
::ActiveSupport.on_load(:action_controller) do
wrap_parameters format: [:json]
end
# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
# self.include_root_in_json = true
# end
# frozen_string_literal: true
# This Factory constructs Technology objects that can be used during testing.
# These objects always contain randomly generated data unless specific traits are specified.
::FactoryBot.define do
factory :technology do
name { ::Faker::ProgrammingLanguage.unique(3).name }
trait :ruby do
name { 'Ruby' }
end
trait :nodejs do
name { 'NodeJS' }
end
end
end I don't see a direct correlation between any of the files. |
Probably the same problem as #10258. Can you upgrade RuboCop to the latest version? |
Expected behavior
I expect the Cop to just work when upgrading Ruby from 3.0.x to 3.1.2
Actual behavior
The Cop throws out errors for various files that passed checks perfectly fine before the Ruby upgrade.
The above seems to be the recurring issue.
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: