puppetlabs / puppet-editor-services

Puppet Language Server for editors
Apache License 2.0
46 stars 21 forks source link

(GH-201) Fix hashrocket alignment in multi-resource declarations #202

Closed glennsarti closed 4 years ago

glennsarti commented 4 years ago

Fixes #201

Multi-resource declarations [1] are delimited by semi-colons as well as being inside a hash block. This commit modifies the hashrocket detection to also take into account semi-colons and adds a test for this scenario.

[1] https://puppet.com/docs/puppet/latest/style_guide.html#multiple-resources

genebean commented 4 years ago

@glennsarti FWIW, I imagine #203 is going to require editing this same chunk of code

glennsarti commented 4 years ago

@genebean Given your example in 203...that should work already. Hrmmm.

glennsarti commented 4 years ago

Ahh rubocop, how I hate thee 😁