Skip to content

Commit

Permalink
Merge ab8e543 into 630e72f
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmogar committed Feb 15, 2017
2 parents 630e72f + ab8e543 commit 11f8740
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/puppet-lint/plugins/check_version_comparison.rb
Expand Up @@ -10,7 +10,7 @@ def is_num_comparison?(token)
def check
tokens.each_with_index do |token, token_idx|
next unless token.type == :VARIABLE
next unless token.value =~ /(?:version|release)$/
next unless token.value =~ /(?:version|release)$|\[(?:version|release)\]|\['(?:version|release)'\]/
next unless is_num_comparison?(token.next_code_token)
notify :warning, {
:message => 'version compared as number',
Expand All @@ -19,7 +19,7 @@ def check
:token => token,
}
end
end
end

def compared_value(token)
token.next_code_token.next_code_token.value
Expand Down

0 comments on commit 11f8740

Please sign in to comment.