@@ -79,7 +79,7 @@ class CommentExpander {
79
79
case None =>
80
80
// SI-8210 - The warning would be false negative when this symbol is a setter
81
81
if (ownComment.indexOf(" @inheritdoc" ) != - 1 && ! sym.isSetter)
82
- println (s " ${sym.span} : the comment for ${sym} contains @inheritdoc, but no parent comment is available to inherit from. " )
82
+ report.warning (s " The comment for ${sym} contains @inheritdoc, but no parent comment is available to inherit from. " , sym.srcPos )
83
83
ownComment.replace(" @inheritdoc" , " <invalid inheritdoc annotation>" )
84
84
case Some (sc) =>
85
85
if (ownComment == " " ) sc
@@ -159,7 +159,7 @@ class CommentExpander {
159
159
* @param sym The child symbol
160
160
* @return The child comment with the inheritdoc sections expanded
161
161
*/
162
- def expandInheritdoc (parent : String , child : String , sym : Symbol ): String =
162
+ def expandInheritdoc (parent : String , child : String , sym : Symbol )( using Context ) : String =
163
163
if (child.indexOf(" @inheritdoc" ) == - 1 )
164
164
child
165
165
else {
@@ -193,8 +193,8 @@ class CommentExpander {
193
193
val sectionTextBounds = extractSectionText(parent, section)
194
194
cleanupSectionText(parent.substring(sectionTextBounds._1, sectionTextBounds._2))
195
195
case None =>
196
- println (s """ ${sym.span} : the """" + getSectionHeader + " \" annotation of the " + sym +
197
- " comment contains @inheritdoc, but the corresponding section in the parent is not defined." )
196
+ report.warning (s """ The """" + getSectionHeader + " \" annotation of the " + sym +
197
+ " comment contains @inheritdoc, but the corresponding section in the parent is not defined." , sym.srcPos )
198
198
" <invalid inheritdoc annotation>"
199
199
}
200
200
0 commit comments