JsHintSpec spec = new JsHintSpec();
spec.setSource(getSource().getFiles()); // flatten because we need to serialize
spec.setEncoding(getEncoding());
spec.setJsHint(getJsHint().getSingleFile());
JsHintResult result = rhinoHandle.process(spec);
setDidWork(true);
// TODO - this is all terribly lame. We need some proper reporting here (which means implementing Reporting).
Logger logger = getLogger();
boolean anyErrors = false;
Map<String, Map<?, ?>> reportData = new LinkedHashMap<String, Map<?, ?>>(result.getResults().size());
for (Map.Entry<File, Map<String, Object>> fileEntry: result.getResults().entrySet()) {
File file = fileEntry.getKey();
Map<String, Object> data = fileEntry.getValue();
reportData.put(file.getAbsolutePath(), data);