test_apps/rails_5_0/config/environments/production.rb
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Line is too long. [96/80] Open
Open
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
- Exclude checks
Add an empty line after magic comments. Open
Open
Rails.application.configure do
- Read upRead up
- Exclude checks
Checks for a newline after the final magic comment.
Example:
# good
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
# Some code
end
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Open
if ENV["RAILS_LOG_TO_STDOUT"].present?
- Read upRead up
- Exclude checks
Checks if uses of quotes match the configured preference.
Example: EnforcedStyle: single_quotes (default)
# bad
"No special symbols"
"No string interpolation"
"Just text"
# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"
Example: EnforcedStyle: double_quotes
# bad
'Just some text'
'No special chars or interpolation'
# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Extra blank line detected. Open
Open
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
- Read upRead up
- Exclude checks
This cops checks for two or more consecutive blank lines.
Example:
# bad - It has two empty lines.
some_method
# one empty line
# two empty lines
some_method
# good
some_method
# one empty line
some_method
Line is too long. [83/80] Open
Open
# Use a real queuing backend for Active Job (and separate queues per environment)
- Exclude checks
Line is too long. [100/80] Open
Open
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
- Exclude checks
Line is too long. [83/80] Open
Open
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
- Exclude checks
Line is too long. [85/80] Open
Open
# Settings specified here will take precedence over those in config/application.rb.
- Exclude checks
Line is too long. [96/80] Open
Open
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
- Exclude checks