Skip to content

Commit

Permalink
Merge pull request alibaba#153 from LQZYC/master
Browse files Browse the repository at this point in the history
fix issue alibaba#68
support package name like ali88.ps.service
  • Loading branch information
SeanCai authored Nov 1, 2017
2 parents 40bcf54 + 8a2cd82 commit db90432
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
public class PackageNamingRule extends AbstractXpathRule {
private static final String XPATH = "//PackageDeclaration/Name\n"
+ "[not (matches(@Image, '^[a-z]+(\\.[a-z][a-z0-9]*)*$'))]";
+ "[not (matches(@Image, '^[a-z0-9]+(\\.[a-z][a-z0-9]*)*$'))]";

public PackageNamingRule() {
setXPath(XPATH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,19 @@
</test-code>


<code-fragment id="PackageNamingRule2">
<![CDATA[
package ali88.ps.service;
public class SomeClass {
}
]]>
</code-fragment>
<test-code>
<description>Package Name should be lowercase</description>
<expected-problems>0</expected-problems>
<code-ref id="PackageNamingRule2" />
</test-code>



</test-data>

0 comments on commit db90432

Please sign in to comment.