import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Lists;
import org.apache.commons.io.IOUtils;
-import org.apache.commons.io.filefilter.*;
+import org.apache.commons.io.filefilter.AndFileFilter;
+import org.apache.commons.io.filefilter.FileFileFilter;
+import org.apache.commons.io.filefilter.IOFileFilter;
+import org.apache.commons.io.filefilter.WildcardFileFilter;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import java.util.Map.Entry;
+import java.util.Properties;
/**
* Class that creates a Sonar project definition based on a set of properties.
* Array of all mandatory properties required for a project without child.
*/
private static final String[] MANDATORY_PROPERTIES_FOR_SIMPLE_PROJECT = {
- PROPERTY_PROJECT_BASEDIR, PROPERTY_PROJECT_KEY, PROPERTY_PROJECT_NAME, PROPERTY_PROJECT_VERSION, PROPERTY_SOURCES
+ PROPERTY_PROJECT_BASEDIR, PROPERTY_PROJECT_KEY, PROPERTY_PROJECT_NAME, PROPERTY_PROJECT_VERSION
};
/**
}
ProjectDefinition definition = ProjectDefinition.create().setProperties(properties)
- .setBaseDir(baseDir)
- .setWorkDir(workDir);
+ .setBaseDir(baseDir)
+ .setWorkDir(workDir);
return definition;
}
if (sourceFolder.isDirectory()) {
LOG.warn("/!\\ A multi-module project can't have source folders, so '{}' won't be used for the analysis. " +
"If you want to analyse files of this folder, you should create another sub-module and move them inside it.",
- sourceFolder.toString());
+ sourceFolder.toString());
}
}
filePattern = pattern.substring(i + 1);
}
List<IOFileFilter> filters = new ArrayList<IOFileFilter>();
- if (pattern.indexOf('*')>=0) {
+ if (pattern.indexOf('*') >= 0) {
filters.add(FileFileFilter.FILE);
}
filters.add(new WildcardFileFilter(filePattern));