rails/railties/test
Koichi ITO 581074c40d
Apply autocorrection by RuboCop to files generated by `bin/rails generate` (#50506)
* Apply autocorrection by RuboCop to files generated by `bin/rails generate`

## Motivation / Background

RuboCop has now been included by default (#50456).
By adding the following tip to the default configuration, user can apply RuboCop's autocorrection to
code generated by `bin/rails generate` (e.g., migration file):

https://github.com/rubocop/rubocop-rails#rails-configuration-tip

This means that the generated files will be formatted according to user's .rubocop.yml custom configuration.

## Detail

Since `bin/rails generate` and `bin/rubocop` are used only in the development environment,
the target files are limited to only `config/environments/development.rb`.

## Additional information

This feature was introduced in Rails 6.1 by https://github.com/rails/rails/pull/38870.
2024-01-01 20:04:47 +01:00
..
application Apply autocorrection by RuboCop to files generated by `bin/rails generate` (#50506) 2024-01-01 20:04:47 +01:00
command Deprecate `secrets:edit/show` and remove `secrets:setup` 2023-03-29 16:18:32 +02:00
commands Add runner option to disable Executor wrap 2023-12-08 09:36:33 -08:00
configuration Raise if setting a config key that is a method name 2023-04-23 09:39:07 +02:00
engine Fix the BroadcastLogger being initialized too late: 2023-09-29 15:42:47 +02:00
fixtures This enhancement automatically updates the Dockerfile to the desired db when using db:system:change. 2023-09-19 15:33:36 -04:00
generators Apply autocorrection by RuboCop to files generated by `bin/rails generate` (#50506) 2024-01-01 20:04:47 +01:00
isolation Railties TestHelper remove_from_config should remove all occurrences 2023-10-27 10:59:12 +09:00
minitest Fix backtraces for generated plugin tests 2020-10-07 15:40:56 -05:00
railties Make engines aware of AR::Base table name prefix 2023-12-06 20:09:18 +01:00
test_unit Set test reporter default executable to bin/rails 2023-02-02 17:11:33 -06:00
abstract_unit.rb Get rid of the `jruby_skip` test helper 2023-10-02 13:01:44 +02:00
app_loader_test.rb Turn on performance based cops 2018-07-23 15:37:06 -07:00
backtrace_cleaner_test.rb Optimize ActiveRecord::LogSubscriber#query_source_location 2023-08-31 11:56:55 +02:00
code_statistics_calculator_test.rb Add support for stylesheets and ERB views to `rails stats`. 2020-11-10 09:40:18 -07:00
code_statistics_test.rb Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
console_helpers.rb Do not run tests that have `ensure` instead of `skip` 2022-09-20 22:12:20 +09:00
engine_test.rb Use assert_predicate and assert_not_predicate 2018-01-25 23:32:59 -05:00
env_helpers.rb Enable `Style/ExplicitBlockArgument` cop 2021-09-05 17:06:19 +02:00
generators_test.rb Use bin/rails in generator Base banner 2023-03-29 02:40:52 -04:00
initializable_test.rb Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
json_params_parsing_test.rb Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
path_generation_test.rb Store `secret_key_base` in `Rails.config` for local environments. 2023-06-14 16:37:23 +02:00
paths_test.rb Use assert_predicate and assert_not_predicate 2018-01-25 23:32:59 -05:00
plugin_helpers.rb Separate the CI environment from the application CI environment 2023-10-04 09:36:51 +00:00
rack_logger_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
rails_health_controller_test.rb add "as: :rails_health_check" to health check path (#47217) 2023-02-05 08:49:04 +01:00
rails_info_controller_test.rb Expand rails route search to all table content 2023-03-03 17:14:33 +11:00
rails_info_test.rb Revert "Merge pull request #34387 from yhirano55/rails_info_properties_json" 2019-01-08 22:21:20 +01:00
secrets_test.rb Enable `Style/RedundantBegin` cop to avoid newly adding redundant begin block 2018-12-21 06:12:42 +09:00
version_test.rb Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00