I recently updated to Rails 5 and was hit by #3273. Today, after updating json and json_pure, I've come across an issue with RuboCop that appears to have been around before. Before the update to Rails 5 I didn't have a single offence in my current codebase, but now there are an absolute ton of them, all related to Missing frozen string literal comment.
Here's the RuboCop output:
$ rubocop
Inspecting 123 files
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
Offenses:
config.ru:1:1: C: Missing frozen string literal comment.
# This file is used by Rack-based servers to start the application.
^
Gemfile:1:1: C: Missing frozen string literal comment.
source 'https://rubygems.org'
^
Rakefile:1:1: C: Missing frozen string literal comment.
# Add your own tasks in files placed in lib/tasks ending in .rake,
^
app/channels/application_cable/channel.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.
^
app/channels/application_cable/connection.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file. Action Cable runs in a loop that does not support auto reloading.
^
app/controllers/admin/attachments_controller.rb:1:1: C: Missing frozen string literal comment.
class Admin::AttachmentsController < ApplicationController
^
app/controllers/admin/clips_controller.rb:1:1: C: Missing frozen string literal comment.
class Admin::ClipsController < ApplicationController
^
app/controllers/admin/collections_controller.rb:1:1: C: Missing frozen string literal comment.
class Admin::CollectionsController < ApplicationController
^
app/controllers/admin/dashboard_controller.rb:1:1: C: Missing frozen string literal comment.
class Admin::DashboardController < ApplicationController
^
app/controllers/admin/episodes_controller.rb:1:1: C: Missing frozen string literal comment.
class Admin::EpisodesController < ApplicationController
^
app/controllers/admin/products_controller.rb:1:1: C: Missing frozen string literal comment.
class Admin::ProductsController < ApplicationController
^
app/controllers/admin/purchases_controller.rb:1:1: C: Missing frozen string literal comment.
class Admin::PurchasesController < ApplicationController
^
app/controllers/admin/users_controller.rb:1:1: C: Missing frozen string literal comment.
class Admin::UsersController < ApplicationController
^
app/controllers/admin/videos_controller.rb:1:1: C: Missing frozen string literal comment.
class Admin::VideosController < ApplicationController
^
app/controllers/application_controller.rb:1:1: C: Missing frozen string literal comment.
class ApplicationController < ActionController::Base
^
app/controllers/concerns/administrable.rb:1:1: C: Missing frozen string literal comment.
module Administrable
^
app/controllers/concerns/subscribable.rb:1:1: C: Missing frozen string literal comment.
module Subscribable
^
app/controllers/courses_controller.rb:1:1: C: Missing frozen string literal comment.
class CoursesController < ApplicationController
^
app/controllers/events/products_controller.rb:1:1: C: Missing frozen string literal comment.
class Events::ProductsController < ApplicationController
^
app/controllers/events/users_controller.rb:1:1: C: Missing frozen string literal comment.
class Events::UsersController < ApplicationController
^
app/controllers/screencasts_controller.rb:1:1: C: Missing frozen string literal comment.
class ScreencastsController < ApplicationController
^
app/controllers/sessions_controller.rb:1:1: C: Missing frozen string literal comment.
require_dependency 'single_sign_on_request'
^
app/helpers/admin/attachments_helper.rb:1:1: C: Missing frozen string literal comment.
module Admin::AttachmentsHelper
^
app/helpers/admin/clips_helper.rb:1:1: C: Missing frozen string literal comment.
module Admin::ClipsHelper
^
app/helpers/admin/collections_helper.rb:1:1: C: Missing frozen string literal comment.
module Admin::CollectionsHelper
^
app/helpers/admin/dashboard_helper.rb:1:1: C: Missing frozen string literal comment.
module Admin::DashboardHelper
^
app/helpers/admin/episodes_helper.rb:1:1: C: Missing frozen string literal comment.
module Admin::EpisodesHelper
^
app/helpers/admin/products_helper.rb:1:1: C: Missing frozen string literal comment.
module Admin::ProductsHelper
^
app/helpers/admin/purchases_helper.rb:1:1: C: Missing frozen string literal comment.
module Admin::PurchasesHelper
^
app/helpers/admin/users_helper.rb:1:1: C: Missing frozen string literal comment.
module Admin::UsersHelper
^
app/helpers/admin/videos_helper.rb:1:1: C: Missing frozen string literal comment.
module Admin::VideosHelper
^
app/helpers/application_helper.rb:1:1: C: Missing frozen string literal comment.
module ApplicationHelper
^
app/helpers/courses_helper.rb:1:1: C: Missing frozen string literal comment.
module CoursesHelper
^
app/helpers/screencasts_helper.rb:1:1: C: Missing frozen string literal comment.
module ScreencastsHelper
^
app/jobs/application_job.rb:1:1: C: Missing frozen string literal comment.
class ApplicationJob < ActiveJob::Base
^
app/mailers/application_mailer.rb:1:1: C: Missing frozen string literal comment.
class ApplicationMailer < ActionMailer::Base
^
app/models/application_record.rb:1:1: C: Missing frozen string literal comment.
class ApplicationRecord < ActiveRecord::Base
^
app/models/attachment.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
app/models/authorization.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
app/models/clip.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
app/models/collection.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
app/models/concerns/ownable.rb:1:1: C: Missing frozen string literal comment.
module Ownable
^
app/models/concerns/pageable.rb:1:1: C: Missing frozen string literal comment.
module Pageable
^
app/models/concerns/purchasable.rb:1:1: C: Missing frozen string literal comment.
module Purchasable
^
app/models/concerns/taggable.rb:1:1: C: Missing frozen string literal comment.
module Taggable
^
app/models/episode.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
app/models/product.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
app/models/purchase.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
app/models/tag.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
app/models/tagging.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
app/models/user.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
app/models/video.rb:1:1: C: Missing frozen string literal comment.
# == Schema Information
^
config/application.rb:1:1: C: Missing frozen string literal comment.
require File.expand_path('../boot', __FILE__)
^
config/boot.rb:1:1: C: Missing frozen string literal comment.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
^
config/environment.rb:1:1: C: Missing frozen string literal comment.
# Load the Rails application.
^
config/environments/development.rb:1:1: C: Missing frozen string literal comment.
Rails.application.configure do
^
config/environments/production.rb:1:1: C: Missing frozen string literal comment.
Rails.application.configure do
^
config/environments/staging.rb:1:1: C: Missing frozen string literal comment.
Rails.application.configure do
^
config/environments/test.rb:1:1: C: Missing frozen string literal comment.
Rails.application.configure do
^
config/initializers/active_record_belongs_to_required_by_default.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/application_controller_renderer.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/assets.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/assets.rb:11:50: C: Do not use spaces inside percent literal delimiters.
Rails.application.config.assets.precompile += %w( admin.js admin.scss )
^
config/initializers/assets.rb:11:70: C: Do not use spaces inside percent literal delimiters.
Rails.application.config.assets.precompile += %w( admin.js admin.scss )
^
config/initializers/backtrace_silencers.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/bugsnag.rb:1:1: C: Missing frozen string literal comment.
Bugsnag.configure do |config|
^
config/initializers/callback_terminator.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/cookies_serializer.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/filter_parameter_logging.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/inflections.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/mime_types.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/mini_profiler.rb:1:1: C: Missing frozen string literal comment.
Rack::MiniProfiler.config.storage = Rack::MiniProfiler::MemoryStore
^
config/initializers/per_form_csrf_tokens.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/request_forgery_protection.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/search.rb:1:1: C: Missing frozen string literal comment.
if ENV['ALGOLIA_APPLICATION_ID'].present?
^
config/initializers/session_store.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/initializers/wrap_parameters.rb:1:1: C: Missing frozen string literal comment.
# Be sure to restart your server when you modify this file.
^
config/puma.rb:1:1: C: Missing frozen string literal comment.
# Puma can serve each request in a thread from an internal thread pool.
^
config/routes.rb:1:1: C: Missing frozen string literal comment.
Rails.application.routes.draw do
^
db/migrate/20160413124246_create_nonces.rb:1:1: C: Missing frozen string literal comment.
class CreateNonces < ActiveRecord::Migration[5.0]
^
db/migrate/20160414142913_create_users.rb:1:1: C: Missing frozen string literal comment.
class CreateUsers < ActiveRecord::Migration[5.0]
^
db/migrate/20160421104922_rename_nonces_to_authorizations.rb:1:1: C: Missing frozen string literal comment.
class RenameNoncesToAuthorizations < ActiveRecord::Migration[5.0]
^
db/migrate/20160421105302_rename_body_to_nonce_in_authorizations.rb:1:1: C: Missing frozen string literal comment.
class RenameBodyToNonceInAuthorizations < ActiveRecord::Migration[5.0]
^
db/migrate/20160426140035_create_products.rb:1:1: C: Missing frozen string literal comment.
class CreateProducts < ActiveRecord::Migration[5.0]
^
db/migrate/20160426141641_create_products_users_join_table.rb:1:1: C: Missing frozen string literal comment.
class CreateProductsUsersJoinTable < ActiveRecord::Migration[5.0]
^
db/migrate/20160426143842_create_videos.rb:1:1: C: Missing frozen string literal comment.
class CreateVideos < ActiveRecord::Migration[5.0]
^
db/migrate/20160426145736_create_collections.rb:1:1: C: Missing frozen string literal comment.
class CreateCollections < ActiveRecord::Migration[5.0]
^
db/migrate/20160426145754_create_collections_videos_join_table.rb:1:1: C: Missing frozen string literal comment.
class CreateCollectionsVideosJoinTable < ActiveRecord::Migration[5.0]
^
db/migrate/20160512152641_add_internal_flag_to_products.rb:1:1: C: Missing frozen string literal comment.
class AddInternalFlagToProducts < ActiveRecord::Migration[5.0]
^
db/migrate/20160512153729_rename_internal_flag_to_gratis.rb:1:1: C: Missing frozen string literal comment.
class RenameInternalFlagToGratis < ActiveRecord::Migration[5.0]
^
db/migrate/20160517133651_create_attachments.rb:1:1: C: Missing frozen string literal comment.
class CreateAttachments < ActiveRecord::Migration[5.0]
^
db/migrate/20160518095501_add_missing_columns_to_collections.rb:1:1: C: Missing frozen string literal comment.
class AddMissingColumnsToCollections < ActiveRecord::Migration[5.0]
^
db/migrate/20160518102203_rename_expiration_date_to_expired_at_in_collections.rb:1:1: C: Missing frozen string literal comment.
class RenameExpirationDateToExpiredAtInCollections < ActiveRecord::Migration[5.0]
^
db/migrate/20160518112927_add_missing_columns_to_videos.rb:1:1: C: Missing frozen string literal comment.
class AddMissingColumnsToVideos < ActiveRecord::Migration[5.0]
^
db/migrate/20160518122045_create_tags.rb:1:1: C: Missing frozen string literal comment.
class CreateTags < ActiveRecord::Migration[5.0]
^
db/migrate/20160518122057_create_taggings.rb:1:1: C: Missing frozen string literal comment.
class CreateTaggings < ActiveRecord::Migration[5.0]
^
db/migrate/20160518130914_create_clips.rb:1:1: C: Missing frozen string literal comment.
class CreateClips < ActiveRecord::Migration[5.0]
^
db/migrate/20160518133102_rename_gratis_to_free_in_products.rb:1:1: C: Missing frozen string literal comment.
class RenameGratisToFreeInProducts < ActiveRecord::Migration[5.0]
^
db/migrate/20160519102337_add_missing_null_contraints_to_authorizations.rb:1:1: C: Missing frozen string literal comment.
class AddMissingNullContraintsToAuthorizations < ActiveRecord::Migration[5.0]
^
db/migrate/20160519124240_add_null_contraints_and_default_values_to_attachments.rb:1:1: C: Missing frozen string literal comment.
class AddNullContraintsAndDefaultValuesToAttachments < ActiveRecord::Migration[5.0]
^
db/migrate/20160519124900_add_missing_null_contraints_to_clips.rb:1:1: C: Missing frozen string literal comment.
class AddMissingNullContraintsToClips < ActiveRecord::Migration[5.0]
^
db/migrate/20160519131426_change_duration_to_integer_in_clips.rb:1:1: C: Missing frozen string literal comment.
class ChangeDurationToIntegerInClips < ActiveRecord::Migration[5.0]
^
db/migrate/20160519132653_add_missing_null_contraints_to_collections.rb:1:1: C: Missing frozen string literal comment.
class AddMissingNullContraintsToCollections < ActiveRecord::Migration[5.0]
^
db/migrate/20160519134924_add_missing_null_contraints_to_products.rb:1:1: C: Missing frozen string literal comment.
class AddMissingNullContraintsToProducts < ActiveRecord::Migration[5.0]
^
db/migrate/20160519140206_add_missing_null_contraint_to_tags.rb:1:1: C: Missing frozen string literal comment.
class AddMissingNullContraintToTags < ActiveRecord::Migration[5.0]
^
db/migrate/20160519140431_add_missing_null_contraints_to_taggings.rb:1:1: C: Missing frozen string literal comment.
class AddMissingNullContraintsToTaggings < ActiveRecord::Migration[5.0]
^
db/migrate/20160519141044_add_missing_null_contraints_to_users.rb:1:1: C: Missing frozen string literal comment.
class AddMissingNullContraintsToUsers < ActiveRecord::Migration[5.0]
^
db/migrate/20160519142300_add_missing_null_constraints_to_videos.rb:1:1: C: Missing frozen string literal comment.
class AddMissingNullConstraintsToVideos < ActiveRecord::Migration[5.0]
^
db/migrate/20160527103607_add_internal_and_defunct_flags_to_products.rb:1:1: C: Missing frozen string literal comment.
class AddInternalAndDefunctFlagsToProducts < ActiveRecord::Migration[5.0]
^
db/migrate/20160606133121_create_parts.rb:1:1: C: Missing frozen string literal comment.
class CreateParts < ActiveRecord::Migration[5.0]
^
db/migrate/20160606134625_drop_collections_videos_join_table.rb:1:1: C: Missing frozen string literal comment.
class DropCollectionsVideosJoinTable < ActiveRecord::Migration[5.0]
^
db/migrate/20160608113759_rename_type_to_kind_in_attachments.rb:1:1: C: Missing frozen string literal comment.
class RenameTypeToKindInAttachments < ActiveRecord::Migration[5.0]
^
db/migrate/20160609105340_add_filename_to_attachments.rb:1:1: C: Missing frozen string literal comment.
class AddFilenameToAttachments < ActiveRecord::Migration[5.0]
^
db/migrate/20160610115451_remove_non_null_requirement_from_users.rb:1:1: C: Missing frozen string literal comment.
class RemoveNonNullRequirementFromUsers < ActiveRecord::Migration[5.0]
^
db/migrate/20160616102834_add_order_to_clips.rb:1:1: C: Missing frozen string literal comment.
class AddOrderToClips < ActiveRecord::Migration[5.0]
^
db/migrate/20160617123928_make_expired_at_date_time_in_collections.rb:1:1: C: Missing frozen string literal comment.
class MakeExpiredAtDateTimeInCollections < ActiveRecord::Migration[5.0]
^
db/migrate/20160620082208_rename_parts_to_episodes.rb:1:1: C: Missing frozen string literal comment.
class RenamePartsToEpisodes < ActiveRecord::Migration[5.0]
^
db/migrate/20160621130329_create_purchases.rb:1:1: C: Missing frozen string literal comment.
class CreatePurchases < ActiveRecord::Migration[5.0]
^
db/migrate/20160621130650_drop_products_users_join_table.rb:1:1: C: Missing frozen string literal comment.
class DropProductsUsersJoinTable < ActiveRecord::Migration[5.0]
^
db/migrate/20160628143737_add_default_flag_to_products.rb:1:1: C: Missing frozen string literal comment.
class AddDefaultFlagToProducts < ActiveRecord::Migration[5.0]
^
lib/single_sign_off_request.rb:1:1: C: Missing frozen string literal comment.
class SingleSignOffRequest
^
lib/single_sign_on_request.rb:1:1: C: Missing frozen string literal comment.
class SingleSignOnRequest
^
lib/single_sign_on_response.rb:1:1: C: Missing frozen string literal comment.
class SingleSignOnResponse
^
lib/vimeo.rb:1:1: C: Missing frozen string literal comment.
class Vimeo
^
lib/vimeo.rb:2:19: C: Freeze mutable objects assigned to constants.
PROVIDER_URL = 'https://vimeo.com'
^^^^^^^^^^^^^^^^^^^
lib/vimeo.rb:3:19: C: Freeze mutable objects assigned to constants.
API_URL = 'https://api.vimeo.com'
^^^^^^^^^^^^^^^^^^^^^^^
lib/vimeo.rb:5:3: C: Assignment Branch Condition size for stream_for is too high. [22.05/15]
def self.stream_for(video)
^^^
lib/vimeo.rb:5:3: C: Method has too many lines. [15/10]
def self.stream_for(video) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^
test/test_helper.rb:1:1: C: Missing frozen string literal comment.
ENV['RAILS_ENV'] ||= 'test'
^
123 files inspected, 129 offenses detected
Here are my installed gems:
$ gem list
*** LOCAL GEMS ***
actioncable (5.0.0, 5.0.0.rc2)
actionmailer (5.0.0, 5.0.0.rc2)
actionpack (5.0.0, 5.0.0.rc2)
actionview (5.0.0, 5.0.0.rc2)
activejob (5.0.0, 5.0.0.rc2)
activemodel (5.0.0, 5.0.0.rc2)
activerecord (5.0.0, 5.0.0.rc2)
activesupport (5.0.0, 5.0.0.rc2)
algoliasearch (1.9.0)
algoliasearch-rails (1.14.1)
annotate (2.7.1)
arel (7.0.0)
ast (2.3.0)
aws-sdk (2.3.19, 2.3.15)
aws-sdk-core (2.3.19, 2.3.15)
aws-sdk-resources (2.3.19, 2.3.15)
bigdecimal (default: 1.2.8)
bugsnag (4.2.1)
builder (3.2.2)
bundler (1.12.5)
byebug (9.0.5)
chronic_duration (0.10.6)
coffee-rails (4.1.1)
coffee-script (2.4.1)
coffee-script-source (1.10.0)
concurrent-ruby (1.0.2)
date_validator (0.9.0)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (2.7.0)
faker (1.6.3)
faraday (0.9.2)
ffi (1.9.10)
flamegraph (0.9.5)
globalid (0.3.6)
hashie (3.4.4)
httpclient (2.7.2)
i18n (0.7.0)
io-console (default: 0.4.5)
jbuilder (2.5.0)
jmespath (1.2.4)
jquery-rails (4.1.1)
json (2.0.1, 2.0.0, default: 1.8.3)
json_pure (2.0.1, 2.0.0, 1.8.3)
listen (3.0.8)
loofah (2.0.3)
mail (2.6.4)
memory_profiler (0.9.6)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.0)
multi_json (1.12.1)
multipart-post (2.0.0)
nio4r (1.2.1)
nokogiri (1.6.8)
numerizer (0.1.1)
parser (2.3.1.2)
pkg-config (1.1.7)
powerpack (0.1.1)
psych (default: 2.0.17)
puma (3.4.0)
rack (2.0.1, 2.0.0.rc1)
rack-mini-profiler (0.10.1)
rack-test (0.6.3)
rails (5.0.0, 5.0.0.rc2)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (2.0.1, 1.0.7)
rails-html-sanitizer (1.0.3)
railties (5.0.0, 5.0.0.rc2)
rainbow (2.1.0)
rake (11.2.2)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
rdoc (default: 4.2.1)
rubocop (0.41.1, 0.40.0)
ruby-progressbar (1.8.1)
sass (3.4.22)
sass-rails (5.0.5, 5.0.4)
skylight (0.10.5)
spring (1.7.1)
spring-watcher-listen (2.0.0)
sprockets (3.6.2)
sprockets-rails (3.1.1, 3.0.4)
sqlite3 (1.3.11)
stackprof (0.2.9)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
turbolinks (5.0.0, 5.0.0.beta2)
turbolinks-source (5.0.0, 5.0.0.beta5)
tzinfo (1.2.2)
uglifier (3.0.0)
unicode-display_width (1.1.0)
web-console (3.3.0)
websocket-driver (0.6.4)
websocket-extensions (0.1.2)
RuboCop version:
$ rubocop -v
0.41.1
Add the following to the top of all of those files:
# frozen_string_literal: true
You can just do bundle exec rubocop --auto-correct --only FrozenStringLiteralComment.
or add an ignore to your rubocop.yml if you don't want to use the Style/FrozenStringLiteralComment. It is new because this is a new feature in Ruby 2.3.
Thanks @backus.
I've gone with adding Style/FrozenStringLiteralComment to my rubocop.yml file for now.
What I don't understand is that this feature has been in RuboCop since 0.36.0, released back in January, and I've been using Ruby 2.3.0p0 with this codebase since it was created, but these issues only appeared this week after a) upgrading to the official release of Rails 5 from RC2, and b) upgrading RuboCop from 0.36.0 to 0.41?
Is it possible that the change in Ruby version handling, e.g., in #2956, triggered the change in behaviour, @micpringle?
It may well be the cause @scottmatthewman, as I do use a .ruby-version file. Thanks for pointing out that issue. 馃憤
@micpringle happy to help. I was reading through related issues before I opened #3285. If your problem is solved could you close this issue? I imagine the rubocop maintainers will appreciate that
I would try with one of these two possible solutions:
If they work, they would allow to apply the setting app-wide without having to modify a whole bunch of files. It has always baffled me why there's no way to set this up app-wide instead of on a per-file basis.
Most helpful comment
Add the following to the top of all of those files:
You can just do
bundle exec rubocop --auto-correct --only FrozenStringLiteralComment.or add an ignore to your rubocop.yml if you don't want to use the
Style/FrozenStringLiteralComment. It is new because this is a new feature in Ruby 2.3.