puppetlabs / puppet-lint

Check that your Puppet manifests conform to the style guide
https://puppetlabs.github.io/puppet-lint/
MIT License
23 stars 13 forks source link

Lexer does not parse regex properly #17

Open binford2k opened 3 years ago

binford2k commented 3 years ago

An example manifest is below; it fails linting with a syntax error at the last single quote of the manifest as is, but will work if the string form of the regex is used instead. See https://tickets.puppetlabs.com/browse/PDK-1732 for details.

   file_line { 'use_lvmetad':
     line => ' use_lvmetad = 0',
     path => '/etc/lvm/lvm.conf',
     match => /.*use_lvmetad =/,  # causes failure at last quote of manifest
     replace => true,
     notify => Exec['update_initramfs'];
   }
sanfrancrisko commented 3 years ago

Confirmed as issue