# frozen_string_literal: true module RuboCop module Cop module Layout # Checks for unnecessary additional spaces inside the delimiters of # %i/%w/%x literals. # # @example # # # bad # %i( foo bar baz ) # # # good # %i(foo bar baz) # # # bad # %w( foo bar baz ) # # # good # %w(foo bar baz) # # # bad # %x( ls -l ) # # # good # %x(ls -l) # # # bad # %w( ) # %w( # ) # # # good # %w() class SpaceInsidePercentLiteralDelimiters < Base include MatchRange include PercentLiteral extend AutoCorrector MSG = 'Do not use spaces inside percent literal delimiters.' BEGIN_REGEX = /\A( +)/.freeze END_REGEX = /(?