class Object

Public Instance Methods

check() click to toggle source
# File lib/puppet-lint/plugins/resource_reference_chain_without_whitespace.rb, line 3
def check
  tokens.select { |token|
    [:TYPE].include? token.type
  }.each do |param_token|
    check = param_token
    case check.type
    when :TYPE
      begin
        if check.next_token.type == :WHITESPACE and check.next_code_token.type == :LBRACK
          notify :error, {
            :message => 'whitespce between reference type and title',
            :line    => check.line,
            :column  => check.column
          }
        end
      end
    end
  end
end
fix(problem) click to toggle source
# File lib/puppet-lint/plugins/resource_reference_with_unquoted_title.rb, line 36
def fix(problem)
  problem[:token].type = :SSTRING
end