Back to LanguageTool Homepage - Privacy - Imprint

Maven error message for tokens marked as regular expressions


(Mike Unwalla) #1

When I ran the Maven test before I synced the postags for ‘rework’ (https://github.com/languagetool-org/languagetool/commit/2c156ce3719150215b73ec06cb35d8ae8bdf1eff), this Maven error message occurred a few times, but it is not repeatable. I put it here for reference:

[INFO] Running org.languagetool.rules.patterns.DemoPatternRuleTest
Running XML validation for xx/grammar.xml...
Running pattern rule tests for Testlanguage... The Testlanguage rule: PATTERN_REGEXP_MATCH_SUGGESTIONS_INSIDE[3], token
[1], contains "znel" that is marked as regular expression but probably is not one.
The Testlanguage rule: PATTERN_REGEXP_MATCH_SUGGESTIONS_OUTSIDE[4], token [1], contains "znel" that is marked as regular
 expression but probably is not one.
79 rules tested.

As the message says, the tokens do not contain a regexps:

<token regexp="yes">znel</token>


(Oleg) #2

It seems that this is not the error message, but a suggestion. The word is always the valid regexp.
The rule serves to reproduce that issue and to ensure that the case reported in issue works fine.


(Mike Unwalla) #3

Hi @oserikov, my comment was not clear. Sorry.

The point I want to make is that the Maven message was erratic. When I added the 2 lines to added.txt, I got the message. When I removed the lines, I got no message. But, after about the third attempt to add the lines, I got no message (and thus, I committed the change).