Custom lint warning message don't show in Android Library Module.

728 views
Skip to first unread message

chris_chutao

unread,
Aug 2, 2017, 9:20:45 AM8/2/17
to lint-dev
Hi, Tor Norby:
    I found my custom lint don't show warning message when the "bad code" is in Android Library Module.
    In fact, when I debug my custom lint rule, it did find the "bad code" in Library Module and called the context.report(Issue issue, PsiElement scope, Location location, String message);
    Besides, when I ran command: ./gradlew lint, the "bad code" in Library was included.
    Is threre any solution?

=========================

The way I using custom lint, is build the module as AAR, and compile it in application module. Just like LinkedIn did: Writing Custom Lint Checks with Gradle

My lint api version is: 25.3.1, Gradle version is: 2.3.1, Android Studio version is: 2.3.3, in MacOs, Java 1.8.

To see images blow, can easily understand:



Tor Norbye

unread,
Aug 2, 2017, 10:58:53 AM8/2/17
to chris_chutao, lint-dev
It sounds like you might be hitting

That one fell off the radar, I'll try to take a look soon.

--
You received this message because you are subscribed to the Google Groups "lint-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lint-dev+unsubscribe@googlegroups.com.
To post to this group, send email to lint...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lint-dev/6b7f64ac-7c57-4df7-98ec-22ebcbb37309%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

chris_chutao

unread,
Aug 3, 2017, 4:40:57 AM8/3/17
to lint-dev, cha...@gmail.com
Thank you very much, Tor Norbye.

在 2017年8月2日星期三 UTC+8下午10:58:53,Tor Norbye写道:
It sounds like you might be hitting

That one fell off the radar, I'll try to take a look soon.
On Wed, Aug 2, 2017 at 12:31 AM, chris_chutao <cha...@gmail.com> wrote:
Hi, Tor Norby:
    I found my custom lint don't show warning message when the "bad code" is in Android Library Module.
    In fact, when I debug my custom lint rule, it did find the "bad code" in Library Module and called the context.report(Issue issue, PsiElement scope, Location location, String message);
    Besides, when I ran command: ./gradlew lint, the "bad code" in Library was included.
    Is threre any solution?

=========================

The way I using custom lint, is build the module as AAR, and compile it in application module. Just like LinkedIn did: Writing Custom Lint Checks with Gradle

My lint api version is: 25.3.1, Gradle version is: 2.3.1, Android Studio version is: 2.3.3, in MacOs, Java 1.8.

To see images blow, can easily understand:



--
You received this message because you are subscribed to the Google Groups "lint-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lint-dev+u...@googlegroups.com.

Tamas Varga

unread,
Nov 13, 2017, 9:04:09 AM11/13/17
to lint-dev
Hi Tor!

This to me still seems to be an issue in Android Studio 3.0 and 3.1.0-alpha03 even tho https://issuetracker.google.com/issues/37101265#comment4 says it's fixed in for 3.0 Beta 2. Could you please double check on this.


On Wednesday, August 2, 2017 at 4:58:53 PM UTC+2, Tor Norbye wrote:
It sounds like you might be hitting

That one fell off the radar, I'll try to take a look soon.
On Wed, Aug 2, 2017 at 12:31 AM, chris_chutao <cha...@gmail.com> wrote:
Hi, Tor Norby:
    I found my custom lint don't show warning message when the "bad code" is in Android Library Module.
    In fact, when I debug my custom lint rule, it did find the "bad code" in Library Module and called the context.report(Issue issue, PsiElement scope, Location location, String message);
    Besides, when I ran command: ./gradlew lint, the "bad code" in Library was included.
    Is threre any solution?

=========================

The way I using custom lint, is build the module as AAR, and compile it in application module. Just like LinkedIn did: Writing Custom Lint Checks with Gradle

My lint api version is: 25.3.1, Gradle version is: 2.3.1, Android Studio version is: 2.3.3, in MacOs, Java 1.8.

To see images blow, can easily understand:



--
You received this message because you are subscribed to the Google Groups "lint-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lint-dev+u...@googlegroups.com.

Tamas Varga

unread,
Nov 13, 2017, 9:17:26 AM11/13/17
to lint-dev

Surya Darma

unread,
Jan 14, 2018, 9:48:42 PM1/14/18
to lint-dev
Are there any updates on this? I got the same issue :(

Flávio Faria

unread,
Apr 18, 2018, 9:16:19 AM4/18/18
to lint-dev
Still an issue on 3.2 Canary 10, Mac OS High Sierra. It shows up in Gradle HTML report, but not on AS: https://github.com/flavioarfaria/android-custom-lint-rules
Reply all
Reply to author
Forward
0 new messages