playframework / playframework/twirl

Not possible to add scaladoc comment for the generated template object

Open
#420 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
561
Forks
118
Avg merge
1d 15h
Merged PRs (30d)
29

Description

Adding a scaladoc comment to the start of a template file like the example from the documentation:

@*************************************
 * Home page.                        *
 *                                   *
 * @param msg The message to display *
 *************************************@
@()

generates a scaladoc comment for the apply method of the template. This is correct and expected but it means its not possible to comment on the object.

Given the standard scaladoc formatting an object comment is the best place to document a more complex template, the method comment just doesn't give room for or expect lengthy comments.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented template comment example and inspecting the generated template object and its apply method. Determine how the comment is currently assigned; done means a template can retain documentation for the apply method while also exposing a separate Scaladoc comment for the generated object.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.