Skip to content

Commit

Permalink
feat: use includes and excludes to specify files to scan
Browse files Browse the repository at this point in the history
This is to implement mojohaus#12
  • Loading branch information
juliangp committed Jan 18, 2022
1 parent 55f0ecf commit f01db6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/codehaus/mojo/taglist/FileAnalyser.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ public FileAnalyser( TagListReport report, List<TagClass> tagClasses )
locale = report.getLocale();
noCommentString = report.getBundle().getString( "report.taglist.nocomment" );
this.tagClasses = tagClasses;
this.includes = report.getIncludes();
this.excludes = report.getExcludes();
this.includes = report.getIncludesCommaSeparated();
this.excludes = report.getExcludesCommaSeparated();
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/codehaus/mojo/taglist/TagListReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ private boolean hasSources( File dir )
if ( dir.exists() && dir.isDirectory() )
{
try {
if ( ! FileUtils.getFiles( dir, getIncludes(), getExcludes() ).isEmpty() ) {
if ( ! FileUtils.getFiles( dir, getIncludesCommaSeparated(), getExcludesCommaSeparated() ).isEmpty() ) {
found = true;
}
} catch (IOException e) {
Expand Down Expand Up @@ -525,7 +525,7 @@ public List constructSourceDirs()
/**
* Get the files to include, as a comma separated list of patterns.
*/
public String getIncludes()
String getIncludesCommaSeparated()
{
if ( includes != null ) {
return String.join(",", includes);
Expand All @@ -537,7 +537,7 @@ public String getIncludes()
/**
* Get the files to exclude, as a comma separated list of patterns.
*/
public String getExcludes()
String getExcludesCommaSeparated()
{
if ( excludes != null ) {
return String.join(",", excludes);
Expand Down

0 comments on commit f01db6f

Please sign in to comment.