Skip to content
New issue

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

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

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

h4l
Copy link
Contributor

@h4l h4l commented Jan 4, 2022

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.

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.
@h4l h4l requested review from glennsarti and a team as code owners January 4, 2022 11:05
@CLAassistant
Copy link

CLAassistant commented Jan 4, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@glennsarti glennsarti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! And tests as well. Thankyou

@h4l
Copy link
Contributor Author

h4l commented Jan 4, 2022

Cool, pleased to help!

Copy link
Contributor

@michaeltlombardi michaeltlombardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@michaeltlombardi michaeltlombardi merged commit ab226c2 into puppetlabs:main Jan 11, 2022
@jordanbreen28 jordanbreen28 added the bug Something isn't working label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@param name puppet strings tag crashes language server
5 participants