voxpupuli / puppet-lint-strict_indent-check

indent check for puppet-lint
Mozilla Public License 2.0
4 stars 10 forks source link

Bad behavior with UTF-8 chars #18

Closed dioni21 closed 4 years ago

dioni21 commented 4 years ago

Not sure if this a puppet-lint-strict_indent-check (@relud) bug, or a puppet-lint (@rodjek) bug, sorry for calling you both.

In this example:

class xx::yy
{
  if true {
    notify{ "ã çã": }
  }
}

I get indent error on lines 5 and 6: e.g.: WARNING: indent should be 2 chars and is 0 on line 6

This is the smallest code I could get that replicates the error. Changing the UTF-8 string, or removing the if makes the error go away.

My minimal gem list:

bigdecimal (1.1.0)
bundler (1.17.3, default: 1.16.6)
bundler-unload (1.0.2)
executable-hooks (1.6.0)
facter (1.7.6)
gem-wrappers (1.4.0)
hiera (1.3.4)
io-console (0.3)
json (1.5.5)
json_pure (1.8.2)
minitest (2.5.1)
puppet (3.3.2)
puppet-lint (2.4.2)
puppet-lint-strict_indent-check (2.0.7)
rake (0.9.2.2)
rdoc (3.9.5)
rgen (0.6.6)
rubygems-bundler (1.4.5)
rvm (1.11.3.9)
relud commented 4 years ago

Changing the UTF-8 string, or removing the if makes the error go away.

parsing is handled by puppet-lint, this plugin only operates on the parsed tokens.