Sha256: 3ea2735dd8d5539bda3f2c5ab8f511ddd33418eed9a95faccd89bcddd17f2c0d
Contents?: true
Size: 504 Bytes
Versions: 3
Compression:
Stored size: 504 Bytes
Contents
PuppetLint.new_check(:variable_contains_upcase) do def check tokens.select { |r| Set[:VARIABLE, :UNENC_VARIABLE].include? r.type }.each do |token| if token.value.gsub(/\[.+?\]/, '').match(/[A-Z]/) notify :warning, { :message => 'variable contains a capital letter', :line => token.line, :column => token.column, :token => token, } end end end def fix(problem) problem[:token].value.downcase! end end
Version data entries
3 entries across 3 versions & 1 rubygems