Sha256: 3e830c587d226ed12c3b6bb3e54855c02a5e16f87b8fc013867aa55f685e3fb2
Contents?: true
Size: 598 Bytes
Versions: 10
Compression:
Stored size: 598 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Rails # This cop checks for the use of output calls like puts and print class Output < Cop MSG = 'Do not write to stdout. ' \ "Use Rails's logger if you want to log.".freeze def_node_matcher :output?, <<-PATTERN (send nil {:ap :p :pp :pretty_print :print :puts} $...) PATTERN def on_send(node) output?(node) do |args| return if args.empty? add_offense(node, :selector) end end end end end end
Version data entries
10 entries across 10 versions & 2 rubygems