Sha256: 38860d39e6d68b153c5c0134610c0c58f41921ae6487c0f954aefcd57e1cbe21
Contents?: true
Size: 472 Bytes
Versions: 5
Compression:
Stored size: 472 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop class RescueModifier < Cop ERROR_MESSAGE = 'Avoid using rescue in its modifier form.' def inspect(file, source, tokens, sexp) each(:rescue_mod, sexp) do |s| ident = find_first(:@ident, s) lineno = ident ? ident[2].lineno : nil add_offence(:convention, lineno, ERROR_MESSAGE) if lineno end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems