sbt / sbt-buildinfo

I know this because build.sbt knows this.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unescaped value breaks comments

ignasi35 opened this issue · comments

When rendering, the value of each entry in BuildInfo is added as a comment. If the value contains special characters (e.g. "/*) the comment becomes malformed and breaks compilation.

 /** The value is "Some git comment blabla/* and more comment" */
 val gitComment = "Some git comment blabla/* and more comment"

The code comment above is malformed (at least in some versions of scala) since the initial /** is considered unclosed.

See

s" /** The value is ${quote(value)}. */",
and
s" /** The value is ${quote(value)}. */",

Thanks for the report.

I guess /* can be escaped as /* - https://stackoverflow.com/a/27662482/3827