Revision: 8748
http://languagetool.svn.sourceforge.net/languagetool/?rev=8748&view=rev
Author: dominikoeo
Date: 2012-12-31 18:08:12 +0000 (Mon, 31 Dec 2012)
Log Message:
-----------
- enable regexp sanity check of duplicated char in square brackets [...]
but without checking case insensitive because it would give many minor
warnings in German grammar.xml.
Modified Paths:
--------------
trunk/JLanguageTool/src/test/java/org/languagetool/rules/patterns/PatternRuleTest.java
Modified:
trunk/JLanguageTool/src/test/java/org/languagetool/rules/patterns/PatternRuleTest.java
===================================================================
---
trunk/JLanguageTool/src/test/java/org/languagetool/rules/patterns/PatternRuleTest.java
2012-12-31 17:50:27 UTC (rev 8747)
+++
trunk/JLanguageTool/src/test/java/org/languagetool/rules/patterns/PatternRuleTest.java
2012-12-31 18:08:12 UTC (rev 8748)
@@ -341,13 +341,13 @@
+ "] which is unlikely to be correct.");
}
- /* Disabled for now: it gives several errors in German
- * which are minor and debatable whether it adds value.
-
+ /* Disabled case insensitive check for now: it gives several errors
+ * in German which are minor and debatable whether it adds value.
final boolean caseSensitive = matcher.group(1) != null ||
isCaseSensitive;
if (!caseSensitive) {
s = s.toLowerCase();
}
+ */
char[] sorted = s.toCharArray();
// Sort characters in string, so finding duplicate characters can be
done by
// looking for identical adjacent characters.
@@ -356,14 +356,12 @@
char c = sorted[i];
if ("&\\-|".indexOf(c) < 0 && sorted[i - 1] == c) {
System.err.println("The " + lang.toString() + " rule: "
- + ruleId + ", token [" + tokenIndex + "], contains case "
- + (caseSensitive ? "sensitive" : "insensitive")
+ + ruleId + ", token [" + tokenIndex + "], contains "
+ " regexp part [" + matcher.group(2)
+ "] which contains duplicated char [" + c + "].");
break;
}
}
- */
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits