We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Puppet language style guide states here in section Quoting:
If a string is a value from an enumerable set of options, such as present and absent, it SHOULD NOT be enclosed in quotes at all. For example: Good: ensure => present Bad: ensure => "present"
If a string is a value from an enumerable set of options, such as present and absent, it SHOULD NOT be enclosed in quotes at all.
present
absent
For example:
Good: ensure => present Bad: ensure => "present"
The completion of resources in VScode encloses the parameter value in single ticks, which is a violation of the language style guide.
Steps to reproduce the behavior: In a Puppet file, add a supported resource like file, service, package etc.
file
service
package
Puppet
Seems, that this is caused by this line.
In the meantime, I edited the file locally like so:
diff --git a/lib/puppet-languageserver/manifest/completion_provider.rb b/lib/puppet-languageserver/manifest/completion_provider.rb index e41c41d..086876f 100644 --- a/lib/puppet-languageserver/manifest/completion_provider.rb +++ b/lib/puppet-languageserver/manifest/completion_provider.rb @@ -276,7 +276,7 @@ module PuppetLanguageServer attr_names.each_index do |index| name = attr_names[index] value_text = (name == 'ensure') ? 'present' : 'value' # rubocop:disable Style/TernaryParentheses In this case it's easier to read. - snippet += "\t#{name.ljust(max_length, ' ')} => '${#{index + 2}:#{value_text}}'\n" + snippet += "\t#{name.ljust(max_length, ' ')} => ${#{index + 2}:#{value_text}}\n" end snippet += '}'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the Bug
The Puppet language style guide states here in section Quoting:
The completion of resources in VScode encloses the parameter value in single ticks, which is a violation of the language style guide.
Current behavior
Expected Behavior
Steps to Reproduce
Steps to reproduce the behavior:
In a Puppet file, add a supported resource like
file
,service
,package
etc.Environment
Puppet
version 1.5.4)Additional Context
Seems, that this is caused by this line.
In the meantime, I edited the file locally like so:
The text was updated successfully, but these errors were encountered: