Custom lint rule is not executed from IDE

103 views
Skip to first unread message

Мурат Байсангуров

unread,
Apr 7, 2022, 11:09:17 AMApr 7
to lint-dev
Hi!

I have a library module with custom lint rules with the following build.gradle

Screenshot 2022-04-07 at 15.54.59.png

In the app module it is connected like this:

lintChecks(project(":lint-rules"))

When i run gradlew :app:lint the rules are executed and all issues are detected. The problem is the when running from Analyze -> Inspect code this rules are skipped. On the fly analysis of files doesn't work either.

I've tried placing the jar file with custom rules in {home}/.android/lint directory, but it did not help. The only thing i noticed is AS log file containing this warning:

Loaded lint jar file from ...../.android/lint (lint.jar); this will stop working soon. If you need to push lint rules into a build, use the `ANDROID_LINT_JARS` environment variable or the `--lint-rule-jars` flag or a `lint.xml` file setting `<lint lintJars="path"...>`

Also setting env variable ANDROID_LINT_JARS did not help.

According to this FAQ the jar should contain the service loader registration of issue registry. It was not there, so i added it manually, although i think that i'm doing something wrong. 
What could be the reason for such behaviour?
Reply all
Reply to author
Forward
0 new messages