Sha256: f74cf9c1d5aa1a6389f4b22f082a451631dada229bfb6ce01064d153aedcf709
Contents?: true
Size: 591 Bytes
Versions: 6852
Compression:
Stored size: 591 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Layout # Checks for comma (,) preceded by space. # # @example # # bad # [1 , 2 , 3] # a(1 , 2) # each { |a , b| } # # # good # [1, 2, 3] # a(1, 2) # each { |a, b| } class SpaceBeforeComma < Cop include SpaceBeforePunctuation def autocorrect(space) PunctuationCorrector.remove_space(space) end def kind(token) 'comma' if token.comma? end end end end end
Version data entries
6,852 entries across 6,827 versions & 29 rubygems