puppetlabs / puppet-vscode

Puppet Editing. Redefined.
https://puppet-vscode.github.io
Apache License 2.0
81 stars 40 forks source link

puppet-lint only shows the line of the violation #576

Closed claviola closed 4 years ago

claviola commented 5 years ago

What Versions are you running?

OS Version: Ubuntu 19.10 "eoan" VSCode Version: 1.39.2 Puppet Extension Version: 0.21.0 PDK Version: NA, using agent

What You Are Seeing?

In linting popups and on the "problems" pane, I see the following output from the extension:

puppet-lint: /etc/puppet/environments/claviola/.../manifests/params.pp: 1 [1, 1] puppet-lint: /etc/puppet/environments/claviola/.../manifests/params.pp: 28 [10, 1] puppet-lint: /etc/puppet/environments/claviola/.../manifests/params.pp: 26 [12, 1]

What is Expected?

Seeing the same output I get from running puppet-lint by hand on the remote host:

WARNING: variable not enclosed in {} on line 10 WARNING: double quoted string containing no variables on line 12 WARNING: class not documented on line 1

How Did You Get This To Happen? (Steps to Reproduce)

Happens on every puppet manifest I've looked at so far.

Output Log

NA

claviola commented 5 years ago

Note that I don't have PDK installed remotely, and the puppet agent's version is older than 4 (3.8.3). puppet-lint runs just fine, however.

jpogran commented 5 years ago

Hi @claviola, thanks for the report. From the output you added, it appears that the extension is correctly showing 3 instances, but is not including the message. The extension linting feature uses a version of puppet-lint, specifically 2.3.6, that is contained within the extension. This is likely a different version of puppet-lint than you have locally. I assume the combination of Puppet 3.8.3 and puppet-lint is surfacing the message differently, or not at all.

I will attempt to setup a repo, but it will take some time as 3.8.3 is no longer supported by Puppet.

glennsarti commented 5 years ago

@claviola Also, are you able to share the params.pp file. Sometimes linting breaks due to lines above it and it's hard to diagnose without it.

claviola commented 5 years ago

Sorry I missed the updates to this ticket. Unfortunately I can't share this specific file, but maybe I can try to setup a dummy manifest?

glennsarti commented 5 years ago

That would be great! thankyou

github-actions[bot] commented 4 years ago

This issue has been marked stale because it has been open for more than 30 days with no activity. If this issue is still important to you, please comment to keep this issue open. If not, this will be closed in 5 days