Sha256: 19b176f24d68667c4f1268805e135d87627d10a38b5cae3cab0ed957fc89ecbd
Contents?: true
Size: 479 Bytes
Versions: 1
Compression:
Stored size: 479 Bytes
Contents
PuppetLint.new_check(:variable_contains_upcase) do def check tokens.select do |r| Set[:VARIABLE, :UNENC_VARIABLE].include? r.type end.each do |token| next unless /[A-Z]/.match?(token.value.gsub(/\[.+?\]/, '')) notify :warning, { message: 'variable contains a capital letter', line: token.line, column: token.column, token: token, } end end def fix(problem) problem[:token].value.downcase! end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
puppet-lint-variable_contains_upcase-2.0.0 | lib/puppet-lint/plugins/variable_contains_upcase.rb |