-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the Bug
When replacing puppet-lint 4.2.4 with 4.3.0 in the vendor directory, puppet-languageserver stops producing diagnostics for lint errors
Expected Behavior
diagnostics should still get issued
Steps to Reproduce
Steps to reproduce the behavior:
- In the Rakefile, change the vendor ref to
4.3.0and then build a release - Start the languageserver per usual
Environment
- Version 2.0.4
- Platform Debian unstable (before trixie release)
Additional Context
I've identified a hack in the code for making the diagnostics still come out with puppet-lint 4.3.0. I have no idea if the solution is "the correct one" though.
The cause of the problem seems to be in puppetlabs/puppet-lint@c35705b where fileinfo started being passed as-is to File.extname(). puppet-languageserver give nil as a value to fileinfo so that call crashes.
the hack I used is to modify puppet-languageserver/manifest/validation_provider.rb at line 42 like the following (e.g. pass in an empty string to linter.run() instead of nil):
39 linter = PuppetLint::Checks.new
40 linter.load_data(nil, content)
41
42 problems = linter.run('', content)
43 unless problems.nil?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working