Sha256: 3c04d948555f210e9b8f2ffd58fdfb6dc37efcc1b49bc24733d187291925a42d

Contents?: true

Size: 693 Bytes

Versions: 4

Compression:

Stored size: 693 Bytes

Contents

PuppetLint.new_check(:resource_reference_without_whitespace) do
  def check
    resource_indexes.each do |resource|
      resource[:param_tokens].select { |param_token|
        ['require', 'subscribe', 'notify', 'before'].include? param_token.value
      }.each do |param_token|
        value_token = param_token.next_code_token.next_code_token.next_token
        if value_token.type != :LBRACK
          notify :error, {
            :message => 'whitespce between reference type and title',
            :line    => param_token.next_code_token.next_code_token.line,
            :column  => param_token.next_code_token.next_code_token.column
          }
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
puppet-lint-resource_reference_syntax-1.0.3 lib/puppet-lint/plugins/resource_reference_without_whitespace.rb
puppet-lint-resource_reference_syntax-1.0.2 lib/puppet-lint/plugins/resource_reference_without_whitespace.rb
puppet-lint-resource_reference_syntax-1.0.1 lib/puppet-lint/plugins/resource_reference_without_whitespace.rb
puppet-lint-resource_reference_syntax-1.0.0 lib/puppet-lint/plugins/resource_reference_without_whitespace.rb