Sha256: d34f026fa757dcb1f57fc95da8e6ffc0c6644484b6d9442518302c12a0d28567

Contents?: true

Size: 352 Bytes

Versions: 2

Compression:

Stored size: 352 Bytes

Contents

require 'simplabs/excellent/checks/base'

module Simplabs

  module Excellent

    module Checks

      class CaseMissingElseCheck < Base

        def interesting_nodes
          [:case]
        end
  
        def evaluate(node)
          add_error('Case statement is missing else clause.') unless node.last
        end

      end

    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simplabs-excellent-1.0.0 lib/simplabs/excellent/checks/case_missing_else_check.rb
simplabs-excellent-1.0.1 lib/simplabs/excellent/checks/case_missing_else_check.rb