1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/commands
Yasuo Honda aa3dcabd87 Add Style/RedundantFreeze to remove redudant .freeze
Since Rails 6.0 will support Ruby 2.4.1 or higher
`# frozen_string_literal: true` magic comment is enough to make string object frozen.
This magic comment is enabled by `Style/FrozenStringLiteralComment` cop.

* Exclude these files not to auto correct false positive `Regexp#freeze`
 - 'actionpack/lib/action_dispatch/journey/router/utils.rb'
 - 'activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb'

It has been fixed by https://github.com/rubocop-hq/rubocop/pull/6333
Once the newer version of RuboCop released and available at Code Climate these exclude entries should be removed.

* Replace `String#freeze` with `String#-@` manually if explicit frozen string objects are required

 - 'actionpack/test/controller/test_case_test.rb'
 - 'activemodel/test/cases/type/string_test.rb'
 - 'activesupport/lib/active_support/core_ext/string/strip.rb'
 - 'activesupport/test/core_ext/string_ext_test.rb'
 - 'railties/test/generators/actions_test.rb'
2018-09-29 07:18:44 +00:00
..
application [Railties] require_relative => require 2017-10-21 22:48:26 +09:00
console [Railties] require_relative => require 2017-10-21 22:48:26 +09:00
credentials Fixed to RAILS_MASTER_KEY as a default env key for decrypting. 2018-09-20 12:23:50 +02:00
dbconsole Enable Performance/UnfreezeString cop 2018-09-23 08:56:55 +09:00
destroy [Railties] require_relative => require 2017-10-21 22:48:26 +09:00
dev Fix rails initializers --help and rails dev:cache --help 2018-08-22 22:36:25 +03:00
encrypted Recommend use of rails over bin/rails 2018-07-06 22:46:35 +02:00
generate [Railties] require_relative => require 2017-10-21 22:48:26 +09:00
help Use say/error instead of puts/$stderr.puts 2018-08-22 22:39:03 +03:00
initializers Fix rails initializers --help and rails dev:cache --help 2018-08-22 22:36:25 +03:00
new Use say/error instead of puts/$stderr.puts 2018-08-22 22:39:03 +03:00
notes Fix deprecation message for SOURCE_ANNOTATION_DIRECTORIES 2018-07-20 13:19:10 +09:00
plugin Use say/error instead of puts/$stderr.puts 2018-08-22 22:39:03 +03:00
rake Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
routes Rely on Rails::Command's help output. 2018-03-13 20:56:37 +01:00
runner Use say/error instead of puts/$stderr.puts 2018-08-22 22:39:03 +03:00
secrets Enable Start/EndWith and RegexpMatch cops 2018-07-28 17:37:17 -04:00
server Add Style/RedundantFreeze to remove redudant .freeze 2018-09-29 07:18:44 +00:00
test [Railties] require_relative => require 2017-10-21 22:48:26 +09:00
version Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00