peacewong commented on code in PR #4760:
URL: https://github.com/apache/linkis/pull/4760#discussion_r1258143450


##########
linkis-computation-governance/linkis-entrance/src/main/scala/org/apache/linkis/entrance/interceptor/impl/CommentInterceptor.scala:
##########
@@ -102,7 +103,15 @@ object ScalaCommentHelper extends CommentHelper {
   override val commentPattern: Regex = """^\s*//.+\s*""".r.unanchored
   private val scalaCommentPattern: String = 
"(?ms)([\"'](?:|[^'])*['\"])|//.*?$|/\\*.*?\\*/"
 
-  override def dealComment(code: String): String = code
+  override def dealComment(code: String): String = {
+    // Append code `val a=1` to prevent bugs that do not exit tasks for a long 
time
+    if (EntranceConfiguration.ENTRANCE_SCALA_APPEND_CODE_ENABLED.getValue) {

Review Comment:
   Is it more reasonable to modify Scala Code Parser, go to append val 
linkisVar=1



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@linkis.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@linkis.apache.org
For additional commands, e-mail: notifications-h...@linkis.apache.org

Reply via email to