# File lib/puppet-lint/plugins/check_resources.rb, line 26 def check resource_indexes.each do |resource| ensure_attr_index = resource[:param_tokens].index { |param_token| param_token.value == 'ensure' } unless ensure_attr_index.nil? if ensure_attr_index > 0 ensure_token = resource[:param_tokens][ensure_attr_index] notify :warning, { :message => "ensure found on line but it's not the first attribute", :line => ensure_token.line, :column => ensure_token.column, } end end end end