Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates documentation api #531

Open
ilyapuchka opened this issue Feb 22, 2018 · 0 comments
Open

Templates documentation api #531

ilyapuchka opened this issue Feb 22, 2018 · 0 comments

Comments

@ilyapuchka
Copy link
Collaborator

ilyapuchka commented Feb 22, 2018

Annotations are not compiled and very easy to type wrong. Then it can produce confusing result for which you need to read template carefully. To improve understanding of templates we can introduce documentation api that can be placed in header comment of template and can look like this:

{#
desc: description of template
annotations:
  - some_annotation: description of annotation
  - another_annotation: description of annotation
#}

Then we can parse annotations from these comments and when we parsing them from code and find unknown annotation we can suggest user with correct syntax using the same approach as in #471.
We can do the same for arguments, though they are less used and only passed once when running tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant