Skip to content

Commit

Permalink
0 does not need to be quoted
Browse files Browse the repository at this point in the history
  • Loading branch information
raphink committed Feb 4, 2015
1 parent 77a3ac5 commit b2200f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet-lint/plugins/check_leading_zero.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PuppetLint.new_check(:leading_zero) do
def check
tokens.each do |token|
if token.type == :NUMBER and token.value =~ /^0/
if token.type == :NUMBER and token.value =~ /^0\d/
notify :warning, {
:message => 'unquoted number with leading zero',
:line => token.line,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<<-EOS
$foo = '010'
$bar = 10
$baz = 0
EOS
}

Expand Down Expand Up @@ -48,6 +49,7 @@
<<-EOS
$foo = '010'
$bar = 10
$baz = 0
EOS
}

Expand Down

0 comments on commit b2200f7

Please sign in to comment.