Sha256: b78ccff0068329b8a83a0136a62cea3ed20890149588f41d86c32a6dacf9b653
Contents?: true
Size: 540 Bytes
Versions: 3
Compression:
Stored size: 540 Bytes
Contents
PuppetLint.new_check(:empty_string_assignment) do def check tokens.each_with_index do |token, token_idx| if token.type == :SSTRING && token.prev_code_token.type == :EQUALS && \ token.value == '' notify :warning, { :message => 'variable assigned to the empty string', :line => token.line, :column => token.column, :token => token, } end end end def fix(problem) problem[:token].type = :UNDEF problem[:token].value = 'undef' end end
Version data entries
3 entries across 3 versions & 1 rubygems