1

I am writing custom lint rules, which should be shown in Android Studio. Everything is working fine except if i click on the "more..." link to see further explanation for the lint error. It always says "Under construction". I don't know why, is this a bug or am I doing something wrong?

An extraction of the Detector.class:

public class MyDetector extends Detector implements Detector.GradleScanner {

static Implementation IMPLEMENTATION = new Implementation(
        MyDetector.class,
        Scope.GRADLE_SCOPE
        );

public static final Issue COMPATIBILITY = Issue.create(
        "id here",
        "brief desc",
        "longer explanation",
        Category.CORRECTNESS,
        5,
        Severity.WARNING,
        IMPLEMENTATION);

@Override
public void visitBuildScript(@NonNull Context context, 
                                Map<String, Object> sharedData) {
    context.report(
        COMPATIBILITY,
        getLocation(),
        "report id"
    );
}

I'm am using:

Android Studio 2.3.3
Build #AI-162.4069837, built on June 6, 2017
JRE: 1.8.0_112-release-b06 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

Dependencies:

compile 'com.android.tools.lint:lint-api:25.2.0'
compile 'com.android.tools.lint:lint-checks:25.2.0'
compile 'com.android.tools.lint:lint:25.2.0'

...

com.android.tools.build:gradle:2.2.0

Tooltip while hovering over the lint problem:

Tooltip while hovering over the lint problem.

lint html is looking fine

enter image description here

Leonard Arnold
  • 646
  • 3
  • 14

1 Answers1

0

It is a restriction for custom lint rule. However, if you move your cursor to the line and click alt + return, you can see the option of "Show full explanation". That is the place where "longer explanation" field will be shown.

See the Screenshot

  • as you can see on the screenshot, "more" was already clicked. Actually after clicking "more" the "Under construction" String appears.... (shortcuts are different on mac/windows, i guess you use windows - i use mac) – Leonard Arnold Jul 26 '17 at 09:06
  • I also use mac. Try "option + return". The alt key is the same as option key on mac. And by saying cursor, i mean the cursor in the IDE, not the mouse. Also see the attachment I added – Thomas Chen Jul 27 '17 at 07:52