redhat-developer / redhat-developer/quarkus-ls
Disable missing template validation via the @Locate annotation.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 50
- Forks
- 18
- Avg merge
- 22h 11m
- Merged PRs (30d)
- 3
Description
According to https://quarkus.io/guides/qute-reference#template-locator-registration, if a template locator is registered for @Locate names or patterns, validation should be disabled at build time.
The easiest way to register template locators is to make them CDI beans. As the custom locator is not available during the build time when a template validation is done, you need to disable the validation via the
@Locateannotation.
So given:
@Locate("bar.html")
@Locate("foo.*")
public class CustomLocator implements TemplateLocator {
@Override
public Optional<TemplateLocation> locate(String templateId) {
return Optional.empty();
}
}
Then there should be no error, nor "create template" codelens, in a resource referencing a Template bar:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how @Locate template locators are handled during build-time template validation and how missing-template errors and the "create template" codelens are produced. Use the provided bar.html and foo.* example to verify that a resource referencing bar.html produces neither an error nor the codelens.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100