reevoo/sapience-rb

View on GitHub
lib/sapience/rails/engine.rb

Summary

Maintainability
A
0 mins
Test Coverage

Line is too long. [101/80]
Open

        Sapience::Extensions::ActionController::Notifications.use if Sapience.config.rails_ac_metrics
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience/extensions/action_dispatch/debug_exceptions"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience/extensions/action_view/log_subscriber"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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. [93/80]
Open

        Bugsnag.configure { |config| config.logger = Sapience[Bugsnag] } if defined?(Bugsnag)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Line is too long. [88/80]
Open

require "sapience/extensions/action_controller/live" if defined?(ActionController::Live)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Line is too long. [93/80]
Open

        Bugsnag.configure { |config| config.logger = Sapience[Bugsnag] } if defined?(Bugsnag)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience/extensions/action_controller/live" if defined?(ActionController::Live)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience/extensions/action_controller/notifications"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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. [95/80]
Open

        require "sapience/extensions/action_cable/tagged_logger_proxy" if defined?(ActionCable)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Line is too long. [106/80]
Open

        require "sapience/extensions/active_model_serializers/logging" if defined?(ActiveModelSerializers)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience/extensions/action_view/streaming_template_renderer"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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. [97/80]
Open

      ::Rails::Application::Bootstrap.initializers.delete_if { |i| i.name == :initialize_logger }
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Line is too long. [92/80]
Open

        # in the rare case a gem disables logging but still requires a logger (teaspoon gem)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Line is too long. [91/80]
Open

        # Sapience::Extensions::ActiveSupport::MailerLogSubscriber.attach_to :action_mailer
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Line is too long. [105/80]
Open

        Resque.logger               = Sapience[Resque] if defined?(Resque) && Resque.respond_to?(:logger)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Missing top-level class documentation comment.
Open

    class Engine < ::Rails::Engine
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.

The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.

Example:

# bad
class Person
  # ...
end

# good
# Description/Explanation of Person class
class Person
  # ...
end

Line is too long. [86/80]
Open

        ActiveSupport.on_load(:action_cable) { self.logger = Sapience["ActionCable"] }
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Line is too long. [84/80]
Open

        %i[active_record action_controller action_mailer action_view].each do |name|
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Line is too long. [81/80]
Open

        Sapience::Extensions::ActiveJob::Notifications.use if defined?(ActiveJob)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience/extensions/active_job/notifications" if defined?(ActiveJob)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience/extensions/rails/rack/logger_info_as_debug"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

        ActiveSupport.on_load(:action_cable) { self.logger = Sapience["ActionCable"] }
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

        require "sapience/extensions/active_job/logging" if defined?(ActiveJob)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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. [92/80]
Open

        Concurrent.global_logger = Sapience::Loggers::Concurrent.new if defined?(Concurrent)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

        require "sapience/extensions/action_cable/tagged_logger_proxy" if defined?(ActionCable)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience/loggers/concurrent"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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. [90/80]
Open

        Sapience::Extensions::ActionController::LogSubscriber.attach_to :action_controller
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  require "sapience/extensions/active_record/notifications"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

        require "sapience/extensions/active_model_serializers/logging" if defined?(ActiveModelSerializers)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience/extensions/action_controller/log_subscriber"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

require "sapience/extensions/rails/rack/logger"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

Add an empty line after magic comments.
Open

require "sapience"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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

Line is too long. [104/80]
Open

        # Raven::Configuration.logger = Sapience[Raven::Configuration] if defined?(Raven::Configuration)
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

  require "sapience/extensions/active_record/log_subscriber"
Severity: Minor
Found in lib/sapience/rails/engine.rb by rubocop

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"

There are no issues that match your filters.

Category
Status