Menu

#382 Regexp illegalpattern regression from 5.8 to 6.1 and 6.2

6.2.0
closed
nobody
None
1
2015-03-04
2015-02-23
Edwin Stang
No

Pushing this issue upstream at it seems to be a eclipse-cs problem and not a checkstyle problem.

See: https://github.com/checkstyle/checkstyle/issues/378

Discussion

  • Lars Koedderitzsch

    The plugin does not do anything with individual checks, there must be something else wrong here.

    I did a bit of debugging with your check configuration and found the regexp not to be working on files with windows line separators (\r\n). That might be the issue your seeing.
    After I tweaked the regexp a bit to cope with that it seemed to be working just fine:

    (interface [a-zA-Z0-9 <>,./*?[\s]] {|(@Immutable|@ThreadSafe|@NotThreadSafe)(.[(\r)?\n]).(class|enum) [a-zA-Z0-9\s<>,./*?]* {)

    Please note that that code where the Immutable/Treadsafe/NotThreadSafe is commented out does also pass without error.

    HTH,
    Lars

     
  • Edwin Stang

    Edwin Stang - 2015-02-23

    This was a good hint with \r. This regex works fine:

    (interface [a-zA-Z0-9 &lt;&gt;,\./*?[\s]]* \{|(@Immutable|@ThreadSafe|@NotThreadSafe)(.*[\r\n])*.*(class|enum) [a-zA-Z0-9\s&lt;&gt;,\./*?]* \{)
    

    Though I still wonder why checkstyle CLI and eclipse-cs 5.8 worked without the \r in the regex even though the files did not change.

    Anyway, this bug can be closed. Thanks a lot!

     

    Last edit: Edwin Stang 2015-02-23
  • Lars Koedderitzsch

    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB