Sha256: 7aa3f73c85f744115731a1394d96d6a476fec515a30e88a763f1d7703856dd44

Contents?: true

Size: 364 Bytes

Versions: 2

Compression:

Stored size: 364 Bytes

Contents

PuppetLint.new_check(:numeric_variable) do
  def check
    tokens.select { |r|
      VARIABLE_TYPES.include? r.type
    }.each do |token|
      if token.value.match(/^[0-9]+$/)
        notify :warning, {
          :message => 'variable is solely numeric',
          :line    => token.line,
          :column  => token.column,
        }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puppet-lint-numericvariable-1.0.1 lib/puppet-lint/plugins/numeric_variable.rb
puppet-lint-numericvariable-1.0.0 lib/puppet-lint/plugins/numeric_variable.rb