Sha256: d3d536458e3df7eac0235054e65aeb96a4b3c38846d3f67f1506dd454a77b0ae

Contents?: true

Size: 670 Bytes

Versions: 2

Compression:

Stored size: 670 Bytes

Contents

PuppetLint.new_check(:resource_reference_without_title_capital) 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_code_token.next_code_token
        unless value_token.value =~ (/^[a-z]*$/)
          notify :error, {
            :message => 'resource reference with title with capital letter',
            :line    => value_token.line,
            :column  => value_token.column
          }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puppet-lint-resource_reference_syntax-1.0.1 lib/puppet-lint/plugins/resource_reference_without_title_capital.rb
puppet-lint-resource_reference_syntax-1.0.0 lib/puppet-lint/plugins/resource_reference_without_title_capital.rb