Import 'some/namespace' is never used when used in doc blocks only
Hello,
just asking since I stumble on this. Don't know whether could be a bad practice though.
Should PS also search inside docs blocks before reporting non used import?
This would help to shortens doc blocks namespaces declarations when referrring to types. Problem i see is that actually, it is some editor level feature, for php runtime would be actualy an unused import :)
I am using PS 2016.3
Thanks in advance,
David
Please sign in to leave a comment.
Hi there,
Could you please clarify your case with some code/screenshots of how it looks and should look in IDE?
4 years later, still a thing.
Happens in a few languages. Here it is in an ESM Node.JS project in IntelliJ IDEA Ultimate 2020.3.3:
Workaround is to put the following above it (or let "Suppress for statement" add it for you):
// noinspection ES6UnusedImports
JS and PHP inspections work differently, this thread was about PHP inspection, afaics. Please report this separately to our tracker at https://youtrack.jetbrains.com/newIssue or at a WebStorm forum.