Open techsk8 opened 8 months ago
Puppet lint from the VSCode extension doesn't check thoroughly if the parameters used in a class are actually validated within the module in another class, therefore throws an error about missing datatype for those params:
# @summary puppet::server::compile::apache # # @api private # class puppet::server::compile::apache ( $servername = $puppet::servername, $puppetca_host = $puppet::server_puppetca_host, ) { assert_private() class { 'lib::ssl_certificate_check': blacklist_certificates => [ $puppet::server::compile::ssl_cert, ], } . . .
and the linter error looks like this:
[{ "resource": "/Users/control-repo/site/puppet/manifests/server/compile/apache.pp", "owner": "_generated_diagnostic_collection_name_#0", "code": "parameter_types", "severity": 4, "message": "missing datatype for parameter puppet::server::compile::apache::servername", "source": "Puppet", "startLineNumber": 6, "startColumn": 3, "endLineNumber": 6, "endColumn": 3 },{ "resource": "/Users/control-repo/site/puppet/manifests/server/compile/apache.pp", "owner": "_generated_diagnostic_collection_name_#0", "code": "parameter_types", "severity": 4, "message": "missing datatype for parameter puppet::server::compile::apache::puppetca_host", "source": "Puppet", "startLineNumber": 7, "startColumn": 3, "endLineNumber": 7, "endColumn": 3 }]
In VSCode looks like this:
Although I have validated the params I have used in the class, inside init.pp in the puppet class:
init.pp
puppet
# @param enable_clean_node # class puppet ( String $servername = $puppet::params::servername, Stdlib::Fqdn $server_puppetca_host = $puppet::params::server_puppetca_host, . . . ) inherits puppet::params { . . .
For puppet lint to check if the params used in the class are actually validated somewhere else and not throw a misleading false-positive error.
Steps to reproduce the behavior:
Nothing to add
Describe the Bug
Puppet lint from the VSCode extension doesn't check thoroughly if the parameters used in a class are actually validated within the module in another class, therefore throws an error about missing datatype for those params:
and the linter error looks like this:
In VSCode looks like this:
Although I have validated the params I have used in the class, inside
init.pp
in thepuppet
class:Expected Behavior
For puppet lint to check if the params used in the class are actually validated somewhere else and not throw a misleading false-positive error.
Steps to Reproduce
Steps to reproduce the behavior:
Environment
Additional Context
Nothing to add