Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
check for .format(...)
  • Loading branch information
asl3 committed Jun 13, 2024
commit 9a10dd8b2bd1ff801f07af01e391541173a328b8
2 changes: 1 addition & 1 deletion scalastyle-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ This file is divided into 3 sections:
</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>
<parameters><parameter name="regex">log(?:Info|Warning|Error)\((?:".*"\.format\(.*\)|s".*(?:\$|\+\s*[^\s"]).*"\))</parameter></parameters>
<customMessage>
Logging message should use log"..." instead of s"..." and variables should be wrapped in `MDC`s.
Refer to Structured Logging Framework guidelines in the file `internal/Logging.scala`.
Expand Down