Sha256: c0c302d5a22a742080a9e0e6996e03f0a01e0f703230f1e6f33f41800274e350
Contents?: true
Size: 684 Bytes
Versions: 28
Compression:
Stored size: 684 Bytes
Contents
# frozen_string_literal: true PuppetLint.new_check(:manifest_whitespace_arrows_single_space_after) do def check tokens.select { |token| token.type == :FARROW }.each do |token| next_token = token.next_token next unless next_token && !is_single_space(next_token) notify( :error, message: 'there should be a single space after an arrow', line: next_token.line, column: next_token.column, token: next_token, ) end end def fix(problem) token = problem[:token] if token.type == :WHITESPACE token.value = ' ' return end add_token(tokens.index(token), new_single_space) end end
Version data entries
28 entries across 28 versions & 1 rubygems