gengliangwang commented on code in PR #46947:
URL: https://github.com/apache/spark/pull/46947#discussion_r1635782645


##########
scalastyle-config.xml:
##########
@@ -155,6 +155,14 @@ This file is divided into 3 sections:
     <customMessage><![CDATA[MDC should be used in string interpolation 
log"..." instead of s"..."]]></customMessage>
   </check>
 
+  <check customId="logInlineVariable" level="error" 
class="org.scalastyle.file.RegexChecker" enabled="true">
+    <parameters><parameter 
name="regex">log(?:Info|Warning|Error)\(s".*(\$|\+\s*[^\s"]).*"\)</parameter></parameters>

Review Comment:
   we need to detect the ".format(..)` as well.
   Also, need to exclude the testing code.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to