Sha256: 27bf36b5a138d15d190f923a318e0830e3658ba6b0d7914375dcb55774f45ff4
Contents?: true
Size: 673 Bytes
Versions: 14
Compression:
Stored size: 673 Bytes
Contents
# encoding: utf-8 # frozen_string_literal: true module RuboCop module Cop module Lint # This cop checks for useless `else` in `begin..end` without `rescue`. # # @example # begin # do_something # else # handle_errors # This will never be run. # end class UselessElseWithoutRescue < Cop include ParserDiagnostic MSG = '`else` without `rescue` is useless.'.freeze private def relevant_diagnostic?(diagnostic) diagnostic.reason == :useless_else end def alternative_message(_diagnostic) MSG end end end end end
Version data entries
14 entries across 14 versions & 2 rubygems