Hey Mike,
I've just stumbled over architecture-rule on TSS and played around
with it on my way to work a little. It's refreshing to see a very
nicely programmed little brother of SonarJ. I can not remember when it
was such a fun to dive into the sources. I guess a lot of other OS
projekt could take a leaf of your book regarding code quality and
documentation. A few things and thoughts:
1. Would you mind if I create an XSD from the DTD? Most tools provide
more sophisticated support for working with XSD.
2. I've played around with wildcards a little and could not get it
work at all. To me it seems that line 278 in AbstractArchitectureRules
is the problem. You call layer.equals(javaPackage) which of course
hard compares both path string, which does not work for wildcarded
layers. Changing the line to layer.match(javaPackage) seems to result
in reasonable results for me.
3. Once I got the wildcarding working I've played around with your
syntax a little. You use double dots "..*" to embody multiple
packages. Wouldn't a double asterisk "**" be more speaking? E.g.
foo.bar.**.foobar.*. I know this syntax from Maven and other tools, so
I feel much more comfortable with it. I've tried replacing your RegEx
Transformation in JPackage.regExMatch(..) to replaceAll("\\\\.\\*\\*",
"\\\\.\\[A-Za-z_0-9.]*"), adapted the test cases and it seems to work
4. Another thing regarding wildcards is the following case. I want to
ensure that the package core and all subpackages do not have
dependencies to any other packages I'd like to specify the following:
package: foo.bar.core..*;
violation: foo.bar..*
Of course this fails, as the violation matches the package itself.
Could we check if the current package to be tested against the
violation matches the package first to prevent self violations?
Just tell me what you think about the suggestions. I also would not
hesitate to get my hands dirty if you need support.
Regards,
Ollie
On Jul 5, 4:59 pm, "Mike Nereson" <
mikenere...@gmail.com> wrote:
> Thanks to everyone who voted on dzone to help get to the front page.
>
> Its now on dzone, the server side,
freshmeat.net, and hopefuly even
>
infoq.com eventually.
>
> These front page stories are important to the growth of the project. Each
> time Architecture Rules makes front page dzone, we get hundreds of views and
> new users who download the jars. I can't track the maven repository usage,
> but I assume there are many more using the maven repo than downloading the
> jars directly.
>
> Architecture Rules was featured at Openversion.com this past week. The
> author wrote some great words about the project about how it could be used
> and why it is important to use. My favorite part of the post is where the
> author suggested that "ArchitectureRules can become as popular as
> FindBugs<
http://findbugs.sourceforge.net/>or
> PMD <
http://pmd.sourceforge.net/>". That would be awesome and wouldn't be
> possible without the help of all you who help publize the project.
http://blog.openversion.com/project-highlight-architecture-rules/