Merge pull request #150 from hapifhir/improveFileIgnores

improved recursive if scanning ignores
This commit is contained in:
Grahame Grieve 2020-03-06 12:26:03 +11:00 committed by GitHub
commit a680074406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -549,8 +549,10 @@ public class ValidationEngine implements IValidatorResourceFetcher {
}
private boolean isIgnoreFile(File ff) {
return Utilities.existsInList(ff.getName(), ".DS_Store") || Utilities.existsInList(Utilities.getFileExtension(ff.getName()).toLowerCase(), "md", "css", "js", "png", "gif", "jpg", "html", "tgz", "pack", "zip");
if (ff.getName().startsWith(".")|| ff.getAbsolutePath().contains(".git")){
return true;
}
return Utilities.existsInList(Utilities.getFileExtension(ff.getName()).toLowerCase(), "md", "css", "js", "png", "gif", "jpg", "html", "tgz", "pack", "zip");
}
private Map<String, byte[]> loadPackage(InputStream stream, String name) throws Exception {