Greetings,

I have been working on RAT-321 [1] and in the process have had to rework
the configuration aspect of the RAT report.  (Don't Panic) I moved all the
configuration information into o.a.r.ReportConfiguration and moved the
actual execution of the report into a class called "Reporter".  I have not
changed the basic functionality of the reporting mechanism, no changes to
file type detection, no changes to the generated reports.  All changes are
limited to the inputs for the report generation that existed before I
created this branch.

o.a.r.Report now just sets up the o.a.r.ReportConfiguration and calls
o.a.r.Reporter (All cli stuff is isolated in o.a.r.Report)  This provides a
clean separation between the configuration interface and the configuration
of the report.

My goal has been to get all options supported in any of the 3 configuration
interfaces (cli, Ant, Maven) to be supported in the ReportConfiguration
object.  I think I have mostly achieved this.

I also significantly simplified the License structure.  There is now a 1-1
correspondence between the License and the ILicenseFamily. Every License
defines a unique LicenseFamily.  Each License has one and only one
IHeaderMatcher.

All the differences between the hard coded licenses are reduced to
differences in the configuration of the IHeaderMatcher.  I added an
IHeaderMatcher.Builder class.  I also defined 8 internal IHeaderMatcher
implementation via builders that are retrieved via
IHeaderMatcher.Builder.x() static methods:

   - text - handles both the FullText and SimpleText matcher construction.
   - regex - builds a regular expression matcher.
   - copyright - build a copyright matcher with or without owner, start
   date or end date.
   - not - to negate a matcher.
   - all - a matcher that contains one or more matchers and requires that
   all be matched before it declares a match.
   - any - a matcher that contains one or more matchers and requires that
   any of them match before it declares a match.
   - matcherRef -  a matcher that references another matcher in the system
   when the other matcher declares a match so does its references.

I also added an ID field for the referenced.  if the ID is not provided a
UUID is created.

I created a property file to define all the existing licenses using an XML
format.

I modified the Maven plugin to configure the o.a.r.ReportConfiguration
object.

I modified the Ant task to configure the o.a.r.ReportConfiguration and
herein lies my problem.  I am not conversant in the internals of ant tasks
and the antunit library.  There are 6 tests that fail.  They broadly fall
into 2 categories:

   1. Adding new elements based on either the IHeaderMatcher
   orIHeaderMatcher.Builder implementations.
   2. Detecting text in the Ant output when it is not sent to a file.

All of these tests work when executed using the BuildFileRule under the
o.a.r.anttasks.ReportTest.

Is there anyone here that can take a look at the tests and see what I did
wrong?  I would greatly appreciate it.

Also, since you've read this far, it might be a good time to comment on the
basic architecture of the configuration changes.

Thank you,
Claude


[1]
https://github.com/Claudenw/creadur-rat/tree/RAT-321_text_based_configuration

-- 
LinkedIn: http://www.linkedin.com/in/claudewarren

Reply via email to