Sha256: bfc1a8f3e7bd41e27d6e9416a8c899164006aae63c8cbb022ec436e56009c9d1

Contents?: true

Size: 485 Bytes

Versions: 2

Compression:

Stored size: 485 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module Layout
      # Checks for comma (,) not followed by some kind of space.
      class SpaceAfterComma < Cop
        include SpaceAfterPunctuation

        def space_style_before_rcurly
          cfg = config.for_cop('Layout/SpaceInsideHashLiteralBraces')
          cfg['EnforcedStyle'] || 'space'
        end

        def kind(token)
          'comma' if token.type == :tCOMMA
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubocop-0.49.1 lib/rubocop/cop/layout/space_after_comma.rb
rubocop-0.49.0 lib/rubocop/cop/layout/space_after_comma.rb