}
private static Map<String, Result> lintTheFiles(final JSHint jshint, final Cache cache, List<File> filesToCheck, final Config config, final Log log) throws FileNotFoundException {
final Map<String, Result> currentResults = new HashMap<String, Result>();
for(File file : filesToCheck){
Result previousResult = cache.previousResults.get(file.getAbsolutePath());
Result theResult;
if(previousResult==null || (previousResult.lastModified.longValue()!=file.lastModified())){
log.info(" " + file );
List<Error> errors = jshint.run(new FileInputStream(file), config.options, config.globals);
theResult = new Result(file.getAbsolutePath(), file.lastModified(), errors);
}else{
log.info(" " + file + " [no change]");
theResult = previousResult;
}
if(theResult!=null){
currentResults.put(theResult.path, theResult);
Result r = theResult;
currentResults.put(r.path, r);
for(Error error: r.errors){
log.error(" " + error.line.intValue() + "," + error.character.intValue() + ": " + error.reason);
}
}