Class: RuboCop::Cop::Code0::ZeroTrack::Logs::RailsLogger
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Code0::ZeroTrack::Logs::RailsLogger
- Defined in:
- lib/rubocop/cop/code0/zero_track/logs/rails_logger.rb
Overview
Cop that checks if ‘timestamps’ method is called with timezone information.
Constant Summary collapse
- MSG =
'Do not use `Rails.logger` directly, include `Code0::ZeroTrack::Loggable` instead'- LOG_METHODS =
%i[debug error fatal info warn].freeze
- LOG_METHODS_PATTERN =
LOG_METHODS.map(&:inspect).join(' ').freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
21 22 23 24 25 |
# File 'lib/rubocop/cop/code0/zero_track/logs/rails_logger.rb', line 21 def on_send(node) return unless rails_logger_log?(node) add_offense(node) end |