creadur-rat
creadur-rat copied to clipboard
RAT-390 migrate exclusion config - (Harmonize Part 6)
Moved exclusion calculations from plugin to core which involved refactoring and reimplementing to better fit into the design.
Largest changes are:
- Code in
apache-rat-pluginthat dealt with inclusion and exclusion of files to process was moved into the coreo.a.r.config.exclusionpackage and its sub packages. All of the inclusion and exclusion processing is handled by theExclusionProcessor. The exclusion package is the largest change in the codebase as it is both in core (where things are added) and plugin (where things are removed). - A
DocumentNameMatcherinterface is defined in theo.a.r.document.implpackage. implementations of this class are used in the filtering process. - A
DocumentNameclass has been created ino.a.r.document.implpackage. The name is associated with all Documents. The document name tracks both the fully qualified path to the file on the file system as well as the base directory that the file was referenced from. This class is where filenames are localized to the directory where rat starts it's scan. A lot of the churn in this PR is to push the DocumentName into the Document across the codebase. - The Plexus code that we use to match file patterns has be copied into
o.a.r.config.exclusion.plexus. These files have been modified from their original. - An
o.a.r.utils.iteratorpackage has been added. It contains extended iterator code from Apache Jena that is slightly modified to fit our needs. This code allows us to use iterators in ways similar to streams but without the overhead. - Added more tests.