CustomMessage tag content not being displayed in IntelliJ

15 views
Skip to first unread message

Fredrik Andersson

unread,
Sep 19, 2018, 8:53:33 AM9/19/18
to Scalastyle users
I'm trying to use the `RegexChecker`, along with a custom error message, in IntelliJ. I've defined my check similarly to this in scalastyle_config.xml:

     <check level="warning" class="org.scalastyle.file.RegexChecker" enabled="true">
      <parameters>
       <parameter name="regex">hello</parameter>
      </parameters>
      <customMessage>Code should not contain "hello"</customMessage>
     </check>


When adding "hello" to a file, I get the following message in IntelliJ:

`Regular expression matched "hello"`

But what I really want is for the contents of `customMessage` to be displayed. Is there some setting that I'm missing?

S SATHISH BABU

unread,
Sep 20, 2018, 12:34:06 AM9/20/18
to Scalastyle users
I think is there is nothing you are missing. I copied your checker in my config.xml and ran it against some sample code. And it works fine!. I got the custom message /*Code should not contain "hello" */.
I ran the sample in Eclipse IDE, not sure about IntelliJ.
Reply all
Reply to author
Forward
0 new messages