diff --git a/src/rules/hasdoc.nim b/src/rules/hasdoc.nim index 1665e4d..73cbc1d 100644 --- a/src/rules/hasdoc.nim +++ b/src/rules/hasdoc.nim @@ -235,6 +235,10 @@ fixRule: return false if astNode.kind == nkObjectTy: astNode[2].comment = docTemplate + elif astNode.kind == nkStmtList: + let docNode: PNode = newNode(kind = nkCommentStmt) + docNode.comment = docTemplate + astNode.sons = docNode & astNode.sons else: astNode.comment = docTemplate return true