Sha256: 8d29694777ae26d616b885fbfd008c166875990d799da10cbb9b619892b78437
Contents?: true
Size: 327 Bytes
Versions: 4
Compression:
Stored size: 327 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop class WhenThen < Cop MSG = 'Never use "when x;". Use "when x then" instead.' def on_when(node) if node.loc.begin && node.loc.begin.source == ';' add_offence(:convention, node.loc.line, MSG) end super end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rubocop-0.8.3 | lib/rubocop/cop/when_then.rb |
rubocop-0.8.2 | lib/rubocop/cop/when_then.rb |
rubocop-0.8.1 | lib/rubocop/cop/when_then.rb |
rubocop-0.8.0 | lib/rubocop/cop/when_then.rb |