This is already done automatically if you call the reporting method
JavaContext#report(Issue,Node,Location,String). The second parameter, the
scope node, is the key part -- that's the one it uses to look in context
for suppression annotations and comments.

On Tue, Mar 10, 2015 at 6:22 PM GrĂ©gory Jourdan <[email protected]>
wrote:

> Hi all,
>
> I'm currently looking into creating a Lint detector that detects
> deprecation but can be suppressed with both @SuppressWarning and
> //noinspection
>
> As of now I'm mostly wondering if that work has been made anywhere, and
> what kind of source can I look at to help me make a JavaScanner because I'm
> still pretty lost looking into it, and it doesn't seem like the Java
> deprecation scanner is actually open source, or at least I can't find it...
>
> And here is my reasoning for why this detector is useful:
>
>  * Most warnings in my code base are removed using //noinspection
>  * I now know that //noinspection is purely an IntelliJ concept, but the
> fact is that annotations can't be added on every line of code, only when
> declaring something
>  * I don't want to have to refactor my entire codebase to support ignoring
> deprecation warnings, and I don't want to add a suppress warning on a
> different scope than what I exactly intent, which sometimes is a single
> line that doesn't contain a declaration (hence annotations aren't possible).
>
> Anyone having some knowledge or opinions for me? :)
>
> Thanks!
> Greg
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to