Open morehockeystats opened 5 years ago
how do you see this?
Something like ''Remove inspection for this instance"
Maybe "Mark this function as declared".
Maybe provide a means of annotation.
I use a lot of Mongo in my code, it's all littered with these warnings.
you can always turn off inspection you don't need. Plugin is a set of instruments and not all of them are good for every project.
Perl resolve will never be perfect because of language. I'm working on on improvements all the time. But call annotations does not look like a good solution.
You could make and annotate getters for this. Instead of
$self->{dbh}->something
use $self->get_database->something
. And by annotating get_database
you'll get necessary result.
But the inspection is useful for me in many other cases. I'd rather turn off this particular inspection on a case-by-case basis.
I'll think about possibility to suppress for the statement/expression/method/file
Here's a sample annotation I found in the JS mode: // noinspection EqualityComparisonWithCoercionJS it suppresses an inspection in a particular statement.
Maybe it can be somehow combined with ## no critic annotations?
@morehockeystats that's exactly what i'm talking about @elcamlost don't know. I believe there is no 1-to-1 matching of critic and inspections
@hurricup for those inspections, which has no critic analogous, own namespace can be used.
my $var = $a->b->c->d; ## no critic Camelcade::UnresolvedSubs
...
@elcamlost hmm. Looks good to me. Thanks!
This is a feature request.
Allow the user to manually resolve an XS or an autoload sub or a method that was not found by the parser. Such as this one of Mongo: https://github.com/Camelcade/Perl5-IDEA/issues/1650#issuecomment-349180493
Thanks,