Sha256: fc7b8cc34648f6a5178030468f04e57f59bcbfe47b96af0eced815108e3cbedb

Contents?: true

Size: 629 Bytes

Versions: 11

Compression:

Stored size: 629 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module Layout
      # Checks for semicolon (`;`) not followed by some kind of space.
      #
      # @example
      #   # bad
      #   x = 1;y = 2
      #
      #   # good
      #   x = 1; y = 2
      class SpaceAfterSemicolon < Base
        include SpaceAfterPunctuation
        extend AutoCorrector

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

        def kind(token)
          'semicolon' if token.semicolon?
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
rubocop-1.74.0 lib/rubocop/cop/layout/space_after_semicolon.rb
rubocop-1.73.2 lib/rubocop/cop/layout/space_after_semicolon.rb
siteimprove_api_client-1.0.1 vendor/bundle/ruby/3.2.0/gems/rubocop-1.73.1/lib/rubocop/cop/layout/space_after_semicolon.rb
rubocop-1.73.1 lib/rubocop/cop/layout/space_after_semicolon.rb
rubocop-1.73.0 lib/rubocop/cop/layout/space_after_semicolon.rb
rubocop-1.72.2 lib/rubocop/cop/layout/space_after_semicolon.rb
rubocop-1.72.1 lib/rubocop/cop/layout/space_after_semicolon.rb
rubocop-1.72.0 lib/rubocop/cop/layout/space_after_semicolon.rb
rubocop-1.71.2 lib/rubocop/cop/layout/space_after_semicolon.rb
tailscale_middleware-0.0.3 vendor/cache/ruby/3.4.0/gems/rubocop-1.71.1/lib/rubocop/cop/layout/space_after_semicolon.rb
rubocop-1.71.1 lib/rubocop/cop/layout/space_after_semicolon.rb