redhat-developer / quarkus-ls

Language server for Quarkus tooling
Eclipse Public License 2.0
43 stars 15 forks source link

false-positive for `it` parameter in Qute template #1001

Open datho7561 opened 2 weeks ago

datho7561 commented 2 weeks ago

See https://github.com/FroMage/quarkus-renarde-todo/blob/main/src/main/resources/templates/tags/user.html

The validator treats it as a java.lang.Object, so it marks all the method invocations as errors.

It makes more sense to skip validating method invocations and field accesses on this object, since its actual type is not know.

angelozerr commented 2 weeks ago

In this usecase , the user tag is called here https://github.com/FroMage/quarkus-renarde-todo/blob/d03d71f6b41b14b228fe8ad782b32800dcb9b6f0/src/main/resources/templates/main.html#L19

{#user inject:user img=true size=20/}

As I have implemented Qute closed template, my plan is to provide a smart inference to say that it must be an User object instead of Object only.

angelozerr commented 2 weeks ago

See issue https://github.com/redhat-developer/quarkus-ls/issues/913