-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Warnings on non-imported annotations #19
Comments
so highlighting should be moved from annotation extension itself to inspections, so then it can be disabled. |
Would also be interested in seeing this fixed. As you say, this occurs quite often in Drupal 8. Having an inspection setting for this ("Warn about missing annotation imports") would be perfect! (See also: http://youtrack.jetbrains.com/issue/WI-24731) |
Yeah I keep getting missing import as well whereas its not needed .. highly annoying as it highlights all the annotations.. |
Ideally, the warning should be smart enough not to warn when the annotations are used in a Drupal 8 context, but to warn in more typical situations where they are needed. This probably needs a degree of cooperation with the Drupal support plugin. |
Is there any update on this? |
Chiming in here as well to see if any progress been made. Happy to help if given some guidance :) |
The warning is created here, I would guess it should be possible to find out whether the inspection defined as |
Given a scenario where both types of annotations are used: |
If fixing this just for Drupal 8 (don't know whether import-less annotations exist in other projects and, if so, how common they are), it might be possible to either cooperate with the "Drupal" plugin, or to just look whether an annotation with that classname exists in some sub-namespace of |
Make this +1 :)
Problem is, those annotations that do require an import won't work without it. So for those I really would appreciate the warning.
Maybe implement this for a start, and then if the question pops up again, make these namespaces somehow configurable. |
Depending on the configuration, you sometimes don't need to import annotations. However the plugin will add warnings on every not-imported annotation.
Would it be possible to disable this behavior, or make an option to disable it?
The text was updated successfully, but these errors were encountered: