Sha256: 57db93a365875c9756495daf79b0c8f814b2d5e05c243119afb3fa92fd78dfca
Contents?: true
Size: 430 Bytes
Versions: 12
Compression:
Stored size: 430 Bytes
Contents
# encoding: utf-8 module Rubocop module Cop module Style # Checks for uses of semicolon in if statements. class IfWithSemicolon < Cop include IfThenElse def offending_line(node) node.loc.begin.line if node.loc.begin && node.loc.begin.is?(';') end def error_message 'Never use if x; Use the ternary operator instead.' end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems