Skip to content

Commit

Permalink
scan also ordinary folders, if they contain 'src' subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
Vita Stejskal committed Apr 30, 2013
1 parent bf9f8f9 commit 19cfc76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions i18nchecker/src/org/i18nchecker/I18nChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,20 @@ private static void collectScanners(

for (File f : topDir.listFiles()) {
if (moduleFilter != null && moduleFilter.length() > 0 && !f.getName().contains(moduleFilter)) {
System.out.println("Filtered out: " + f.getCanonicalPath());
continue;
}
if (f.isFile()) {
continue;
}
if (isNbmManifest(new File(f, "manifest.mf"))) {
scanners.add(new ModuleScanner(f, true, resolver));
} else if (isMavenProject(new File(f, "pom.xml"))) {
scanners.add(new ModuleScanner(new File(f, "/src/main/java"), false, resolver));
} else if (new File(f, "src").exists()) {
scanners.add(new ModuleScanner(new File(f, "src"), false, resolver));
} else {
System.out.println("Can't auto-detect sources, ignoring: " + f.getCanonicalPath());
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions i18nchecker/test/org/i18nchecker/i18n_known_errors.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

i18nchecker/playground/PaintApp/ColorChooser=1
i18nchecker/playground/PaintApp/Paint=12
i18nchecker/playground/module1=3
i18nchecker/playground/module2=1
i18nchecker/playground/module1/src=3
i18nchecker/playground/module2/src=1
i18nchecker/playground/module4=1

total=17

0 comments on commit 19cfc76

Please sign in to comment.