puppetlabs / puppet-editor-services

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

(GH-320) Handle @param tags for non-existent params #321

Closed h4l closed 2 years ago

h4l commented 2 years ago

Fixes #320

Classes and defined types with docstring @param tags for parameters that are not actually present in the parameter list cause the language server to crash, due to populate_classes_from_yard_registry assuming param tags always have a :types array present.

@param tags without types are now ignored. Note that class/defined type parameters without a specified type automatically have the "Any" type in their :types array, so they're not excluded by this change.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

h4l commented 2 years ago

Cool, pleased to help!