Open jota0222 opened 10 months ago
That's definitively a challenge. :-)
These are nodes in the analysis of PHPDoc comments (fortunately, the [Doc] tag at the end reveals that). I use the doc-parser library to parse those, so the various nodes and their toString()
methods are not in my code, I just pass them to the console log.
Still, we might be able to catch the last line. This is basically a switch
statement on node.kind
, and the error message comes from the default branch, if something unexpected comes. But, it seems, node
itself can be null and then node.kind
doesn't make sense. I wonder if a simple guard if
would help. It wouldn't analyze what it can't then but it shouldn't blow up.
The problem is that it was quite some time ago that I had last touched it and I don't know whether there were disturbing modifications in the code since the last publishing. It would be good if you could check a modified version without me actually publishing it blindly.
Thanks @deakjahn, I can indeed test it. Just tell me what to do to help you.
Greetings!
I'm facing an issue with the extension in my project, I have tried to reproduce it in other projects without success. It's not working at all, it just doesn't show the refactor options. The only Info I have about the issue are these logs, which tell me nothing:
I think just by having better logs we can find the issue, at least, returning the objects in string instead of directly logging them.
If you have any suggestion to make it work for my project, I'll appreciate it.
Thanks for the help beforehand, and also many thanks for your work in this extension!
More data: